KatInterview

Random vs Quota-Based Ad Placement in a 100-Post Feed

Statistics & ExperimentsModel answer
MediumModel answerStatistics & Experimentsprobabilitybinomial-distributionab-testing

Last 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

  1. 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?
  2. Heavy-load tail. What is the probability of seeing more than twice the average number of ads under each plan?
  3. Clustering. Which plan is more likely to put ads in adjacent slots? How long can a streak of consecutive ads get under each plan?
  4. 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.
  5. Which plan is better? Argue which plan is better for the user and which is better for the platform. Include counterarguments and possible hybrids.
  6. 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.