PracHub
QuestionsCoachesLearningGuidesInterview Prep
|Home/Statistics & Math/Meta

Calculate Ad Insertion Statistics for Two Methods

Last updated: Mar 29, 2026

Quick Overview

Meta statistics prompt comparing two ad-insertion strategies, covering binomial moments, deterministic quotas, tail probability for excessive ads, adjacent ad pairs, and risk of long ad runs.

  • medium
  • Meta
  • Statistics & Math
  • Data Scientist

Calculate Ad Insertion Statistics for Two Methods

Company: Meta

Role: Data Scientist

Category: Statistics & Math

Difficulty: medium

Interview Round: Onsite

##### Scenario Comparing two ways of inserting ads in a 100-post news feed ##### Question Option A: each post independently becomes an ad with probability 4%. Option B: exactly 1 out of every 25 posts is an ad. For each option, compute the expected number and variance of ads in 100 posts. For each option, what is the probability of showing more than twice the expected number of ads? For each option, estimate the expected count of adjacent ad pairs and determine which option is more likely to create long runs of ads. ##### Hints Use binomial moments for A, deterministic counts for B, normal tail approximation, and (n− 1)p² for adjacent-pair expectation.

Quick Answer: Meta statistics prompt comparing two ad-insertion strategies, covering binomial moments, deterministic quotas, tail probability for excessive ads, adjacent ad pairs, and risk of long ad runs.

Related Interview Questions

  • Compute probability an account is fake - Meta (easy)
  • Compute Bayes probability for fake accounts - Meta (easy)
  • Compute probabilities for chatbot response quality - Meta (easy)
  • Compute posterior fake probability using Bayes' rule - Meta (medium)
  • Estimate bots and CI from DAU spike - Meta (medium)
|Home/Statistics & Math/Meta

Calculate Ad Insertion Statistics for Two Methods

Meta logo
Meta
Jul 12, 2025, 6:59 PM
mediumData ScientistOnsiteStatistics & Math
72
0

Ad Insertion Statistics for Two Feed Strategies

You are comparing two ways of inserting ads into a 100-post feed.

  • Option A: Each post independently becomes an ad with probability p = 0.04 .
  • Option B: Exactly 1 out of every 25 posts is an ad, so there are exactly 4 ads in 100 posts.

For Option B, if positions are not fixed, assume each 25-post block contains exactly one ad whose position is chosen uniformly at random and independently across blocks. If the positions are fixed, call out how that changes adjacency.

Constraints & Assumptions

  • Use the stated 100-post feed and 4% ad probability.
  • Define "more than twice the expected number" as strictly more than 8 ads.
  • Define an adjacent ad pair as positions i and i+1 both being ads.
  • Explain both expected counts and user-experience risk from variance or long runs.

Clarifying Questions to Ask

  • Are the exact ad positions fixed in Option B or random within each block?
  • Are blocks independent?
  • Do we care only about total ad count or also local clustering and long ad runs?

What a Strong Answer Covers

  • Option A ad count is Binomial(100, 0.04) with expected value 4 and variance 3.84.
  • Option B has deterministic total count 4 and variance 0.
  • Option A has a nonzero probability of more than 8 ads; Option B has probability 0.
  • Adjacent-pair expectation for Option A is approximately (99) * p^2 .
  • For random-in-block Option B, adjacency can occur mainly across block boundaries; for fixed every-25th placement it can be eliminated.
  • Option A is more likely to create long runs because placements are independent and unbounded locally.

Follow-up Questions

  • How would you compute the exact binomial tail for Option A?
  • Which option creates a better user experience if users dislike ad clusters?
  • How would you design a hybrid strategy that controls count and spacing?
Loading comments...

Browse More Questions

More Statistics & Math•More Meta•More Data Scientist•Meta Data Scientist•Meta Statistics & Math•Data Scientist Statistics & Math

Write your answer

Your first approved answer each day earns 20 XP.

Sign in to write your answer.
PracHub

Master your tech interviews with 8,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • AI Coding Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.