Scaling Daily Active Users From a One Percent Log Sample
Last updated: November 29, 2026
Quick Overview
A pipeline keeps a 1% Bernoulli sample of users (hashed by user ID) and observes 21,000 active users in the sample today. Estimate total DAU, give its standard error, and explain why hashing by user beats sampling 1% of events.
Meta
November 29, 20260
0
0 solved
A pipeline keeps a 1% Bernoulli sample of users (hashed by user ID) and observes 21,000 active users in the sample today. Estimate total DAU, give its standard error, and explain why hashing by user beats sampling 1% of events.
Meta's logging volume makes sampled tables common, and data engineers and data scientists are expected to reason about estimates built from them. The interviewer checks the scaled estimator, its variance, and the difference between user-level and event-level sampling.
What the Interviewer Expects
- Write the inverse-probability estimator
- Derive the binomial standard error
- Build a 95% interval
- Explain why event-level sampling biases distinct counts
- Note that hashed sampling is consistent across days
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
- How would you estimate the DAU of a small country from the same sample?
- What if the sample rate drifted to 0.9% because of a hashing bug?
- How would you estimate day-over-day change and its standard error?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Browse Statistics QuestionsSample Answer
Clarify
- Each user is in the sample with probability , decided by a hash of user ID, so the decision is the same every day.
- Observed sampled active users: .
- Unknown true DAU: ....
Approach
Given , the sampled count is . The unbiased estimator is (Horvitz-Thompson with equal weights). Its variance is ....