Counting HHHHHHTTTTTT runs in a million flips
Question
A fair coin is flipped one million times. On average, how many times does the exact pattern of six consecutive heads immediately followed by six consecutive tails appear (overlapping occurrences counted, though this pattern cannot overlap itself)?
Short answer
About . The pattern has length , so it can start at positions, each with probability . By linearity of expectation the mean count is .
Adapted from Joshi, Denson & Downes, Quant Job Interview Questions and Answers, Q3.12, p.81; question and answer rewritten by SelfMadeQuant.com.
See the hint and the full worked solution in the question bank (free account).
Open the worked solutionLessons behind this question
- Expectation, Mean, and Variance
- Conditional Expectation and Variance Revisited
- Sample Spaces, Events, and the Probability Axioms
Start with a free lesson: Expectation, Variance and Covariance is part of a free topic. Create a free account, no card needed, to read it in full with worked solutions.
Read it free