All jobs / Data science / ML / AI / Statistics
Data science / ML / AI interview question · 3–5 years
You rank products by average rating. A new item with one 5-star review sits above an item rated 4.6 over 2,000 reviews. What do you change?
The strongest answer
Shrink each item’s average toward a prior — the overall mean — with weight that grows with its review count, so one review barely moves it and 2,000 reviews speak for themselves
Why it works
Right — a Bayesian average: prior mean plus evidence, weighted by how much evidence there is. Small samples get pulled to the middle.
What a good answer covers
- Shrink small samples toward the prior.
- Weight by evidence count.
- Bayesian average, not raw mean.
- Avoid hard cliffs.
Answers that fall short
- Close, but not the strongest: Require a minimum number of reviews before an item can be ranked at all
A threshold works but is a cliff: item 19 is invisible and item 20 is fully trusted. Shrinkage does it smoothly. - Weak: Sort by review count first, then by rating, so popular items always win
Count-first buries a genuinely great item with 50 reviews behind a mediocre one with 5,000. - Red flag: Leave it — a 5-star average is a 5-star average and customers can read the review count
Ranking by a one-review mean rewards noise and gamifies a first friendly review; the ordering is the product.
Who gets asked this
More Statistics questions
- You are summarising customer spend. A few customers spend a hundred times the typical one. Which summary do…
- Ice cream sales and drowning rise together. The model uses ice cream to “predict risk.” What do you say?
- Your model’s AUC on the test set is 0.82 with a 95% confidence interval of 0.79 to 0.85. What does that…
- You tried twenty features and kept the one with p < 0.05 on the same set. What is the honest write-up?
- When is an A/B the wrong next step for a model?
- A linear regression gives ad spend a coefficient of 3.2 on revenue. A stakeholder says “every extra dollar…
- You will try three models and two metrics. How do you stay honest?