tags:

views:

104

answers:

3
+4  Q: 

Build a Ranking

I have a newssystem where you can rate News with 1 to 5 stars. In the Database i save the count, the sum and the absolute rating as int up to 100 (for html output, so 5 stars would be 100 1 star would be 20percent. Now i have three toplists: Best Rated Most viewed Most commented

Last two ones are simple, but the first is kinda tricky. Before i took that thing over it was all a big mess, and they just put the 5 best rated news there, so in fact if there was a news rated 4.995 with 100k votes and another one with 5 stars at 1 vote, the "better rated" one is on top even if that is obv ridiculous. For the first moment i capped the list so only news with a certain amount of votes (like 10 or 20) can be in the list.

But i do not really like that. Is there a nice method to kind-a give those things a "weight" with the count or something like that?

+1  A: 

You could explore the statistical confidence in the rating perhaps based around the average rating received for all entries and the standard deviation of all votes. While an entry has an average rating of 5, if you only have a few votes then you may not be able to say with more than 90% confidence that the actual rating is above 4.7 say. You can then rate the entries based upon the rating for which you have 90% confidence.

I'm not sure if this meets your requirement of being simple.

Howard May
+6  A: 

Have you considered using a weighted bayesian rating system? It'll weight the results based on the number of votes and the vote values themselves.

Mr. Matt
nice, this looks exactly like a solution i wanted, thanks
Flo
A: 

You could use median of the user ratings as the total rating. You would have five fields with eatch article, each one containing how many times the article was rated as n stars. Then you would select the field with the biggest value of all these and that would be your rating. It has the advantage of ignoring the outliers in the ratings.

cube