Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to implement a review function on my website, but I want it weighed. I checked on IMDb and they have this:

weighted rating $(WR) = (v / (v+m)) R + (m / (v+m)) C$
$R$ = average for the movie (mean) = (Rating)
$v$ = number of votes for the movie = (votes)
$m$ = minimum votes required to be listed in the Top 50 (currently 1000)
$C$ = the mean vote across the whole report (currently 6.8)

Now, I was wondering how I would implement it for my situation. So please help me understand if what I assume here is correct:

$R$ = $\sum$(review of item $X$ * ratingvalue) / (total reviews of item $X$)

$v$ = total reviews of item $X$

$m$ = I have only a few reviews on my site right now, so does it matter what number I provide here? I thought I'd just enter 1

$C$ = which report do they mean by this? Do they mean the average value of a review across all reviews?

Example based on comments below (thanks guys):

Let's say I have two movies with the following ratings: Movie A votes: 8,8,10,5,7,8 Movie B votes: 10

Would that result in the following values for the variables: Movie A total reviews: 6 Movie B total reviews: 1

Movie A sum: 46 Movie B sum: 10

Movie A average: 7,666666667 Movie B average: 10

Thus for movie A the variable values would be: R 7,666666667 v 6 m 0,8 <- with value of variable m I could play based on whether this movie relatively has a lot of reviews C 8

And the rating would be: (WR)=(v/(v+m))R+(m/(v+m))C (WR)=(6/(6+0,8))7,666666667+(0,8/(6+0,8))8 (WR)=7,7

If that's correct: I also tried giving movie A 6*10 and movie B 1*10 but in that case it would make sense to rank movie A higher, which it doesn't with my current formula.


share|cite|improve this question
Think of it as if every item always has $m$ votes which are average. – Thomas Andrews Jul 10 '12 at 13:01

The formula is just a weighted average of the "naive-individual" rating for this movie (item) and a (sort of) "a priori-noncommittal" rating. The idea is that, if you have very few votes for your particular movie, you don't put much trust on it, and lean instead towards a conservative estimate, the "a priori" noncommittal rating: for example, the average rating across your entire universe. When the number of votes for your particular movie gets bigger, you trust that individual rating more.

Once you grap the concept, you have quite freedom to prescribe your weights and the "a priori" rating. The important restrictions are: the weights must be in the $(0,1)$ range and sum up to one; the weight of the "a priori" rating should tend to $1$ if the movie has few votes, and to $0$ if it has many.

This is sometimes -loosely- called "bayesian rating". See related:

share|cite|improve this answer
I'm struggling with this (again). I have this Excel file: algorithm.xlsx What I find surprising is that if movie A has 5 votes with score of 10 and 1 vote of 9, it still ranks lower than movie B which has 1 vote of 10. I would expect 6 votes to count way more heavily than 1 vote. I tried changing the parameters, but I'm unsure what should be changed. I have very few reviews on my site, so my population is small, could that be the problem? – Flo Jul 31 '14 at 14:33
friendly bump – Flo Sep 3 '14 at 14:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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