PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 30th, 2012, 04:22 PM
makzan makzan is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 102 makzan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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

Reply With Quote
  #2  
Old September 30th, 2012, 04:53 PM
aeternus's Avatar
aeternus aeternus is offline
For POny!
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2012
Location: Amsterdam
Posts: 416 aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 5 Days 4 h 56 m 43 sec
Reputation Power: 114
You could sort them by the amount of rates it got. That way the most populair ones are tops. Anyway its always good to give besides the star indication a count of voters to give it more meaning.
__________________
PHP Tutorial

Reply With Quote
  #3  
Old September 30th, 2012, 05:48 PM
makzan makzan is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 102 makzan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 4 h 51 m 48 sec
Reputation Power: 9
Hi aeternus,

Thanks for the reply.

Yeah. I'll display the amount of voters anyway, but if I only use the amount of voters then it gives no meaning as to if the voters actually like the item or not.

That's why I think the ranking by number of votes mixed with the average rating is more worthwhile. It's a rank based on how liked the item is and how popular it is.

Ian

Reply With Quote
  #4  
Old September 30th, 2012, 06:03 PM
aeternus's Avatar
aeternus aeternus is offline
For POny!
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2012
Location: Amsterdam
Posts: 416 aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 5 Days 4 h 56 m 43 sec
Reputation Power: 114
Quote:
Originally Posted by makzan
Hi aeternus,

Thanks for the reply.

Yeah. I'll display the amount of voters anyway, but if I only use the amount of voters then it gives no meaning as to if the voters actually like the item or not.

That's why I think the ranking by number of votes mixed with the average rating is more worthwhile. It's a rank based on how liked the item is and how popular it is.

Ian

That pretty much summed up what I said

Reply With Quote
  #5  
Old September 30th, 2012, 06:12 PM
makzan makzan is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 102 makzan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 4 h 51 m 48 sec
Reputation Power: 9
Ah, sorry! I thought you meant use only the amount of votes, not a mixture of votes and ratings

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > PHP-General - Ranking Average Ratings

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap