[Math] Conditional Probability using a Matrix

conditional probabilityprobabilityprobability distributionsprobability theory

enter image description here

I understand how to find P1: that is simply:

  • P(D1|D0)=0.8
  • P(W1|D0)=0.2
  • P(D1|W1)=0.4
  • P(W1|W0)=0.6

I do not however, understand how to find P2 using the matrix.

Normally I would solve it as such:

use a tree diagram…

ex. raining day 3, given it rained on the first day

P(D2|D0) = P(D2 ∩ D0)/P(D0) =0.72, and repeat for all

How do I solve P2 using a matrix for part (a)? Or are they asking me to solve for P2 (using any technique) and then complete part (b) and (c)

basically what I learn from this is:

Pi = (P1)^i

that is you must square the matrix 'i'th times to find the probabilities for wet/dry days since the first day.

Best Answer

More completely:

Given $D_n$ as the event of a day $n$ being dry, and $W_n$ being the complementary event of it being wet that day.

Your matrix should be defined thus: $P_i = \begin{bmatrix}P(D_n \mid D_{n-i}) & P(W_n \mid D_{n-i}) \\ P(D_n \mid W_{n-i}) & P(W_n \mid W_{n-i})\end{bmatrix}, \forall n$

Now by the law of total probability: $$P(D_n \mid D_{n-i}) = P(D_n \mid D_{n-1})P(D_{n-1}\mid D_{n-i})+P(D_n \mid W_{n-1})P(W_{n-1}\mid D_{n-i})\\P(D_n \mid W_{n-i}) = P(D_n \mid D_{n-1})P(D_{n-1}\mid W_{n-i})+P(D_n \mid W_{n-1})P(W_{n-1}\mid W_{n-i})\\P(W_n \mid D_{n-i}) = P(W_n \mid D_{n-1})P(D_{n-1}\mid D_{n-i})+P(W_n \mid W_{n-1})P(W_{n-1}\mid D_{n-i})\\P(W_n \mid W_{n-i}) = P(W_n \mid D_{n-1})P(D_{n-1}\mid W_{n-i})+P(W_n \mid W_{n-1})P(W_{n-1}\mid W_{n-i})$$

So it follows $P_i = P_1 P_{i-1} = P_1^i$

$$P_i = \begin{bmatrix}0.8 & 0.2 \\ 0.4 & 0.6\end{bmatrix}^i$$

So: $$\begin{align} \because P(D_2\mid D_0) & = P(D_2\mid D_1)P(D_1\mid D_0) + P(D_2\mid W_1)P(W_1\mid D_0) \\ & = 0.72 \\ \ldots \\[2ex]\therefore P_2 & = \begin{bmatrix}0.8 & 0.2 \\ 0.4 & 0.6\end{bmatrix}^2 \\[1ex] & = \begin{bmatrix}0.8 & 0.2 \\ 0.4 & 0.6\end{bmatrix}\begin{bmatrix}0.8 & 0.2 \\ 0.4 & 0.6\end{bmatrix} \\[1ex] & = \begin{bmatrix}0.8\times 0.8+ 0.2\times 0.4 & 0.8\times 0.2 + 0.2\times 0.6 \\ 0.4\times 0.8 + 0.6\times 0.4 & 0.4\times 0.2 + 0.6\times 0.6\end{bmatrix} \\[1ex] & = \begin{bmatrix}0.72 & 0.28 \\ 0.56 & 0.44\end{bmatrix} \end{align}$$

and so forth

Hint: Also $P_4=P_2^2$