Analyze DAU comments distribution and resampling

Read the full interview experience this question came from →

Quick Overview

This question evaluates a candidate's competency in statistical modeling of count data, resampling and bootstrap inference, summary-statistic interpretation, and numeric aggregation/stability considerations within the Statistics & Math domain for a data scientist role.

Analyze DAU comments distribution and resampling

Company: Meta

Role: Data Scientist

Category: Statistics & Math

Difficulty: medium

Interview Round: Onsite

Consider the metric comments_per_DAU (number of comments a daily active user makes in a day). a) Shape: Describe and justify the expected distribution of comments_per_DAU across users on a given day (e.g., zero-inflation, skew/heavy tail). Is the variable discrete or continuous? What are reasonable parametric families to consider (e.g., Poisson vs Negative Binomial), and why might Poisson be inadequate? b) Bootstrapping: You repeatedly resample n=10,000 users with replacement from that day’s user list and compute the sample mean, repeating this 100,000 times. Describe the bootstrap distribution’s shape and center. Under what conditions will it be approximately normal, and when might it remain skewed? What is the relationship between its standard deviation and the population variance σ²? c) Scaling n: If you increase n from 10,000 to 20,000, how (quantitatively) does the width of the bootstrap distribution of the mean change? State the factor and the intuition. d) Summary stats: For this metric, compare mean, median, mode, and p95. Which is most stable, which is most decision-relevant, and why might the mode be 0? How do you interpret and compute p95 for a discrete count variable (e.g., tie handling, integer vs real thresholds)? e) Data types and aggregation: The per-user value is an integer, but the mean across users is a real number. Explain pitfalls from storing as integer vs float at different aggregation levels (e.g., truncation, rounding bias, overflow) and how you’d ensure numeric stability when computing large-day aggregates. f) Estimation: Suppose the per-user variance is overdispersed (Var > Mean). Write the approximate standard error of the sample mean and discuss when you’d prefer robust estimators (trimmed mean, Winsorization) or variance reduction techniques (CUPED with a prior-day covariate).

Overview: This question evaluates a candidate's competency in statistical modeling of count data, resampling and bootstrap inference, summary-statistic interpretation, and numeric aggregation/stability considerations within the Statistics & Math domain for a data scientist role.

Read the full Meta Data Scientist interview experience this question came from

Community answers

Answer by SS

(a) Shape of comments_per_DAU Type of variable Discrete integer count variable (0, 1, 2, 3, … comments) Expected distribution shape Strong right skew Most users: 0 comments 1 comment Few power users: 10, 50, 100+ comments 👉 So distribution has a long right tail Zero inflation A large fraction of users may have: exactly 0 comments So we often see: spike at 0 then rapid decay + long tail Good candidate distributions Poisson (baseline) X \sim \text{Poisson}(\lambda), \quad P(X=k)=\frac{\lambda^k e^{-\lambda}}{k!} Why it’s attractive: models counts simple Why it fails: assumes ( \text{Var} = \text{Mean} ) real data has: heavy tail overdispersion many zeros Negative Binomial (better fit) \text{Var}(X) = \mu + \frac{\mu^2}{k} Why better: allows Var > Mean handles heavy-tailed users Zero-inflated models (best realistic) mixture of: “inactive users” (always 0) “active users” (Poisson/NB) (b) Bootstrap distribution You resample: 10,000 users compute mean repeat 100,000 times Shape of bootstrap distribution Center: \mathbb{E}[\bar{X}] = \mu So it is centered at the true sample mean Shape: depends on original data Case 1: “nice enough” distribution large n mild skew 👉 Bootstrap mean ≈ Normal distribution Case 2: heavy skew / zero inflation long tail users rare viral commenters 👉 Bootstrap mean: still centered correctly but may be: slightly skewed heavy-tailed not perfectly normal When does CLT kick in? Approx normal if: large n (10k helps a lot) finite variance no extreme dominance b
|Home/Statistics & Math/Meta
Meta logo
Meta
Oct 13, 2025
mediumData ScientistOnsiteStatistics & Math
8
0

Consider the metric comments_per_DAU (number of comments a daily active user makes in a day).

a) Shape: Describe and justify the expected distribution of comments_per_DAU across users on a given day (e.g., zero-inflation, skew/heavy tail). Is the variable discrete or continuous? What are reasonable parametric families to consider (e.g., Poisson vs Negative Binomial), and why might Poisson be inadequate?

b) Bootstrapping: You repeatedly resample n=10,000 users with replacement from that day’s user list and compute the sample mean, repeating this 100,000 times. Describe the bootstrap distribution’s shape and center. Under what conditions will it be approximately normal, and when might it remain skewed? What is the relationship between its standard deviation and the population variance σ²?

c) Scaling n: If you increase n from 10,000 to 20,000, how (quantitatively) does the width of the bootstrap distribution of the mean change? State the factor and the intuition.

d) Summary stats: For this metric, compare mean, median, mode, and p95. Which is most stable, which is most decision-relevant, and why might the mode be 0? How do you interpret and compute p95 for a discrete count variable (e.g., tie handling, integer vs real thresholds)?

e) Data types and aggregation: The per-user value is an integer, but the mean across users is a real number. Explain pitfalls from storing as integer vs float at different aggregation levels (e.g., truncation, rounding bias, overflow) and how you’d ensure numeric stability when computing large-day aggregates.

f) Estimation: Suppose the per-user variance is overdispersed (Var > Mean). Write the approximate standard error of the sample mean and discuss when you’d prefer robust estimators (trimmed mean, Winsorization) or variance reduction techniques (CUPED with a prior-day covariate).

Loading comments...