Expected Uploads Until Random Sizes Exceed One Gigabyte

Last updated: November 29, 2026

Quick Overview

Upload sizes are independent and uniform between 0 and 1 GB. On average, how many uploads does it take until their cumulative size first exceeds 1 GB?

Meta
Statistics & Math
Data Scientist
Meta
November 29, 2026
Data Scientist
Onsite
Statistics & Math
Hard

0

0

0 solved


Upload sizes are independent and uniform between 0 and 1 GB. On average, how many uploads does it take until their cumulative size first exceeds 1 GB?

A harder expected value puzzle used in Meta onsites for data scientists with strong math backgrounds. The interviewer wants you to find $P(N > n)$ via the volume of a simplex and recognize the series for $e$, rather than guessing 2.

What the Interviewer Expects
  • Define N and use the tail-sum formula $E[N] = \sum P(N > n)$
  • Show $P(U_1 + \dots + U_n \le 1) = 1/n!$
  • Sum the series to get $e \approx 2.718$
  • Verify by simulation
  • Explain why the naive guess of 2 is too low
Key Topics to Cover
Tail-sum formula
Simplex volume
Series for e
Uniform sums
How to Approach This
  1. Define your hypotheses (H0 and H1) clearly before performing any test.
  2. Calculate required sample size BEFORE running an experiment, using power analysis.
  3. Remember the Central Limit Theorem: sample means become approximately normal with large n.
  4. Watch for Simpson's paradox. Always segment data by key dimensions.
  5. Distinguish between statistical significance and practical significance.
Possible Follow-up Questions
  • What is the expected total size at the moment you cross 1 GB?
  • What if the threshold is t < 1 instead of 1?
  • What is P(N = 2) exactly?
  • How does the answer behave for a large threshold?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Browse Statistics Questions
Sample Answer
Clarify

Let UiU_i be iid Uniform(0,1) and N=min⁡{n:U1+⋯+Un>1}N = \min\{n : U_1 + \dots + U_n > 1\}. We want E[N]E[N]. NN is at least 2 since a single uniform never exceeds 1....

Approach

For a positive integer random variable, E[N]=∑n≥0P(N>n)E[N] = \sum_{n \ge 0} P(N > n). The event N>nN > n means the first nn uniforms sum to at most 1, which is the volume of the region ${x_i \ge 0, \sum x_i \le ...


Submit Your Answer
Markdown supported