Shrinking Click Rates for Ads With Few Impressions
Last updated: November 29, 2026
Quick Overview
An ads feature uses each ad's historical click-through rate, but new ads with 2 impressions and 1 click show a CTR of 50%. Explain why this overfits and implement empirical Bayes shrinkage with a Beta prior fitted to all ads.
Meta
November 29, 20260
0
0 solved
An ads feature uses each ad's historical click-through rate, but new ads with 2 impressions and 1 click show a CTR of 50%. Explain why this overfits and implement empirical Bayes shrinkage with a Beta prior fitted to all ads.
Rate features for small groups are a constant issue in Meta ads and recommendations. The interviewer wants to see shrinkage as regularization, a correct Beta-Binomial posterior mean, and a sensible way to fit the prior.
What the Interviewer Expects
- Explain the high variance of rates from small samples
- Use a Beta prior and the posterior mean formula
- Fit prior parameters by method of moments or maximum likelihood
- Show how shrinkage strength depends on impressions
- Discuss hierarchical priors by ad category or advertiser
Key Topics to Cover
How to Approach This
- Understand the bias-variance trade-off. High training accuracy but low test accuracy signals overfitting.
- Choose evaluation metrics carefully based on the problem. Accuracy alone is often insufficient.
- Feature engineering is often more impactful than model selection.
- Know when to use tree-based models (tabular data) vs neural networks (unstructured data).
- Handle class imbalance with SMOTE, class weights, or appropriate loss functions.
Possible Follow-up Questions
- How would you fit the prior by maximum likelihood instead?
- Why would you use a separate prior per ad vertical?
- How does this relate to additive smoothing in target encoding?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Explore ML Interview PrepSample Answer
Clarify
I would confirm the feature is used at training and serving, how many ads have few impressions, and whether CTRs differ systematically across ad verticals, which would argue for a prior per vertical....
Approach
With impressions, the raw CTR's standard error is about , enormous at . Model each ad's true CTR as drawn from . After observing clicks in impressio...