# Sample-quartile I don't know : Is there a sample such that

Sample-quartile
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?
You can still ask an expert for help

• Questions are typically answered in as fast as 30 minutes

Solve your problem for the price of one coffee

• Math expert for every subject
• Pay only if we can solve it

Tristin Case
"Is there a sample such that the mean does not lie between the lower and upper quartile?"
One such sample is $\left\{1,2,3,4,5,120\right\}$, 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\mathrm{%}$ of observations from the top $75\mathrm{%}$. Similarly, the third quartiles separates the bottom $75\mathrm{%}$ of observations from the top $25\mathrm{%}$. As noted in the comments, the median is simply the "second quartile" of a data set and separates the bottom $50\mathrm{%}$ from the top $50\mathrm{%}$. 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 $\stackrel{~}{x}$ of a set of $n$ observations by
$\stackrel{~}{x}=\frac{1}{2}\left({a}_{⌈n/2⌉}+{a}_{⌈\left(n/2\right)+1⌉}\right)$
where ${a}_{i}$ is the $i$th element of the order sequence of observations and $⌈\cdot ⌉:\mathbb{R}\to \mathbb{Z}$ is the ceiling function. The first quartiles is median of the sequence ${a}_{1},...,{a}_{⌈n/2⌉}$ and the third quartiles is the median of the sequence ${a}_{⌈\left(n/2\right)+1⌉},...,{a}_{n}$. Hence, we have the ordering ${Q}_{1}\le \stackrel{~}{x}\le {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.