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.
I think this might be business logic more than mathematics/stats. You can absolutely give everything a number and weight and then average it, but I doubt you would get what you need straight away.
I'd start by thinking about the edge cases - what score should a product with only one 5 star review get? what about a single 1 star review?
Then think about your weights - is the age of the review only important in comparison to the other reviews of the same product, or in comparison to [today]? As in, should a review automatically age, or only age as new reviews are added?
Also, how much more important are verified reviews compared to unverified ones?
After all that, we would then need to work out the comparitive importance of each factor (does an old verified review trump a new unverified one, what about a v.old one, etc), and then we can start making a fun algorithm :)