Hacker News new | ask | show | jobs
by oli5679 605 days ago
Adding one to both the numerator and the denominator when calculating average ratings isn’t a terrible idea.

In situations where you’re estimating probabilities (like the average rating of an item based on user reviews), there is a Bayesian interpretation of this adjustment.

Beta distribution is a conjugate prior to the binomial distribution, meaning the update process has a posterior distribution is also a Beta distribution.

By adding one to the numerator (the number of positive reviews) and one to the denominator (the total number of reviews plus one), you’re effectively using a Beta(1,1) prior (uniform distribution).

This approach smooths the estimated average, especially for items with a small number of reviews. This is a useful regularisation, pulling extreme values towards the mean and reflecting the uncertainty inherent in limited data.

https://en.wikipedia.org/wiki/Beta_distribution