5.12 Gamma-Poisson conjugate family 8/8

5.12.1 Gamma-Poisson conjugacy

Now need a posterior!

τ|yGamma(s+yi,r+n) We have: Gamma(10,2) and as data: y=(6+2+2+1) , n=4

4i=1=6+2+2+1=11

¯y=4i=14=2.75

L(τ|y)=τyenτy!

L(τ|y)=τ11e4τ6!2!2!1!τ11e4τ

bayesrules::plot_poisson_likelihood(y = c(6, 2, 2, 1), lambda_upper_bound = 10) 

We have prior, data, likelihood -> posterior

Gamma(10,2)Gamma(s+yi,r+n)

τ|yGamma(21,6)

bayesrules::plot_gamma_poisson(shape = 10, rate = 2, sum_y = 11, n = 4)