Expected Hours Until Two Consecutive Surge Hours
Last updated: November 29, 2026
Quick Overview
Each hour, an area is independently in surge with probability p. What is the expected number of hours until you first observe two surge hours in a row? Solve for p = 1/2 and in general.
Uber
November 29, 20260
0
0 solved
Each hour, an area is independently in surge with probability p. What is the expected number of hours until you first observe two surge hours in a row? Solve for p = 1/2 and in general.
Markov chain expectations are a staple of harder Uber statistics rounds, and the pattern-waiting framing comes up when reasoning about streaks in marketplace states. The interviewer checks state definitions, first-step analysis and a sanity check by simulation.
What the Interviewer Expects
- Define states by the length of the current surge streak
- Write first-step equations
- Solve for p = 1/2 to get 6
- Derive the general formula (1 + p) / p^2
- Validate with a quick simulation
Key Topics to Cover
How to Approach This
- Define your hypotheses (H0 and H1) clearly before performing any test.
- Calculate required sample size BEFORE running an experiment, using power analysis.
- Remember the Central Limit Theorem: sample means become approximately normal with large n.
- Watch for Simpson's paradox. Always segment data by key dimensions.
- Distinguish between statistical significance and practical significance.
Possible Follow-up Questions
- What is the expected wait for surge then no surge (SN) instead?
- Why do SS and SN have different waiting times with the same probability?
- How would autocorrelation between hours change the answer?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Browse Statistics QuestionsSample Answer
Clarify
Hours are independent, , . We count hours until the second consecutive S is observed, including it....
Approach
States: = expected remaining hours when the last hour was N (or at start); = expected remaining hours when the last hour was S (streak of 1).
$E_1 = 1 + p \cdot...