I am building a website which has 5 star ratings to rate items.

These ratings unlike the normal ones are of unequal weights. i.e.

1 star: -5,
2 stars: 10,
3 stars: 20,
4 stars: 30,
5 stars: 50,

Every time a user rates I am planning to calculate the average and show it back to the user.

To do this averaging I was thinking of implementing weighted averages or Bayesian average.

Which approach do you think is the best? Are there other approaches I should be looking into?

  • 5
    $\begingroup$ Here's another approach you could look into: How Not To Sort By Average Rating by Evan Miller $\endgroup$ – Rahul Aug 16 '11 at 15:36
  • $\begingroup$ Questions like this don't have an objective answer. It all depends on what you want your rating system to do. $\endgroup$ – Qiaochu Yuan Aug 16 '11 at 15:37
  • $\begingroup$ @Rahul Evan's post is specifically for rating systems without a limit. i.e. a voting system $\endgroup$ – Cherian Aug 16 '11 at 15:42

The basic (weighted) average is really just a special case of the Bayesian average with $C = 0$. There are other special cases, such as the rule of succession, which correspond to different priors. More generally, these are all forms of additive smoothing.

Generally, I'd suggest either implementing some form of smoothing and/or not showing any ratings for items rated less than some minimum number of times. This is to avoid the issue of an item with a single 5-star rating getting a higher average rating than one with 99 5-star ratings and one 4-star rating.

Ps. If you haven't yet seen yesterday's xkcd strip, go take a look at it — it's relevant to the topic.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.