I recorded the attendance of students at tutorials for a module. Suppose that we can, in some sense, regard the students as a sample from some population of students so that, for example, we can learn about the likely behaviour of next year’s students by observing this year’s. At the time I recorded the data we had had tutorials in Week 2 and Week 4. Let the probability that a student attends in both weeks be $\theta_{11}$ , the probability that a student attends in week 2 but not Week 4 be $\theta_{10}$ and so on. The data are as follows.  

<html><body><table><tr><td>Attendance</td><td>Probability</td><td>Observedf frequency</td></tr><tr><td>Week2a andWeek4</td><td>011</td><td>11 =25</td></tr><tr><td>Week 2 but not Week 4</td><td>010</td><td>n10 = 7</td></tr><tr><td>Week4butnot tWeek2</td><td>001</td><td>n01 =6</td></tr><tr><td>Neither week</td><td>0o0</td><td>noo =13</td></tr></table></body></html>  

Suppose that the prior distribution for $(\theta_{11},\theta_{10},\theta_{01},\theta_{00})$ is a Dirichlet distribution with density proportional to  

$$
\theta_{11}^{3}\theta_{10}\theta_{01}\theta_{00}^{2}
$$  

(a) Find the prior means and prior variances of $\theta_{11},\ \theta_{10},\ \theta_{01},\ \theta_{00}$ .  

(b) Find the posterior distribution.   
(c) Find the posterior means and posterior variances of $\theta_{11},\ \theta_{10},\ \theta_{01},\ \theta_{00}.$ .  
(d) Using the R function hpdbeta which may be obtained from the Web page (or otherwise), find a $95\%$ posterior hpd interval, based on the exact posterior distribution, for $\theta_{00}$ .  