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.


  • 1
    $\begingroup$ Think of it as if every item always has $m$ votes which are average. $\endgroup$ Jul 10 '12 at 13:01
  • $\begingroup$ @Flo: Did you find out what C is? Is it average across all the movies or average across movies with the number of votes>v? $\endgroup$ Oct 17 '18 at 0:40

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: https://math.stackexchange.com/a/41513/312

  • $\begingroup$ I'm struggling with this (again). I have this Excel file: in2medical.net/review 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? $\endgroup$
    – Flo
    Jul 31 '14 at 14:33
  • $\begingroup$ friendly bump $\endgroup$
    – Flo
    Sep 3 '14 at 14:25
  • $\begingroup$ even i didn't clearly understand $\endgroup$ Jun 14 '17 at 11:49

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.