Suppose that the number of accidents X in a factory is distributed as Poisson $X|\theta \sim Poisson(\theta)$

47 Views Asked by At

Suppose that the number of accidents $X$ in a factory is distributed as Poisson $X|\theta \sim Poisson(\theta)$. Assume the a priori distribution $$ f(\theta) = \frac{3^4\theta^{4-1}e^{-3\theta}}{\Gamma(4)}, \theta \geq 0 $$ Given $18$ accidents in the first $6$ months, obtain the posterior distribution of $\theta$ and calculate its mean and variance.

My attempt: If $X|\theta \sim Poisson(\theta)$, then $f(x, \theta)=\frac{e^{-\theta} \theta ^x}{x!}$ for $x = {0, 1, 2, ...}$ and $\theta >0$. Then the posterior distribution function is given by $$ f(\theta | x) \propto f(x|\theta)f(\theta) = \left(e^{-\theta}\theta ^{x}\right)\left(\theta ^{4-1}e^{-3\theta}\right)= e^{-4\theta}\theta ^{x+3} $$ Hence, $\theta|X$ is proportional to $\Gamma(x+4,4)$. Now how can I use the information about the $18$ accidents in the first $6$ months to obtain the mean and the variance of the posterior distribution?