Expected number of trials until consecutive fail and two successes (FSS) for Bernoulli trial

expected valueprobability

Consider a Bernoulli trial with the probability of success $p$. The probability of failure is $q=1-p$.

To find the expected number of trials to get consecutive fail and two successes (F-S-S).

In the book "A first course in Probability" by Sheldon Ross, the following formula to calculate the probability of a run of $m$ failures before a run of $n$ successes has been stated

$$P(\text{run of m failures before a run of n succeses})= \frac{q^{m-1}(1-p^n)}{q^{m-1}+p^{n-1}-q^{m-1}p^{n-1}}$$

For example, consider $m = 1$, $n = 2$, and $p=0.5$. Then number of trials required are calculated by $1/P$. I get $1.33$. I understand that this answer is logically wrong (we need at least 3 trials to get F-S-S) but I am struggling to understand why.

Best Answer

We can model this as an absorbing Markov chain with transition matrix

$$ P=\left( \begin{array}{cccc} p & 1-p & 0 & 0 \\ 0 & 1-p & p & 0 \\ 0 & 1-p & 0 & p \\ 0 & 0 & 0 & 1 \\ \end{array} \right). $$ Write $$ P = \begin{pmatrix}Q&R\\\mathbf 0&I\end{pmatrix} $$ where $Q$ is the submatrix of $P$ corresponding to transitions between transient states and $R$ the submatrix of $P$ corresponding to transitions from transient states to the absorbing tahte. Then the expected number of steps before being absorbed when starting in transient state $i$ is given by the $i^{\mathrm{th}}$ entry of $N\mathbf 1$, where $$ N := \sum_{k=0}^\infty Q^k = (I-Q)^{-1}. $$ A straightforward computation yields the result, $$ \frac1{p^2(1-p)}. $$

Related Question