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.
[ Parent
| on HN ]
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.
Here's my version that we use on MyBankTracker.com. We hardcode the z variable using a power of 0.05.
"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.)"
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.