I'm working on a review site and I need to create a scoring algorithm to give each product a score, similar to trustpilots trustscore, out of 10 based on a number of factors. The factors I need to take into account are:
- The star ratings between 1 and 5 left on the product
- The age of the star ratings (ratings should hold less weight the older they are)
- The type of rating (verified reviews should have higher scoring)
- A bayesian average should be used to prevent bias for low vote counts
I'm by no means a mathematician so I really don't know where to start with this, so if anyone could offer any guidance or examples, that would be great.
Update with answers to some questions
- A verified review should score twice as high as an unverified review
- A product with a single 5 star review on it's own would have a score of 5, however as per the last constraint, an initial average should be applied to all reviews to prevent this bias for new products. I would do this by adding the score of 7 additional reviews to the calculation with an average rating (so on the scale of 1 to 5, would be a rating of 3) so everyone essentially starts "average".
- For the age factor, I see the worth of a score diminishing by say 10% per year (would be handy to be pluggable, ie change to 15% if we found this was too slow).
- The score will get recalculated when a new review is left so based on that reviews date (but if this could be plug-able to change to a recalculate per day system, that would be handy)
- Old verified reviews should have more worth than a new unverified review, but should probably be affected by the age sliding scale so eventually there will come a tipping point where a new unverified review will weigh more than the old verified review because it's so old.