I noticed that boxplot computes a 95% CI for the median by using median +/- 1.58*IQR./sqrt(n) Where does the 1.58 constant come from? -- Rick White Statistical Consultant U.B.C. Vancouver B.C. Canada rick at stat.ubc.ca -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
R-beta: CI for median in funtion boxplot
3 messages · Rick White, Peter Dalgaard, Thomas Lumley
Rick White <rick at stat.ubc.ca> writes:
I noticed that boxplot computes a 95% CI for the median by using median +/- 1.58*IQR./sqrt(n) Where does the 1.58 constant come from?
Search me... However, wouldn't it be better in any case to do an exact 95% CI based on the binomial distribution? Of course, you need at least 6 observations to do that.
O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On 4 Apr 1998, Peter Dalgaard BSA wrote:
Rick White <rick at stat.ubc.ca> writes:
I noticed that boxplot computes a 95% CI for the median by using median +/- 1.58*IQR./sqrt(n) Where does the 1.58 constant come from?
Search me... However, wouldn't it be better in any case to do an exact 95% CI based on the binomial distribution? Of course, you need at least 6 observations to do that.
I think 1.58 is based on a Normal approximation. If the data are Normal then you can compute the asymptotic standard error of the median and use +/- 1.96 of these to get a 95% ci. 1.58*IQR/sqrt(n) is a robust estimate of 2.13sigma/sqrt(n), which is about right to be 1.96 standard errors. This will work for contaminated Normal distributions, but it won'tbe very good for genuinely long-tailed or asymmetric distributions. In any case, the distribution of the median converges to Normal rather slowly, so the CI might not be very good anyway except in large samples. The exact binomial CI would be much better. Thomas Lumley ----------------------- Biostatistics Uni of Washington Box 357232 Seattle WA 98195-7232 ------------------------ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._