[Math] How to weight votes based on number of possible voters

statisticsvoting-theory

Scenario:
I have a book club that reads a book every month. My website allows the readers to give a 5 star rating to each book. We have 10 members and a rule that a member may only vote on a book they have read.

At the end of the year we read a book by the highest rated author.

The problem: If only one person votes for a book but the other 9 didn't finish the that one person determines the sole vote for that book.

Example:
Book – number of votes – Average Vote
Catcher in the Rye – 7 – 4.0
Catch 22 – 5 – 3.8
The Hunger Games – 1 – 5.0

In this example hunger games would win the year. But clearly Catcher in the Rye is more favored as most of the group just didn't bother to finish hunger games.

Desired Outcome
An ideal algorithm would weight the votes based on the number possible votes reducing the multiplier as the percentage of votes decreases.

votes < 3 – (33% of total available) Multiply average by .5
3 > votes < 7 – (66% of total available) Multiply average by .75
votes > 7 – Vote stands.

Is their a linear equation I can use to implement this type of weighting? or is there a more logical method of calculating the votes?

Note: I want to avoid making the average by the number of possible voters (add 0 for each non vote) as this would bottom out some of the longer books that people did not get the time to read. A gradual decrease that only considers the votes cast is much preferred.

Best Answer

This question has been plaguing internet ranking sites for a while, e.g. reddit. Fortunately it has a nice theoretical solution.

It involves a bit of statistics; the Ruby code is:

require 'statistics2'

def ci_lower_bound(pos, n, confidence)
if n == 0
return 0
end
z = Statistics2.pnormaldist(1-(1-confidence)/2)
phat = 1.0*pos/n
(phat + z*z/(2*n) - z * Math.sqrt((phat*(1-phat)+z*z/(4*n))/n))/(1+z*z/n)
end

Related Question