An infinite sequence of independent trials is to be performed. Each trial results in a success with probability $p$ and a failure with probability $1-p$. What is the probability that we see two successes in a row before we see two consecutive failures?
So far I have $$p^2+(1-p)p^2+(1-p)p^3+(1-p)^2p^3+ (1-p)^2p^4+\cdots$$
But I am not sure how to simplify this and get a proper answer in a single term.
Solution 1
Let's denote
Then
and finally after solving the above system $$P_{SS}=\frac{p^2(2-p)}{1-p(1-p)}$$
Solution 2
Given the first trial is success, the probability of 2 consecutive successes before 2 consecutive failures is $$P(SS|S_1)=p+p^2(1-p)+p^3(1-p)^2+\cdots=\frac{p}{1-p(1-p)}$$
Given the first trial is failure, the probability of 2 consecutive successes before 2 consecutive failures is $$P(SS|F_1)=p^2+p^3(1-p)+p^4(1-p)^2+\cdots=\frac{p^2}{1-p(1-p)}$$
The total probability $$P(SS)=pP(SS|S_1)+(1-p)P(SS|F_1)=\frac{p^2}{1-p(1-p)}+\frac{p^2(1-p)}{1-p(1-p)}=\frac{p^2(2-p)}{1-p(1-p)}$$