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
Statistics & Math
Data Engineer
Meta
November 29, 2026
Data Engineer
Technical Screen
Statistics & Math
Easy

0

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
inverse probability weighting
binomial variance
sampling design
distinct counts
confidence intervals
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
  • 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 Questions
Sample Answer
Clarify
  • Each user is in the sample with probability f=0.01f = 0.01, decided by a hash of user ID, so the decision is the same every day.
  • Observed sampled active users: x=21,000x = 21{,}000.
  • Unknown true DAU: NN....
Approach

Given NN, the sampled count is X∼Binomial(N,f)X \sim \text{Binomial}(N, f). The unbiased estimator is N^=X/f\hat N = X / f (Horvitz-Thompson with equal weights). Its variance is Nf(1−f)/f2=N(1−f)/fN f (1-f) / f^2 = N(1-f)/f....


Submit Your Answer
Markdown supported