# Boxplot IQR and confidence interval

Hi

Just a short question. How are the IQR of the boxplot related to the confidence interval of a sample? Is the IQR actually the 50% confidence interval?

-

My answer didn't seem to score any points with anyone, and rdchat's answer is lousy, so let's look more closely.

Suppose $X_1,\dots,X_n$ are an i.i.d. sample from a normally distributed population with unknown mean $\mu$ and unknown variance $\sigma^2$, and we seek a confidence interval for the population mean. As usual, let $\overline{X} = \left(X_1 + \cdots + X_n\right)/n$ be the sample mean and $S^2 = 1/(n-1)\sum_{i=1}^n (X_i - \overline{X})^2$ be the (unbiased) sample variance. (BTW, unbiasedness is overrated. Everybody knows that, except some non-statisticians. Apparently there are lots of those.)

Now $$\frac{\overline{X} - \mu}{\sigma/\sqrt{n}}$$ is normally distributed with mean 0 and variance 1, and $$\frac{\overline{X} - \mu}{S/\sqrt{n}}$$ has a Student's t-distribution with $n-1$ degrees of freedom (called "Student's" because it's named after William Sealey Gosset, of course---and some of the content of this forum makes one suspect that a lot of people here don't know that standard bit of folklore). Go to the table and look up the value of $A_n$ for which $$\Pr\left( -A_n < \frac{\overline{X} - \mu}{S/\sqrt{n}} < A_n \right) = \frac{1}{2},$$ or in other words $$\Pr\left(\overline{X} - A_n \frac{S}{\sqrt{n}} < \mu < \overline{X} + A_n \frac{S}{\sqrt{n}}\right) = \frac{1}{2}.$$ Then $$\overline{X} \pm A_n \frac{S}{\sqrt{n}}$$ are the endpoints of a 50% confidence interval for $\mu$.

Important point: The length of the confidence interval goes to 0 as the sample size increases, since $\sqrt{n}$ is in the denominator (and $A_n$ approaches the value one would get for the normal distribution rather than for Student's distribution). But the sample quartiles do not get closer together in the limit as $n$ grows, since ("almost surely") they approach the population quartiles.

The interval $(Q_{1},Q_{3})$ might be considered a 50% confidence interval, but it's not a 50% confidence interval for the mean that you'd get from any of the usual formulas.