Calculate average rating [closed]
Can any one tell me how to calculate 开发者_如何学Crating average?
I interpret rating average as the average of a set of ratings.
In that case you simply compute
sum_of_all_ratings
rating_average = ------------------
number_of_ratings
I recommend this example :
Ordinary average : (a+b+c....z)/(number_added_items)
Rating average : (va*a + vb*b + vc*c... +vz*z)/(number_added_items)
In the first case you could say that the weight for each item is 1 as all items have the same weight in the calculation, while in the second case weights differ)
In your case the weight for each rating vote might depend on the voter so let's say a highly rated voter has a ponder for 3 his vote while a novice has 1.If 3 novices vote for an answer the rating of that answer will be (1*1+1*1+1*1)/(3) = 1 while if 2 high voters and a novice vote for an answer the average will be 3*1+3*1+1*1/3 = 2.33.
Does this answer your question? otherwise please be more explicit.
精彩评论