Q53. Poisson flaws and posterior odds

[12 marks]

A textile manufacturer counts flaws in equal-length rolls of fabric. Assume X_i\mid\theta\overset{\mathrm{iid}}{\sim}\operatorname{Poisson}(\theta), \qquad i=1,\ldots,10, where \theta is the mean number of flaws per roll.

Ten inspected rolls contain 32 flaws in total. The prior is \theta\sim\operatorname{Gamma}(8,2), using the shape–rate convention: \pi(\theta)=\frac{2^8}{\Gamma(8)}\theta^7e^{-2\theta}, \qquad\theta>0. The manufacturer considers the process acceptable if \theta\le4.

(a) Form the likelihood and derive the posterior distribution of \theta. [4 marks]

(b) Find the posterior mean. Show that it lies between the prior mean and the observed sample mean. [2 marks]

(c) Define H_0:\theta\le4,\qquad H_1:\theta>4. Write an integral for \mathbb P(H_0\mid{\boldsymbol{x}}), including the normalising constant. Hence express the posterior odds in favour of H_0. You do not need to evaluate the integral. [3 marks]

(d) A colleague argues:

“The posterior mean is below 4, so the probability that the process is acceptable must be 1.”

Explain why this is incorrect. Would changing H_0 to \theta<4 change its posterior probability? Justify your answer. [3 marks]

Definitions. For Gamma shape–rate parameters (A,B), the density is B^A\theta^{A-1}e^{-B\theta}/\Gamma(A) on \theta>0 and the mean is A/B. Here n=10, \sum_i x_i=32, and the prior is \operatorname{Gamma}(8,2). Write q=\mathbb P(\theta\le4\mid{\boldsymbol{x}}). Posterior odds in favour of this event over its complement are q/(1-q).

(a) Likelihood and posterior. Conditional independence gives, for observed nonnegative integer counts, \begin{aligned} L(\theta;{\boldsymbol{x}}) &=\prod_{i=1}^{10}\frac{e^{-\theta}\theta^{x_i}}{x_i!} =\frac{\theta^{\sum_i x_i}e^{-10\theta}}{\prod_{i=1}^{10}x_i!}\\ &\propto\theta^{32}e^{-10\theta},\qquad\theta>0. \end{aligned} The factorial term does not depend on \theta, so only the total count is needed for this likelihood kernel. Multiplying by the prior kernel, \begin{aligned} \pi(\theta\mid{\boldsymbol{x}}) &\propto L(\theta;{\boldsymbol{x}})\pi(\theta)\\ &\propto\theta^{32}e^{-10\theta}\theta^7e^{-2\theta} =\theta^{39}e^{-12\theta}. \end{aligned} Matching \theta^{A-1}e^{-B\theta} gives A=40 and B=12. Thus \boxed{\theta\mid{\boldsymbol{x}}\sim\operatorname{Gamma}(40,12) \quad\text{(shape--rate)},\qquad\theta>0,} with normalised posterior density \boxed{\pi(\theta\mid{\boldsymbol{x}}) =\frac{12^{40}}{\Gamma(40)}\theta^{39}e^{-12\theta}, \qquad\theta>0.}

(b) Posterior mean and shrinkage. The prior mean, sample mean, and posterior mean are respectively \mathbb{E}[\theta]=\frac82=4,\qquad \bar x=\frac{32}{10}=3.2,\qquad \boxed{\mathbb{E}[\theta\mid{\boldsymbol{x}}]=\frac{40}{12}=\frac{10}{3}.} In particular, 3.2<10/3<4. More explicitly, \mathbb{E}[\theta\mid{\boldsymbol{x}}] =\frac{8+32}{2+10} =\frac{2}{12}\left(\frac82\right) +\frac{10}{12}\left(\frac{32}{10}\right) =\frac16\mathbb{E}[\theta]+\frac56\bar x. The weights are positive and sum to one, so the posterior mean lies strictly between the two distinct means.

(c) Posterior probability and odds. Let q=\mathbb P(H_0\mid{\boldsymbol{x}}). Integrating the normalised posterior density over the acceptable region gives \boxed{q=\mathbb P(\theta\le4\mid{\boldsymbol{x}}) =\frac{12^{40}}{\Gamma(40)} \int_0^4\theta^{39}e^{-12\theta}\,d\theta.} The two hypotheses exhaust the parameter space, so \mathbb P(H_1\mid{\boldsymbol{x}})=1-q. Therefore the posterior odds in favour of H_0 are q:(1-q), or, as a ratio, \boxed{ \frac{\mathbb P(H_0\mid{\boldsymbol{x}})}{\mathbb P(H_1\mid{\boldsymbol{x}})} =\frac{q}{1-q} =\frac{\displaystyle\int_0^4\theta^{39}e^{-12\theta}\,d\theta} {\displaystyle\int_4^\infty\theta^{39}e^{-12\theta}\,d\theta}. } The common normalising constant cancels in the odds ratio, but it is required in the probability integral above. No numerical evaluation is needed.

(d) A mean below the threshold does not imply certainty. The posterior mean is an average of possible values of \theta, not an upper bound on them. Although \mathbb{E}[\theta\mid{\boldsymbol{x}}]=10/3<4, the \operatorname{Gamma}(40,12) density is strictly positive for every \theta>0, including values above 4. Consequently, \mathbb P(\theta>4\mid{\boldsymbol{x}}) =\frac{12^{40}}{\Gamma(40)} \int_4^\infty\theta^{39}e^{-12\theta}\,d\theta>0, so \mathbb P(\theta\le4\mid{\boldsymbol{x}})<1. A point estimate below the threshold does not eliminate posterior uncertainty about acceptability.

Replacing \theta\le4 by \theta<4 does not change the posterior probability. The posterior is continuous, and hence \mathbb P(\theta=4\mid{\boldsymbol{x}})=0. Therefore \boxed{\mathbb P(\theta<4\mid{\boldsymbol{x}}) =\mathbb P(\theta\le4\mid{\boldsymbol{x}}).}

Key result. The posterior mean answers “what is the posterior average of \theta?” The posterior probability of H_0 answers “how much posterior probability lies at or below 4?” These are different summaries.