PracHub
QuestionsPremiumLearningGuidesInterview PrepNEWCoaches
|Home/Statistics & Math/Upstart

Calculate Expected Streaks in Coin Toss Sequence

Last updated: Apr 20, 2026

Quick Overview

This question evaluates understanding of probability theory and expected-value reasoning in discrete stochastic processes, specifically reasoning about runs or streak counts in repeated Bernoulli trials.

  • easy
  • Upstart
  • Statistics & Math
  • Data Scientist

Calculate Expected Streaks in Coin Toss Sequence

Company: Upstart

Role: Data Scientist

Category: Statistics & Math

Difficulty: easy

Interview Round: Onsite

##### Scenario Tech interview round 1 – probability puzzle about streaks ##### Question We toss a fair coin 1,000 times. Each time the outcome differs from the previous toss, a new streak begins (the first toss also starts a streak). What is the expected number of streaks? Generalise the expected streak count when the coin shows heads with probability p. ##### Hints Indicator for change between toss i and i+1; linearity of expectation.

Quick Answer: This question evaluates understanding of probability theory and expected-value reasoning in discrete stochastic processes, specifically reasoning about runs or streak counts in repeated Bernoulli trials.

Related Interview Questions

  • Correct length-biased sampling from family-size survey - Upstart (easy)
  • Compute decay, OLS, and classic probability results - Upstart (easy)
  • Solve core probability/statistics mini-problems - Upstart (medium)
  • Combine noisy thermometers; compute random-walk correlations - Upstart (easy)
  • Analyze HT vs HH stopping-time probabilities - Upstart (medium)
Upstart logo
Upstart
Aug 4, 2025, 10:55 AM
Data Scientist
Onsite
Statistics & Math
27
0

Expected Number of Streaks in Coin Tosses

Scenario

You toss a coin repeatedly. A "streak" (a run) begins on the first toss and whenever the current toss differs from the immediately previous toss.

Task

  1. For 1,000 tosses of a fair coin, compute the expected number of streaks.
  2. Generalize the expected number of streaks for a biased coin where the probability of heads is p.

Assumptions: Tosses are independent; a streak starts on the first toss.

Hints

  • Use an indicator for a change between toss i and i+1.
  • Apply linearity of expectation.

Solution

Show

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

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

Master your tech interviews with 7,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.