Sample-quartile

188 Views Asked by At

I don't know : Is there a sample such that the mean does not lie between the lower and upper quartile? Is there a sample such that the median does not lie between the lower and upper quartile?

1

There are 1 best solutions below

0
On

Is there a sample such that the mean does not lie between the lower and upper quartile?

One such sample is $\{1,2,3,4,5,120\}$, which has quartiles $Q_1=2$ and $Q_3=5$, but a mean of $22.5$. Note that the mean of a data set is heavily influenced by outliers while the quartiles are generally resistant to extreme values.

Is there a sample such that the median does not lie between the lower and upper quartile?

Consider the definitions of the median and quartiles. The first quartile of a data set separates the bottom $25\%$ of observations from the top $75\%$. Similarly, the third quartiles separates the bottom $75\%$ of observations from the top $25\%$. As noted in the comments, the median is simply the "second quartile" of a data set and separates the bottom $50\%$ from the top $50\%$. If there was a data set that had a median less than the first quartile, then the observation at the $50$th percentile would be less than an observation at the $25$th percentiles, which makes no sense. Similar logic shows that the median cannot be greater than the third quartile.

This can be shown more rigorously by providing a formal definition for the median of a data set. We can define median $\tilde x$ of a set of $n$ observations by $$ \tilde x = \frac{1}{2} \left(a_{\lceil n/2 \rceil} + a_{\lceil (n/2)+1 \rceil} \right) $$ where $a_i$ is the $i$th element of the order sequence of observations and $\lceil \cdot \rceil:\mathbb R \to \mathbb Z$ is the ceiling function. The first quartiles is median of the sequence $a_1,...,a_{\lceil n/2 \rceil}$ and the third quartiles is the median of the sequence $a_{\lceil (n/2)+1 \rceil},...,a_n$. Hence, we have the ordering $Q_1 \leq \tilde x \leq Q_3$, meaning that the median can equal the first or third quartiles, but cannot be less than the first nor more than the third.