{"id":12138,"date":"2014-01-08T17:14:50","date_gmt":"2014-01-08T23:14:50","guid":{"rendered":"http:\/\/bucktownbell.com\/?p=12138"},"modified":"2014-10-07T11:53:02","modified_gmt":"2014-10-07T16:53:02","slug":"how-not-to-sort-by-average-rating","status":"publish","type":"post","link":"http:\/\/bucktownbell.com\/?p=12138","title":{"rendered":"How Not To Sort By Average Rating"},"content":{"rendered":"<blockquote><p><strong>PROBLEM<\/strong>: You are a web programmer. You have users. Your users rate stuff on your site. You want to put the highest-rated stuff at the top and lowest-rated at the bottom. You need some sort of &#8220;score&#8221; to sort by.<\/p><\/blockquote>\n<p>via <a href=\"http:\/\/www.evanmiller.org\/how-not-to-sort-by-average-rating.html\">How Not To Sort By Average Rating<\/a>.<\/p>\n<blockquote><p><strong>CORRECT SOLUTION<\/strong>: Score = Lower bound of Wilson score confidence interval for a Bernoulli parameter<\/p>\n<p><em>Say what<\/em>: We need to balance the proportion of positive ratings with the uncertainty of a small number of observations. Fortunately, the math for this was worked out in 1927 by Edwin B. Wilson. What we want to ask is: <em>Given the ratings I have, there is a 95% chance that the &#8220;real&#8221; fraction of positive ratings is at least what?<\/em> Wilson gives the answer. Considering only positive and negative ratings (i.e. not a 5-star scale), the lower bound on the proportion of positive ratings is given by:<\/p><\/blockquote>\n<div style=\"text-align: center;\"><img decoding=\"async\" alt=\"\" src=\"http:\/\/www.evanmiller.org\/images\/rating-equation.png\" \/><\/div>\n","protected":false},"excerpt":{"rendered":"<p>PROBLEM: You are a web programmer. You have users. Your users rate stuff on your site. You want to put the highest-rated stuff at the top and lowest-rated at the bottom. You need some sort of &#8220;score&#8221; to sort by. &hellip; <a href=\"http:\/\/bucktownbell.com\/?p=12138\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[737],"tags":[670,970,180,1341],"class_list":["post-12138","post","type-post","status-publish","format-standard","hentry","category-stem","tag-algorithms","tag-comment-systems","tag-math","tag-ranking-systems"],"_links":{"self":[{"href":"http:\/\/bucktownbell.com\/index.php?rest_route=\/wp\/v2\/posts\/12138","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/bucktownbell.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/bucktownbell.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/bucktownbell.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/bucktownbell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=12138"}],"version-history":[{"count":1,"href":"http:\/\/bucktownbell.com\/index.php?rest_route=\/wp\/v2\/posts\/12138\/revisions"}],"predecessor-version":[{"id":12139,"href":"http:\/\/bucktownbell.com\/index.php?rest_route=\/wp\/v2\/posts\/12138\/revisions\/12139"}],"wp:attachment":[{"href":"http:\/\/bucktownbell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=12138"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bucktownbell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=12138"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bucktownbell.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=12138"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}