I'm not a statician/mathematician, so please be gentle with me
This is a cross-post from Stack Overflow. I'm working with a site that lets the users create 'sections'. Each section have multiple items which are voted. The best ones are shown in the main page.
I found that a simplistic approach to rank would be bad idea.
positive_votes - negative_votes will rank the recent ones with less votes higher (100%, two votes) than the older ones that have way more votes but lower percentage (93%, 300 votes). The average isn't a solution either. I found one article that explains these concepts, why they are a bad idea and how to fix it.
So I'm using the lower bound of Wilson score confidence interval for a Bernoulli parameter and it seems to be working just fine. However, I'd like to discard items that rank way too bad in that particular section.
I think I require two things:
- The minimum votes required to discard an item in each section
- The score's threshold that decides if an item will be discarded or not
It has to consider that while one section might have hundreds of items with thousands of votes, another might have less than 10 items with 50 or 60 votes, so while the minimum votes required for the popular one might be 100, it might be too high for the less popular ones.
In the original question, somebody suggested to use the same formula. However, it seems that the Ruby implementation is missing some parts: the
alpha/2 is not present anywhere. Also, the original formula has a +/- sign, while the implementation has just a minus sign.