PracHub
QuestionsPremiumLearningGuidesInterview PrepNEWCoaches
|Home/Statistics & Math/Upstart

Solve drunk-passenger probability and simulate outcome

Last updated: Apr 19, 2026

Quick Overview

This question evaluates probabilistic reasoning and stochastic-process intuition, including use of invariant arguments, closed-form derivations, statistical estimation via Monte Carlo simulation, and analysis of algorithmic time and space complexity.

  • medium
  • Upstart
  • Statistics & Math
  • Data Scientist

Solve drunk-passenger probability and simulate outcome

Company: Upstart

Role: Data Scientist

Category: Statistics & Math

Difficulty: medium

Interview Round: Technical Screen

There are n=100 passengers labeled 1..100 and 100 assigned seats labeled 1..100 on a single-aisle plane. Passenger 1 is drunk and chooses a uniformly random seat among the 100. Each subsequent passenger i (2 ≤ i ≤ 100) sits in seat i if available; otherwise they choose uniformly at random from the remaining unoccupied seats. 1) Derive a closed-form expression for the probability that passenger 100 sits in seat 100. 2) Generalize and prove your result for arbitrary n ≥ 2, giving a brief inductive or invariant-based proof. 3) Implement a Monte Carlo simulator (R or Python) that estimates this probability for n=100 with at least 1e6 trials; report the estimate, standard error, and a 95% confidence interval, and verify it agrees with theory within 0.01. 4) Discuss the time and space complexity of a naive simulation versus an optimized approach that tracks only the two boundary seats.

Quick Answer: This question evaluates probabilistic reasoning and stochastic-process intuition, including use of invariant arguments, closed-form derivations, statistical estimation via Monte Carlo simulation, and analysis of algorithmic time and space complexity.

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
Oct 13, 2025, 9:49 PM
Data Scientist
Technical Screen
Statistics & Math
13
0

Lost Boarding Pass Puzzle: Last Passenger's Seat

Context: Technical screen for a Data Scientist (Statistics & Math).

Setup

  • There are n passengers labeled 1..n and n assigned seats labeled 1..n on a single-aisle plane.
  • Passenger 1 is drunk and chooses a uniformly random seat among the n seats.
  • Each subsequent passenger i (2 ≤ i ≤ n) sits in seat i if available; otherwise they choose uniformly at random from the remaining unoccupied seats.

Tasks

  1. For n = 100, derive a closed-form expression for the probability that passenger 100 sits in seat 100.
  2. Generalize and prove your result for arbitrary n ≥ 2, using a brief inductive or invariant-based proof.
  3. Implement a Monte Carlo simulator (R or Python) that estimates this probability for n = 100 with at least 1e6 trials. Report the estimate, its standard error, and a 95% confidence interval. Verify it agrees with theory within 0.01.
  4. Discuss the time and space complexity of a naive simulation versus an optimized approach that tracks only the two boundary seats.

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.