Algorithm to calculate rating

310 Views Asked by At

First of all I must state that I am not a mathematician, so please correct me if I use wrong terminology.

I'm developing a Web application to measure the quality of businesses. Let me tell you something. Every business has 8 points at the start. Members can score between 0 and 10 points. The business's score can be up to 10. I need an algorithm for this. I'd appreciate it if you could help me.

Every business will be scored separately. But I am looking for a neat algorithm because there will be a problem between a company with 10 votes and a company with 1000 votes.

Exam :

  • Company 1
  • Start Score : 8p
  • Vote used 1 : 5p
  • Vote used 2 : 8p
  • Vote used 3 : 1p
  • Vote used 4 : 3p
  • Vote used 5 : 10p

  • Company 2

  • Start Score : 8p

  • Vote used 1 : 3p

  • Vote used 2 : 8p

  • Vote used 3 : 9p

  • Vote used 4 : 10p

  • Vote used 5 : 10p

  • Vote used 6 : 10p

  • Vote used 7 : 7p

  • Vote used 8 : 1p

  • Vote used 9 : 1p

  • Vote used 10 : 1p

Other Exam: Imdb Ratings : https://www.imdb.com/title/tt0944947/ratings?ref_=tt_ov_rt

2

There are 2 best solutions below

2
On

It's not quite clear how you want to use the starting rating of $8$. One possibility is to use it less and less the more actual votes you have. That suggests this variant on @AlexLostado 's comment: count the initial $8$ as if it were some fixed number of votes. For example, if that fixed number were $10$ votes then the rating for company 1 would be $$ \frac{10 \times 8 + 8 + 5 + 8 + 1 + 3 + 10}{10 + 5}. $$ That's the ordinary average of $10$ starting votes and the $5$ actual customer votes. You could give more or less weight to the start by increasing or decreasing the $10$.

2
On

A voting database, that I know quite well, uses a weighing of the arithmetic mean. This is done, by calculating the usual arithmetic mean of the $n$ votes and multiplies this by $\frac{n-1}{n}$ to get the score.

This will put an often rated company at a higher score, than a less often rated company, even though it has the same average vote.