PracHub
QuestionsLearningGuidesInterview Prep
|Home/Statistics & Math/Yahoo

Calculate Expected Flips for Heads-Tails Sequence

Last updated: Mar 29, 2026

Quick Overview

This interview question evaluates statistical assumptions, formulas, estimation strategy, uncertainty, edge cases, and interpretation in a realistic interview setting. A strong answer for Calculate Expected Flips for Heads-Tails Sequence states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.

  • easy
  • Yahoo
  • Statistics & Math
  • Data Scientist

Calculate Expected Flips for Heads-Tails Sequence

Company: Yahoo

Role: Data Scientist

Category: Statistics & Math

Difficulty: easy

Interview Round: Technical Screen

##### Scenario Product manager asks a quick probability check during a design review to gauge statistical intuition. ##### Question You flip a fair coin repeatedly until the sequence Heads–Tails (HT) appears consecutively. What is the expected number of flips required? ##### Hints Model as states: start, last flip H, and absorbing HT; use expected value equations.

Quick Answer: This interview question evaluates statistical assumptions, formulas, estimation strategy, uncertainty, edge cases, and interpretation in a realistic interview setting. A strong answer for Calculate Expected Flips for Heads-Tails Sequence states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.

Related Interview Questions

  • Prove Equal Probability Impossible with Relabeled Dice Faces - Yahoo (medium)
|Home/Statistics & Math/Yahoo

Calculate Expected Flips for Heads-Tails Sequence

Yahoo logo
Yahoo
Aug 4, 2025, 10:55 AM
easyData ScientistTechnical ScreenStatistics & Math
1
0

Calculate Expected Flips for Heads-Tails Sequence

Probability Check — Waiting Time for HT

Setup

  • You repeatedly flip a fair coin (independent flips; P(H)=P(T)=1/2).
  • Stop as soon as the consecutive pattern HT appears for the first time.

Question

What is the expected total number of flips required until HT first appears?

Hint: Model states as Start (no useful last flip), H (last flip was H), and an absorbing state (HT seen). Set up and solve expected-value equations.

Constraints & Assumptions

  • Preserve the scope, facts, inputs, and requested outputs from the prompt above.
  • If the prompt leaves a detail unspecified, state a reasonable assumption before relying on it.
  • Keep the answer interview-ready: concise enough to present, but concrete enough to implement or evaluate.

Clarifying Questions to Ask Guidance

  • Clarify the random variables, distributional assumptions, independence assumptions, and desired output.
  • Show enough derivation for the interviewer to follow the reasoning.
  • Explain how you would validate the result with simulation or sensitivity checks.

What a Strong Answer Covers Guidance

  • A correct setup with definitions, formulas, and boundary conditions.
  • A step-by-step derivation or estimation plan.
  • Interpretation of the result, including uncertainty and practical limitations.
  • Checks for assumptions, edge cases, and numerical stability.

Follow-up Questions Guidance

  • How would the result change if the assumptions were relaxed?
  • Can you verify the answer with a simulation?
  • What is the most likely source of estimation error?
Loading comments...

Browse More Questions

More Statistics & Math•More Yahoo•More Data Scientist•Yahoo Data Scientist•Yahoo Statistics & Math•Data Scientist Statistics & Math

Write your answer

Your first approved answer each day earns 20 XP.

Sign in to write your answer.
PracHub

Master your tech interviews with 9,000+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • AI Coding Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.