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
Weighted average, sum the number of stars times its weight, and then divide it through by the total number of reviews.