I'm developing a website at the moment.
The website allows users to "rate" a post from 0 to 5.
Posts can then be displayed in order of popularity.
At the moment, my method of calculation is pretty primitive:
average_rating = total_rating/ratings
the problem is that a story with 1 rating of 5 is more popular than a story with 99 ratings of 5 and 1 of 4.
(5/1) > (499/100)
Could someone suggest a more accurate way to calculate popularity both on the number of votes and the quality of each vote?