← Meta Interview Insights

Meta·Data Scientist·Technical Phone Screen·Senior

Senior
Jun 2026

Summary

Meta data science interview with a pretty involved probability and statistics problem centered around ad feed design. One question but it had multiple parts and took up the whole session.

Questions Asked (1)

Q1

A feed has 100 posts. Strategy A randomly makes each post an ad with probability 0.04. Strategy B deterministically places exactly one ad per 25 posts with spacing to avoid adjacency. For each: compute the expected number of ads and variance; compute P(ads >= 9) exactly and via normal approximation with continuity correction; under Strategy A derive the expected number of adjacent ad pairs and approximate P(at least one adjacent pair); and finally explain which strategy is more likely to produce back-to-back ads and why.

A/B Testing & ExperimentationProduct Analytics & MetricsTechnical Trade-offs
Author's notes

This one ran long.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clearly defining the random variable for each strategy: for A, it's Binomial(100, 0.04); for B, it's a deterministic constant (4 ads). Compute mean and variance for both, then use the binomial distribution for exact probabilities and the normal approximation with continuity correction for A. For the adjacency part, model the number of adjacent ad pairs as a sum of indicator variables and use the Poisson approximation for the probability of at least one pair. Finally, compare the two strategies in terms of ad placement predictability and clustering.

Pro tip: When using the normal approximation, always apply the continuity correction (e.g., P(X ≥ 9) becomes P(X ≥ 8.5)) and explicitly state that the approximation may be poor for small n or extreme p. Also, for the adjacency probability, note that the Poisson approximation is valid because the events are rare and the dependence is weak.

1. Define random variables and compute mean/variance

For Strategy A, let X ~ Binomial(100, 0.04). Then E[X] = np = 4, Var(X) = np(1-p) = 3.84. For Strategy B, the number of ads is exactly 4, so E[Y] = 4 and Var(Y) = 0.

2. Compute exact and approximate P(ads ≥ 9)

For A: exact P(X ≥ 9) = 1 - P(X ≤ 8) using binomial CDF. Normal approximation: use continuity correction, Z = (8.5 - 4)/sqrt(3.84) ≈ 2.296, so P ≈ 0.0108. For B: P(Y ≥ 9) = 0 exactly and approximately.

3. Derive expected adjacent ad pairs for Strategy A

Let I_i be indicator that posts i and i+1 are both ads, for i=1,...,99. Then E[I_i] = p^2 = 0.0016. So expected number of adjacent pairs = 99 * 0.0016 = 0.1584.

4. Approximate P(at least one adjacent pair) for Strategy A

Use Poisson approximation with λ = 0.1584. Then P(no adjacent pairs) ≈ e^{-0.1584} ≈ 0.8535, so P(at least one) ≈ 0.1465. Alternatively, note that the events are not independent but the Poisson approximation works well for rare events.

5. Compare strategies and explain back-to-back ad likelihood

Strategy A has a non-zero probability (≈14.65%) of at least one adjacent ad pair, while Strategy B has zero because ads are spaced exactly 25 posts apart. Thus, Strategy A is more likely to produce back-to-back ads due to its random independent placement.

Key Points to Mention

  • Binomial distribution for Strategy A: X ~ Binomial(100, 0.04), mean = 4, variance = 3.84.
  • Deterministic nature of Strategy B: exactly 4 ads, variance = 0, so P(ads ≥ 9) = 0.
  • Continuity correction in normal approximation: use 8.5 for P(X ≥ 9).
  • Indicator variables for adjacent pairs: E[number of adjacent pairs] = (n-1)p^2 = 99 * 0.0016 = 0.1584.
  • Poisson approximation for rare events: λ = 0.1584, P(at least one) ≈ 1 - e^{-λ} ≈ 0.1465.
  • Comparison: Strategy A allows clustering and back-to-back ads, while Strategy B guarantees spacing and no adjacency.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.