Placing Three Mid-Roll Ad Breaks So None Fall in Neighboring Slots

Last updated: November 29, 2026

Quick Overview

A Facebook in-stream video has 10 candidate mid-roll slots in a row, and 3 are chosen for ad breaks. How many choices leave no two breaks in neighboring slots, what is the probability a uniformly random choice satisfies this, and what is the expected number of neighboring pairs?

Meta
Statistics & Math
Data Scientist
Meta
November 29, 2026
Data Scientist
Technical Screen
Statistics & Math
Medium

0

0

0 solved


A Facebook in-stream video has 10 candidate mid-roll slots in a row, and 3 are chosen for ad breaks. How many choices leave no two breaks in neighboring slots, what is the probability a uniformly random choice satisfies this, and what is the expected number of neighboring pairs?

Meta's video ads teams care about ad pacing because back-to-back breaks hurt viewer retention, and simulations of break placement come down to counting. The interviewer tests the gap (stars and bars) argument for non-adjacent selections and linearity of expectation for the pair count.

What the Interviewer Expects
  • Maps non-adjacent choices to choices from n - k + 1 items
  • Computes C(8,3) = 56 and the probability 56/120
  • Computes expected neighboring pairs with indicators
  • Cross checks with brute force or a small case
  • Discusses the circular version or minimum-gap generalization
Key Topics to Cover
Non-adjacent selections
Stars and bars
Indicator variables
Brute-force verification
Ad pacing
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 many choices keep at least 2 empty slots between breaks?
  • What if slots are on a loop, like a looping Reels video?
  • Is the number of neighboring pairs approximately Poisson here?
  • How would you sample uniformly from non-adjacent placements?
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

Slots 1,…,101,\dots,10 in a line. A choice is a 3-subset; neighboring means consecutive indices. The random choice is uniform over all (103)=120\binom{10}{3}=120 subsets....

Approach

Gap argument: if chosen slots are s1<s2<s3s_1<s_2<s_3 with si+1−si≥2s_{i+1}-s_i\ge2, map them to ti=si−(i−1)t_i=s_i-(i-1), which are distinct values in 1..81..8 with no constraint. This is a bijection, so the count is $\bino...


Submit Your Answer
Markdown supported