Reorder products by confidence rather than avg rating
Closed this issue · 5 comments
Wilson score confidence interval
http://www.evanmiller.org/how-not-to-sort-by-average-rating.html
http://thebroth.com/blog/118/bayesian-rating.html
Now, lets summarize this all and provide a working formula for you to use in your code:
Bayesian Rating is using the Bayesian Average. This is a mathematical term that calculates a rating of an item based on the “believability” of the votes. The greater the certainty based on the number of votes, the more the Bayesian rating approximates the plain, unweighted rating. When there are very few votes, the bayesian rating of an item will be closer to the average rating of all items.
Use this equation:
br = ( (avg_num_votes * avg_rating) + (this_num_votes * this_rating) ) / (avg_num_votes + this_num_votes)
Legend:
avg_num_votes: The average number of votes of all items that have num_votes>0
avg_rating: The average rating of each item (again, of those that have num_votes>0)
this_num_votes: number of votes for this item
this_rating: the rating of this item
Note: avg_num_votes is used as the “magic” weight in this formula. The higher this value, the more votes it takes to influence the bayesian rating value.
how to set the constant C: http://fulmicoton.com/posts/bayesian_rating/