
September 30th, 2012, 04:22 PM
|
|
Contributing User
|
|
Join Date: Mar 2005
Posts: 102
Time spent in forums: 1 Day 4 h 51 m 48 sec
Reputation Power: 9
|
|
|
PHP-General - Ranking Average Ratings
Hi,
I realise this isn't strictly a PHP problem, but I am coding in PHP and I can't see a Statistics forum!
I'm making a website that allows users to rate certain items out of 10. The items are displayed on various sections of the site, including some lists to say which are the highest rated items and which are the lowest rated items.
I store the ratings in a MySQL database and I can easily retrieve the mean rating using the AVG function. The problem I have is that if an item has only been rated by one person and they gave it 10/10, this item will pretty much automatically go to the top of the ratings (the AVG rating would be 10/10). Another item that had an AVG of 9.9 and had been rated by 1,000 users would drop down the rankings due to one user giving the other item 10.
I'm trying to find a good way to get around this issue, as I don't want the ranking tables to be constantly changing as new items are added.
I could wait for a certain amount of ratings before I include the item in the rankings, but then I have the problem of how many ratings is enough. I guess this is probably the way to do it, but I was wondering if anyone had any other ideas that may be of help.
I did think of weighting the ratings, by ranking the items by the number of votes. So, if there were 100 items, the item with the most votes would get a ranking of 100 and the item with the least votes would get a ranking of 1. I could then multiply the item's rank by the AVG rating. I could calculate the resulting number as a percentage to give the item a score out of 10. However, this seems like quite a long way around a relatively small problem!
I hope that makes sense and I would love any input from anyone that has come across this issue before.
Ian
|