What I want is to know how star ratings works. I don't get the logic of it.
Example:
5 star - 300 people
4 star - 45 people
3 star - 100 people
2 star - 99 people
1 star - 10 people
Total of 554 people
I want to convert these number of votes to percentage and compute all of it to get its average
5 star - 40% (300 people)
4 star - 10% (45 people)
3 star - 21% (100 people)
2 star - 20 % (99 people)
1 star - 9% (10 people)
a total of 100%
It's just a random percentage. It's not the correct answer.
How can I achieve that ? I don't think if that's the correct process of ratings.
I am confused s to what the question is?
But first some math:
We can easily calculate the vote distribution in percent for stars, lets check units:
and compute for all
error due to round off: 100 - (sum(%) = 99.99) = 0.01 so its ok to round of
however this is not what the figures you came with looks like. This is probably because the code you are using, is not showing the percent of people who voted for something, but instead it shows an estimate of how the votes should be distributed, and not how they are.
Many rating systems actually count votes with different weights, depending on either the existing distribution, or to equate votes across cultures.
I am Danish, so I'll use that culture of reference, for the example. Take for instance Rural Denmark. In this culture, no one actually uses rates 5 or 1, unless the thing thats being rated is very extremely extraordinary bad or good. In fact it is also more likely to get a 1 than a 5. - but if you get a 2 or 4, it is not "close to 3" it is in fact really bad or really good..
In the Urban Denmark you get more exited, and easily vote 5 for something that is basivly a mediocre performance. Also 1 for something just because you had a bad day.
So for an ordinary but good show, (should rate mean 4) this would be the two distributions:
Rural:
Urban:
notice the cultural difference clearly shown in these made up results..
I am not making this up its called response styles, you may want to read this: http://www.harzing.com/download/respstyles.pdf
So the developer needs to consider which response style the ratings should compensate for.
I could easily weigh the Rural votes, and let the 1 person who dared to press 5 stars, get extra weight in the votes, and also give the people that voted 3 stars, get less wieght. This would make the two results look more alike, and make it easier for an urban dweller to compare the results.
But is that actually correct. ? (to choose urban votes as the norm, and modify the others to fit) would the opposite argument be just as good?
weigh 5 and 1 less in the urban votes, and 3 more, to make it look more comparable for the rural population?
--
in your case it seems that the results carry weights we cannot see how the weights have been found, but we can deduct something from them.
weights:
so in this case a negative vote is valued with a high weight, and a positive vote, is given less wight.
I would have expected that the sum of the weights would equal 1, but they are not, so this could be the result of manually fine tuning the results of ratings, to some desired distribution (commercial interests), or perhaps a miscalculation on your part.