Estimate Total Daily LIVE Sessions From a Few Sequential IDs
Last updated: November 29, 2026
Quick Overview
LIVE sessions get sequential integer IDs starting at 1 each day. A partner sees four sessions chosen uniformly at random with IDs 17, 42, 63 and 88. Estimate how many sessions were created that day and give a sense of the uncertainty.
TikTok
November 29, 20260
0
0 solved
LIVE sessions get sequential integer IDs starting at 1 each day. A partner sees four sessions chosen uniformly at random with IDs 17, 42, 63 and 88. Estimate how many sessions were created that day and give a sense of the uncertainty.
This is the German tank problem, used in TikTok data science onsites to check estimation fundamentals beyond A/B testing. The interviewer wants you to derive an unbiased estimator from the sample maximum, compare it to naive estimates, and discuss assumptions that rarely hold with real ID schemes.
What the Interviewer Expects
- Explains why the sample maximum is a sufficient statistic here
- Derives the unbiased estimator m(1 + 1/k) - 1
- Contrasts with naive estimators such as the maximum or twice the mean
- Gives an approximate standard error or interval
- Questions the assumptions: uniform sampling, contiguous IDs, no gaps
Key Topics to Cover
How to Approach This
- Define your hypotheses (H0 and H1) clearly before performing any test.
- Calculate required sample size BEFORE running an experiment, using power analysis.
- Remember the Central Limit Theorem: sample means become approximately normal with large n.
- Watch for Simpson's paradox. Always segment data by key dimensions.
- Distinguish between statistical significance and practical significance.
Possible Follow-up Questions
- What estimator would you use if IDs started at an unknown offset?
- How would you build a 95% confidence interval for N?
- What is the Bayesian answer with a flat prior on N?
- How could TikTok prevent competitors from inferring volumes this way?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Browse Statistics QuestionsSample Answer
Clarify
IDs are 1 to N with no gaps, and the k = 4 observed sessions are a uniform random sample without replacement. We want an estimate of N. Observed maximum m = 88....
Approach
The maximum carries the information: given m, the other observed values are uniform below it and say nothing more about N. The maximum underestimates N, since it is always at most N. Picture the k sam...