I need to calculate 5-star ratings like the one on Amazon website. I have done enough search to find what is the best algorithm, but I am not able to get a proper answer. For ex
a better way to do this,
rating = (sum_of_rating * 5)/sum_of_max_rating_of_user_count
example:
total users rated: 6 sum_of_max_rating_of_user_count: 6 x 5 = 30 sum_of_rating: 25 rating = (25 * 5) / 30
Done!