Find the transition probability matrix. Check the answer.

markov chainsprobabilitystochastic-processes

A coin is tossed continuously until 2 heads or 2 tails appear respectively. Let the result of first toss is tail. The game is over when we get 2 heads respectively.

Determine the transition probability matrix.

Check my answer is correct or not.

Let $X_n$ denote the number of tail that appear.
Let the state $S=\{0,1,2\}$.

So, the transition probability matrix is
$$P=
\begin{bmatrix}
1&0&0\\
0&\dfrac{1}{2}&\dfrac{1}{2}\\
0&0&1
\end{bmatrix}.
$$

Best Answer

I think in this case you need to have 4 states: state 2 tails, state tail, state head and state 2 heads which I will call states 1,2,3 and 4 respectively.

$$P= \begin{bmatrix} 1&0&0&0\\ \dfrac{1}{2}&0&\dfrac{1}{2}&0\\ 0&\dfrac{1}{2}&0&\dfrac{1}{2}\\ 0&0&0&1 \end{bmatrix}. $$

If I understand you correctly you keep playing until you get either two heads or two tails. Then, states 1 and 4 are absorbing states.

Then when you are in state 2 (got a tail) then you can jump after the coin flip to either state 1 (two tail flips) or state 3 (one head).

If you start with a tail then your initial state probability vector $\pi$ would be

$$\pi= \begin{bmatrix} 0\\ 1\\ 0\\ 0 \end{bmatrix}. $$