Calculate Expected Flips for Heads-Tails Sequence
Problem: Expected Flips for HT Sequence
You are asked to determine the expected total number of flips required until the consecutive pattern "HT" appears for the first time.
Setup
- You repeatedly flip a fair coin (independent flips; P(H)=P(T)=1/2).
- The process stops as soon as the consecutive pattern "HT" appears for the first time.
Hint
To approach this, consider modeling the problem using states:
- Start: No useful last flip.
- H: The last flip was H, and we are waiting for T.
- HT Seen: An absorbing state where the pattern "HT" has been observed.
Set up and solve a system of expected-value equations based on these states.
AI interview prep
Core dilemma
Effectively modeling a sequential probabilistic process with an absorbing state to calculate expected values, balancing mathematical rigor with clarity of state definition.
2 tradeoffs and 3 stress tests locked
Interview prep
Unlock the interviewer X-Ray rubric, tradeoff matrix, stress tests, clarifying questions, and key concepts.
Calculate Expected Flips for Heads-Tails Sequence
Problem: Expected Flips for HT Sequence
You are asked to determine the expected total number of flips required until the consecutive pattern "HT" appears for the first time.
Setup
- You repeatedly flip a fair coin (independent flips; P(H)=P(T)=1/2).
- The process stops as soon as the consecutive pattern "HT" appears for the first time.
Hint
To approach this, consider modeling the problem using states:
- Start: No useful last flip.
- H: The last flip was H, and we are waiting for T.
- HT Seen: An absorbing state where the pattern "HT" has been observed.
Set up and solve a system of expected-value equations based on these states.