Random vs Quota-Based Ad Placement in a 100-Post Feed
Statistics & ExperimentsModel answerLast updated
Compare independent 4% ad placement with one-ad-per-25-post-block placement: ad count, tail risk, back-to-back ads, the product trade-off, and an A/B test plan.
Scenario
A social app wants to choose between two ways of placing ads in a feed. A user scrolls through a session of 100 slots, and each slot shows either an organic post or an ad.
- Plan Independent: every slot is turned into an ad with probability 4%, independently of all other slots.
- Plan Blocked: the 100 slots are split into 4 consecutive blocks of 25. In each block, exactly one slot, chosen uniformly at random, becomes an ad. Blocks are independent of each other.
Assume the user always scrolls all 100 slots.
Questions
- Average load. How many ads does a user see on average under each plan? What does each plan say about the spread of the ad count?
- Heavy-load tail. What is the probability of seeing more than twice the average number of ads under each plan?
- Clustering. Which plan is more likely to put ads in adjacent slots? How long can a streak of consecutive ads get under each plan?
- Back-to-back probability. What is the probability that a session contains at least one pair of adjacent ads under each plan? State any approximations you use.
- Which plan is better? Argue which plan is better for the user and which is better for the platform. Include counterarguments and possible hybrids.
- Testing it. Describe how you would run an online experiment to compare the plans. Cover randomization, metrics, guardrails, duration, and pitfalls.
Give a structured answer with numbers where you can.
Hints
Hint 1
Both plans have the same mean. The interesting differences are in the variance, the tail, and the spatial arrangement of ads.
Hint 2
For Plan Independent, the ad count is Binomial(100, 0.04). A Poisson(4) approximation is a good cross-check. For Plan Blocked, the count is a constant, so consider only where ads can sit relative to block edges.
Hint 3
In Plan Blocked, two ads can only be adjacent across a block boundary (slots 25|26, 50|51, 75|76). Use inclusion-exclusion over the three boundaries, noting that neighboring boundaries cannot both fire.
Hint 4
For the experiment, think about the unit of randomization (user, not session), realized versus intended ad load, novelty effects, and guardrail metrics such as retention and ad hides.
Model answer
Medium Try it yourself first — then compare your approach, complexity and edge cases.
Key idea
Both plans target the same average ad load. They differ in variance and in how ads are arranged. A strong answer quantifies those differences, states its assumptions, and then converts them into a product recommendation and a test plan.
Assumptions: 100 slots, p = 0.04 per slot under Plan Independent, four independent blocks of 25 with one uniformly placed ad each under Plan Blocked, and a user who always scrolls to the end.
1. Average load
- Independent: the count X ~ Binomial(100, 0.04), so E[X] = 4. The variance is 100 · 0.04 · 0.96 = 3.84 and the standard deviation is about 1.96. Roughly 1.7% of sessions (0.96^100) contain no ad at all.
- Blocked: each block contributes exactly one ad, so the count is always 4 and the variance is 0.
The means match, but only Plan Blocked guarantees the load.
2. More than twice the average (more than 8 ads)
Independent. Build the pmf with the recurrence P(k+1) = P(k) · (100−k)/(k+1) · (0.04/0.96), starting from P(0) ≈ 0.0169. The cumulative probability through k = 8 is about 0.981, so
P(X > 8) ≈ 1.9%.
Poisson(4) gives about 2.1%, which is a fine mental-math check.
Blocked. The probability is 0, since the count is always 4.
At product scale, 1.9% of sessions is a very large number of users who get more than double the intended ad load every day. Plan Blocked removes that tail entirely.
3. Clustering and longest streak
- Independent: a run of any length is possible. A run of 3 or more starting at a given slot has probability about p³, so across the session it is roughly 98 · p³ · (1−p) ≈ 0.6%. The typical longest run is about ln(96)/ln(25) ≈ 1.4, so most sessions have a longest run of 1 and some have 2.
- Blocked: each block holds one ad, so two ads can only touch across a block edge. A run of 3 would need two ads in one block, which is impossible, so the maximum streak is 2.
Plan Independent is more likely to cluster, and it is the only plan that can produce long streaks.
4. Probability of at least one adjacent pair
Independent. Let f(n) be the probability that n slots contain no two adjacent ads. Conditioning on the end of the sequence gives
f(n) = q · f(n−1) + p · q · f(n−2), with f(0) = f(1) = 1 and q = 0.96.
Solving this gives f(100) ≈ 0.858, so P(at least one pair) ≈ 14%.
A quick check: the expected number of places where a run of 2 or more begins is about 0.0016 + 98 · 0.96 · 0.0016 ≈ 0.152. Then 1 − e^(−0.152) ≈ 14%.
A common mistake is to report 99 · p² ≈ 15.8% as a probability. That is the expected number of adjacent pairs, and it double-counts longer runs.
Blocked. Only three boundaries can create a pair: 25|26, 50|51, and 75|76.
- Each boundary fires with probability (1/25) · (1/25) = 1/625. The ad in the earlier block must be in its last slot, and the ad in the later block must be in its first slot.
- Neighboring boundaries cannot both fire. For example, boundaries 1 and 2 would require block 2's single ad to sit at both slot 26 and slot 50.
- Boundaries 1 and 3 involve disjoint blocks, so both fire with probability 1/625².
By inclusion-exclusion, P = 3/625 − 1/625² ≈ 0.48%.
Plan Independent is about 30 times more likely to show a back-to-back pair.
Simplifications to state: a fixed session depth of 100 (real sessions end early, which leaves partial blocks under Plan Blocked), no ranking or quality effects on placement, and independence across blocks.
5. Which plan is better?
User view: Plan Blocked.
- It has predictable spacing, no heavy-load sessions, and almost no adjacent ads.
- Annoyance is plausibly convex in local ad density, so a cluster hurts more than the same number of evenly spread ads. Removing variance should raise average satisfaction at the same mean load.
Platform view: usually Plan Blocked as well.
- Inventory per session is predictable, which helps pacing, delivery, and forecasting.
- Overload-driven churn, hides, and reports are less likely.
- Adjacent ads compete for attention, so spacing may raise per-ad click-through.
Counterpoints worth raising:
- A fixed rhythm can teach users to scroll past ads (ad blindness).
- Plan Independent gives some users very light sessions, which may help retention for them.
- A hybrid can combine the benefits: random placement with a minimum gap, or Plan Blocked with a rule against placing ads at both sides of a block boundary.
- In production, ad slots are usually chosen by an auction or ranker under spacing constraints, not purely at random.
6. Experiment design
Hypothesis: at equal expected ad load, Plan Blocked improves user experience without reducing ad revenue.
Randomization
- Randomize by user, not by session. Ad tolerance builds up over many sessions, and per-session assignment would blend the treatments.
- If feasible, add a third arm for the hybrid (random with a minimum gap).
Metrics
| Category | Metrics |
|---|---|
| User engagement | Time spent, scroll depth, sessions per user |
| Business | Ad impressions per user, revenue per user |
| Ad quality | CTR and conversion per ad, CTR as a function of distance from the previous ad |
| Guardrails | DAU, 7-day and 28-day retention, ad hides and reports, "too many ads" survey responses, advertiser pacing |
Design details
- Duration: run for 2 to 4 weeks, and plot effects over time to separate novelty from steady state.
- Power: engagement effects are usually small (below 0.5%), so the sample must be large. Use pre-period covariates (CUPED) to reduce variance.
- Realized load: log the number of ads actually shown. Users who leave mid-block see a different load under Plan Blocked, so analyze both intent-to-treat and per-session-depth cuts.
- Interference: check that advertiser budgets are not shared in a way that lets one arm distort the other. Consider budget-split designs if they are.
- Multiple testing: pre-register the primary metrics and correct for secondary ones.
- Decision rule: ship Plan Blocked (or the hybrid) if engagement and retention are neutral or better and revenue per user is not significantly lower.
Common mistakes
- Saying the plans are equivalent because the means are equal.
- Reporting the expected count of adjacent pairs as a probability.
- Forgetting that Plan Blocked can still produce a pair across block edges.
- Randomizing by session, or ignoring retention and long-term effects.