{"id":18982,"date":"2016-12-02T18:47:28","date_gmt":"2016-12-02T18:47:28","guid":{"rendered":"http:\/\/www.oracletutoring.ca\/blog\/?p=18982"},"modified":"2016-12-02T18:49:41","modified_gmt":"2016-12-02T18:49:41","slug":"statistics-a-confidence-interval-for-the-median","status":"publish","type":"post","link":"https:\/\/www.oracletutoring.ca\/blog\/statistics-a-confidence-interval-for-the-median\/","title":{"rendered":"Statistics:  a confidence interval for the median"},"content":{"rendered":"<h1>The tutor explains, with an example, how to construct a confidence interval for the median.<\/h1>\n<p>Let&#8217;s imagine we have the following data for purchases from a coffee shop, arranged least to greatest:<\/p>\n<p>2.05, 2.05, 2.05, 2.05, 2.05, 2.05, 2.55, 2.55, 2.85, 2.85, 3.95, 3.95, 4.10, 4.10, 4.95, 4.95, 5.10, 5.10, 5.40, 5.40, 5.95, 6.25, 6.55, 8.20, 8.80, 9.65, 10.25, 12.25, 12.25, 15.65, 17.50, 18.80, 19.95, 20.00, 20.10, 22.95, 25.00, 25.00, 25.00, 35.25<\/p>\n<p>We want a 95% confidence interval for the median purchase.  To construct it, we use the following ideas:<\/p>\n<ol>\n<li>Each entry has p=0.5 probability of being greater than the median.<\/li>\n<li>The number of entries greater than the median is then a binomial variable with standard deviation \u03c3=square root(np(1-p)) = (np(1-p))^1\/2.  In this particular case \u03c3=(40&#215;0.5&#215;0.5)^1\/2=3.162.<\/li>\n<li>For this situation, the standard deviation refers to a number of entries, rather than a price value.<\/li>\n<li>For a 95% confidence interval, we can safely use margin of error 1.96\u03c3, since we have 40 entries.  (The threshold is 30).<\/li>\n<li>1.96\u03c3=1.96&#215;3.162=6.2<\/li>\n<li>6.2 is not an integer.  To be safe, we will imagine \u00b1 7 entries, to be more than 95% confident of capturing the median.<\/li>\n<li>A way to construct the interval is to realize that it reaches out 7 each side from the middle.  Since there are 40 entries, we remove the bottom 13 and top 13, so we are left with the middle 14.<\/li>\n<li>Our 95% confidence interval for the median is\n<p style=\"color:brown;text-align:center\">4.10, 4.95, 4.95, 5.10, 5.10, 5.40, 5.40, 5.95, 6.25, 6.55, 8.20, 8.80, 9.65, 10.25<\/p>\n<\/li>\n<li>With 95% confidence, we assume the median is between 4.10 and 10.25 inclusive:)<\/li>\n<\/ol>\n<p>Source:<\/p>\n<p>Mills, Richard L.  <u>Statistics for Applied Economics and Business<\/u>.  Toronto:  McGraw-Hill, 1977.<\/p>\n<p>Jack of <a href=\"https:\/\/www.oracletutoring.ca\">Oracle Tutoring by Jack and Diane,<\/a> Campbell River, BC.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The tutor explains, with an example, how to construct a confidence interval for the median. Let&#8217;s imagine we have the following data for purchases from a coffee shop, arranged least to greatest: 2.05, 2.05, 2.05, 2.05, 2.05, 2.05, 2.55, 2.55, &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"more-link\" href=\"https:\/\/www.oracletutoring.ca\/blog\/statistics-a-confidence-interval-for-the-median\/\"> <span class=\"screen-reader-text\">Statistics:  a confidence interval for the median<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[2055],"class_list":["post-18982","post","type-post","status-publish","format-standard","hentry","category-statistics","tag-confidence-interval-for-the-median"],"_links":{"self":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/18982","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/comments?post=18982"}],"version-history":[{"count":14,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/18982\/revisions"}],"predecessor-version":[{"id":18996,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/18982\/revisions\/18996"}],"wp:attachment":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/media?parent=18982"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/categories?post=18982"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/tags?post=18982"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}