# Formula to discard items by votes (Lower bound of Wilson score confidence interval)

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.

Thanks!

-
Oh, thank! I had no idea there was a SE fully dedicated to it. –  metrobalderas May 17 '11 at 1:07
Note I suggested using the upper bound from the same formula. –  Aniko May 17 '11 at 2:47
@metrobalderas, the questions can be migrated between sites. I'll flag the questions, maybe moderators will be able to merge. –  mpiktas May 17 '11 at 3:09
@mp Reading over the SO version and the article it references makes it clear the question belongs here: I think we would have quite a few things to say about the idea of ranking data by means of LCLs! I do not believe that CV mods can migrate a question from another site, but if the SO mods migrate it here we can do the merge easily. It might be best for @metro to flag the SO question and request the merge. –  whuber May 17 '11 at 5:18
I've flagged. I'm sorry about the duplicates, but it also covers both topics. –  metrobalderas May 17 '11 at 5:24
show 1 more comment

Uh, maybe I'm missing something, but yes, the original formula has a +/- sign, however the Ruby implementation only has a minus sign, and, with further examination, there's some other things missing from the original formula; for instance, the alpha/2 is not present in any form in the whole formula. –  metrobalderas May 17 '11 at 1:07
alpha is there, it is just called power for some reason. –  Aniko May 17 '11 at 2:41