Potatoes arrive at a crisp factory in large batches. Samples are taken from each batch for quality checking. Assume that each potato can be claasified as “good” or “bad” and that, given the value of a parameter $\theta$ , potatoes are independent and each has probability $\theta$ of being “bad.”  

(a) Suppose that $m$ samples, each of fixed size $n$ , are chosen and that the numbers of bad potatoes found are $x_{1},\ldots,x_{m}$ . Show that  

$$
s=\sum_{i=1}^{m}x_{i}
$$  

is sufficient for $\theta$ .  

(b) Suppose that potatoes are examined one at a time until a fixed number $r$ of bad potatoes is found. Let the number of potatoes examined when the $r^{\mathrm{th}}$ bad potato is found be $_y$ .This process is repeated $m$ times and the values of $_y$ are $y_{1},\ldots,y_{m}$ . Show that  

$$
t=\sum_{i=1}^{m}y_{i}
$$  

is sufficient for $\theta$ .  

(c) Suppose that we have a prior distribution for $\theta$ which is a $\mathrm{beta}(a,b)$ distribution. A two-stage inspection procedure is adopted. In Stage 1 potatoes are examined one at a time until a fixed number $r$ of bad potatoes is found. The $r^{\mathrm{th}}$ bad potato found is the $y^{\mathrm{th}}$ to be examined. In Stage 2 a further $n$ potatoes are examined and $x$ of these are found to be bad.  

i. Find the posterior distribution of $\theta$ after Stage 1.   
ii. Find the posterior distribution of $\theta$ after Stage 1 and Stage 2.  