News for hackers. Stuff that matters.
Re:Reddit implements "best" comment sorting based on score c... by modernhermit on Thursday October 22, 2009 @10:33AM (#896794)
before you go reinventing the wheel, here are the results from running your examples through the formula suggested by Evan Miller in the link...

10 up 10 down 0.327403766068315

50 up 50 down 0.418847795168265

100 up 0 down 0.973657278603792

70 up 30 down 0.620167865061336

2 up 1 down 0.253533865071156

10 up 20 down 0.210836926288844

and a few more to see some other interesting cases...

100 up 30 down 0.703333001615963

10 up 3 down 0.541934244292211

30 up 100 down 0.175849385303401

1 up 0 down 0.269865944074627

1 up 1 down 0.120866317496523

2 up 0 down 0.425030603165412

100 up 0 down 0.973657278603792

100 up 100 down 0.442235043128361

200 up 0 down 0.986652839030471

as you can see. as there are more votes cast, the confidence that this represents the ultimate ranking improves. with less votes, a high up/down ratio is good, but not as good as a high up/down ratio with more total votes (because there is more statistical confidence with more data points).

finally below are the test cases that broke your initial implementation.

200 up 1800 down 0.0895005864992562

300 up 4200 down 0.0608069702294983

400 up 7600 down 0.0461419135745087

There are no comments on this comment yet.