PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Statistics & Math/Yahoo

Calculate Expected Flips for Heads-Tails Sequence

Last updated: Mar 29, 2026

Quick Overview

This question evaluates a candidate's proficiency in probability theory and stochastic-process reasoning, including Markov-style state modeling and expected-value analysis for stopping times.

  • 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 question evaluates a candidate's proficiency in probability theory and stochastic-process reasoning, including Markov-style state modeling and expected-value analysis for stopping times.

Related Interview Questions

  • Prove Equal Probability Impossible with Relabeled Dice Faces - Yahoo (medium)
Yahoo logo
Yahoo
Aug 4, 2025, 10:55 AM
Data Scientist
Technical Screen
Statistics & Math
1
0

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.

Solution

Show

Submit Your Answer

Sign in to leave a comment

Loading comments...

Browse More Questions

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

Master your tech interviews with 8,500+ real questions from top companies.

Product

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

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL 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.