0

The experiment goes like this.

The coin is tossed repeatedly and independently until two successive tails are obtained. And the probability of getting a head is $p$. Let $q_n$ be the probability that we stop at $n^{th}$ coin toss.

What is the recursion for $q_n$?

StubbornAtom
  • 17,052
Dev
  • 133
  • here is a near duplicate. The problem there calls for the expected number of tosses, but the analysis is similar. – lulu Feb 06 '21 at 22:49

2 Answers2

1

Let $q=1-p$. Clearly $q_1=0$ and $q_2=q^2$. Now consider $n>2$. If the first toss yields heads, you are left with $n-1$ tosses. If the first toss yields tails, examine the second toss. This must yield heads in order for the first pair of consecutive tails to occur at time $n$. Thus for $n>2$, $$q_n=p\cdot q_{n-1}+q\cdot p \cdot q_{n-2} \,.$$

Yuval Peres
  • 21,955
0

Let $\{X_n:n=0,1,2,\ldots\}$ be a Markov chain on $\{0,1,2\}$ with initial distribution $\alpha = \begin{pmatrix}1&0&0\end{pmatrix}$ and transition matrix $$ P = \begin{pmatrix} 1-q & q & 0\\ 1-q & 0 & q\\ 0 & 0 & 1 \end{pmatrix}. $$ This is a terminating Markov chain, i.e. one in which all states are transient except for one which is absorbing. We can write $P$ as $$ P = \begin{pmatrix} T & \mathbf T^0\\ \mathbb 0 & 1 \end{pmatrix}, $$ where $T$ is the substochastic matrix corresponding to transitions between transient states and $\mathbf T^0$ the (row) vector corresponding to transitions from transient states to the absorbing states. Let $\tau = \inf\{n:X_n=2\}$, then the distribution of $\tau$ is \begin{align} \mathbb P(\tau = k) &= \alpha T^{k-1}\mathbf T^0\\ &= \frac{q^2 \left(\left(1-q+\sqrt{q (2-3 q)+1}\right)^k-\left(1-q-\sqrt{q (2-3 q)+1}\right)^k\right)}{2^k\sqrt{q (2-3 q)+1}}. \end{align}

Math1000
  • 36,983