Let the random variable X represent the number of times a fair coin needs to be tossed till two consecutive heads appear for the first time. The expectation of X is .
Show the worked solutionLet \(E_0\) be the expected number of further tosses from the start (or just after a tail) and \(E_1\) just after a head:\[\boxed{E_0=1+\tfrac12E_1+\tfrac12E_0,\qquad E_1=1+\tfrac12\cdot0+\tfrac12E_0}\]The first gives \(E_0=2+E_1\); substituting the second, \(E_0=3+\frac12E_0\), so \(E_0=6\).(\(P(X=n)\) is not \(2^{-n}\): sequences ending in the first HH are counted by Fibonacci numbers, \(P(X=n)=F_{n-1}/2^n\).)Answer: 6
GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com