Katkat

Derive expectation for two consecutive heads

LinkedInData Scientist · Technical Screen

Last updated

This question evaluates mastery of probability theory and stochastic processes, specifically expectation and variance calculations, Markov-chain or recurrence reasoning, and pattern waiting times in Bernoulli trials relevant for a Data Scientist role.

Let T be the number of fair coin flips until the pattern HH (two consecutive heads) appears for the first time. (a) Derive E[T] using a state-based recursion or Markov-chain argument and give the exact numeric value. (b) Generalize E[T] for a biased coin with P(H) = p (0 < p < 1). (c) For the fair coin, derive Var(T). State all steps and justify your recurrence setup.