Geologists note the type of rock at fixed vertical intervals of six inches up a quarry face. At this quarry there are four types of rock. The following model is adopted.  

The conditional probability that the next rock type is $j$ given that the present type is $i$ and given whatever has gone before is $p_{i j}$ . Clearly $\textstyle\sum_{j=1}^{4}p_{i j}=1$ for all $i$ .The following table gives the observed (upwards) transition frequencies.  

<html><body><table><tr><td colspan="2"></td><td colspan="3">To rock</td><td rowspan="2">4</td></tr><tr><td colspan="2">From rock</td><td>1</td><td>2</td><td>3</td></tr><tr><td rowspan="3"></td><td>1</td><td>56</td><td>13</td><td>24</td><td>4</td></tr><tr><td>2</td><td>15</td><td>93</td><td>22</td><td>35</td></tr><tr><td>3</td><td>20</td><td>25</td><td>153</td><td>11</td></tr><tr><td></td><td>4</td><td>6</td><td>35</td><td>11</td><td>44</td></tr></table></body></html>  

Our prior distribution for the transition probabilities is as follows. For each $i$ we have a uniform distribution over the space of possible values of $p_{i1},\ldots,p_{i4}$ . The prior distribution of $p_{i1},\ldots,p_{i4}$ is independent of that for $\,\!p_{k1},\ldots,p_{k4}$ for $i\neq k$ .  

Find the matrix of posterior expectations of the transition probabilities.  

Note that the integral of $x_{1}^{\prime\iota_{1}}x_{2}^{\prime\iota_{2}}x_{3}^{\prime\iota_{3}}x_{4}^{\prime\iota_{4}}$ over the region such that $x_{j}>0$ for $j=1,\dots,4$ and $\textstyle\sum_{j=1}^{4}x_{j}=1$ , where $\pi_{1},\ldots,\pi_{4}$ are positive is  

$$
\begin{array}{c}{{\displaystyle\int_{0}^{1}x_{1}^{n_{1}}\int_{0}^{1-x_{1}}x_{2}^{n_{2}}\int_{0}^{1-x_{1}-x_{2}}x_{3}^{n_{3}}(1-x_{1}-x_{2}-x_{3})^{n_{4}}.d x_{3}.d x_{2}.d x_{1}}}\\ {{\displaystyle=\frac{\Gamma(n_{1}+1)\Gamma(n_{2}+1)\Gamma(n_{3}+1)\Gamma(n_{4}+1)}{\Gamma(n_{1}+n_{2}+n_{3}+n_{4}+4)}}}\end{array}
$$  