JEEOlympiad

A fair coin is flipped repeatedly. Let X be the number of flips up to…

Question

A fair coin is flipped repeatedly. Let X be the number of flips up to and including the flip on which heads appears for the third time. Given that the third head occurs on an even-numbered flip (X is even), the conditional expectation E[X | X even] equals m/n in lowest terms. Find m+n.

✓ Verified answer: 93checked by our engine — not a guess

Step-by-step solution

X follows a negative binomial law: P(X = k) = C(k-1, 2) (1/2)^k for k >= 3 (the last flip is the 3rd head; among the first k-1 flips exactly 2 are heads).

We restrict to even k = 2m, m >= 2 (smallest even value >= 3 is 4). Define
D = sum_{m>=2} C(2m-1, 2)(1/2)^{2m} (= P(X even)),
Nu = sum_{m>=2} (2m) C(2m-1, 2)(1/2)^{2m} (= E[X; X even]).

Use generating functions.

With P(X=k)=C(k-1,2)x^k summed gives x^3/(1-x)^3 (for the full distribution at x=1/2 it equals 1).
To split into even/odd, evaluate the moment generating pieces at x = 1/2 and x = -1/2:
- Full prob = sum_k C(k-1,2)(1/2)^k = 1.
- Alternating sum sum_k C(k-1,2)(-1/2)^k = (-1/2)^3/(1-(-1/2))^3 = (-1/8)/(27/8) = -1/27.
P(X even) = (1 + (-1/27))/2 = (26/27)/2 = 13/27.
For the first moment, use g(x) = sum_k k C(k-1,2) x^k = x d/dx [x^3/(1-x)^3] ...

evaluate.

The full mean E[X] = 6 (negative binomial mean r/p with r=3,p=1/2).

The signed first moment S = sum_k k C(k-1,2)(-1/2)^k: differentiating x^3/(1-x)^3 gives x(3x^2(1-x)^3 + x^3*3(1-x)^2)/(1-x)^6 = x*3x^2(1-x+x)/(1-x)^4 = 3x^3/(1-x)^4; multiply by the extra x from x d/dx so first moment generator = 3x^3/(1-x)^4.

At x = -1/2: 3(-1/8)/(3/2)^4 = (-3/8)/(81/16) = (-3/8)(16/81) = -6/81 = -2/27.
At x = 1/2 it gives E[X] = 3(1/8)/(1/2)^4 = (3/8)/(1/16) = 6 (consistent).
E[X; X even] = (E[X] + S)/2 = (6 + (-2/27))/2 = (160/27)/2 = 80/27.
Therefore E[X | X even] = (80/27)/(13/27) = 80/13.
m+n = 80 + 13 = 93.

Final answer93

Stuck on a problem like this?

Paste any JEE or NEET question — verified working, a confidence %, and an honest “not sure” instead of a bluff.

Solve my doubt →

More Probability solutions