The numbers of sales of a particular item from an Internet retail site in each of 20 weeks are recorded. Assume that, given the value of a parameter $\lambda$ , these numbers are independent observations from the Poisson(λ) distribution.  

Our prior distribution for $\lambda$ is a gamma $(a,b)$ distribution.  

(a) Our prior mean and standard deviation for $\lambda$ are 16 and 8 respectively. Find the values of $a$ and $b$ .  
(b) The observed numbers of sales are as follows. 14 19 14 21 22 33 15 13 16 19 27 22 27 21 16 25 14 23 22 17 Find the posterior distribution of $\lambda$ .  
(c) Using R or otherwise, plot a graph showing both the prior and posterior probability density functions of $\lambda$ .  
(d) Using R or otherwise, find a 95% posterior hpd interval for $\lambda$ . (Note: The R function hpdgamma is available from the Module Web Page).