News for hackers. Stuff that matters.
Re:How Not To Sort By Average Rating by aw3c2 on Tuesday April 03, 2012 @09:29AM (#3792794)
Every time I see that page, I see the equation, I read statistical terms and I get overwhelmed. I use PHP so I have no pnormaldist. Would love to use it for some random page I run.
Re:How Not To Sort By Average Rating by Spoom on Tuesday April 03, 2012 @09:38AM (#3792837)
I was overwhelmed too (here's simple wrong solution #1, here's simple wrong solution #2, here's incredibly complicated but more correct statistical solution #3 that you may not understand) but since this is relevant to my day job and we use PHP, I did find this:

http://www.derivante.com/2009/09/01/php-content-rating-confi...

I'm not a statistician so I can't speak to the correctness of this implementation.

Re:How Not To Sort By Average Rating by jreposa on Tuesday April 03, 2012 @10:03AM (#3792918)
Here's my version that we use on MyBankTracker.com. We hardcode the z variable using a power of 0.05.

https://gist.github.com/2292254

Re:How Not To Sort By Average Rating by gipsyking on Tuesday April 03, 2012 @09:51AM (#3792882)
"if you don't have a statistics package handy or if performance is an issue you can always hard-code a value here for z. (Use 1.96 for a confidence level of 0.95.)"
Re:How Not To Sort By Average Rating by aw3c2 on Tuesday April 03, 2012 @10:20AM (#3792994)
Ouch, I managed not to see that at all. Thanks!
Re:How Not To Sort By Average Rating by dfghghj4564 on Tuesday April 03, 2012 @09:51AM (#3792881)
Googling "Wilson score confidence interval php" returns an implementation as the top result.
Re:How Not To Sort By Average Rating by Kartificial on Tuesday April 03, 2012 @09:34AM (#3792817)
See this example: http://www.derivante.com/2009/09/01/php-content-rating-confi...

However, if you install the stats package for PHP you can use stats_cdf_normal() as well.

Re:How Not To Sort By Average Rating by eru on Tuesday April 03, 2012 @09:52AM (#3792886)
Aren't there libraries for PHP like for other languages?