[Math] Expected number of tosses for a biased coin with Markov chain

markov chainsprobabilityrecurrence-relations

You have a biased coin, where the probability of flipping a head is 0.70. You flip once, and the coin comes up tails. What is the expected number of flips from that point (so counting that as flip #0) until the number of heads flipped in total equals the number of tails?

My approach is wrong but I don't understand why!!!

$x=0.7(1)+0.3(1+x)≈1.43$.

with 0.5 we get a head and we are done in 1 flip.
with 0.5 we get an additional tail and so we will have made 1 flip but then we will need to repeat X.

Could you please explain clearly Markov chains. I am not very good at it.

Best Answer

I have used a different method for confirmation, converting a straight line to a $2D$ lattice path.

  • Number of tosses taken has to be of the form $(2k+1)$, i.e. odd

  • $k$ can range from $0$ to $\infty$

  • in $(2k+1)$ tosses, there will be $(k+1)$ "$p\;$steps" and $\;k\;$ "$q$ steps" $(p= 0.7)$
    $$\text{Thus the formula} = \sum_{k=0}^\infty \binom{2k+1}{k+1}p^{k+1}q^k$$

Wolfram shows that the sum converges,

and confirms the answer $= 2.5$

PS: Explanation of the Formula

The basic idea is to conceive the problem as one of a $2D$ lattice path rather than a straight line.

If equality is achieved at the $(2k+1)^{\text{th}}$ toss, the first $2k$ tosses must be such that the number of heads is always strictly less than tails till that point, and equality achieved only on the last toss. The number of such arrangements is the well known Catalan Number and is equal to $\dfrac{1}{k+1}\dbinom{2k}{k}$.

Thus with equality being achieved at the $(2k+1)^{th}$ toss, the expected number of tosses is:

$$ = \sum_{k=0}^{\infty}\frac{2k+1}{k+1}\binom{2k}{k}0.7^{k+1}0.3^{k}$$

which further simplifies to the formula used in the body.

Related Question