Find the quartile deviation for the data
$$
\begin{array}{|c|c|c|c|}
\hline
x& 2 & 3 & 4&5&6 \\ \hline
f& 3 & 4 & 8&4&1\\ \hline\end{array}
$$
My Attempt
$$
\begin{array}{|c|c|c|c|}
\hline
x& 2 & 3 & 4&5&6 \\ \hline
f& 3 & 4 & 8&4&1\\ \hline
F& 3 & 7 & 15&19&20\\ \hline
\end{array}
$$
$$
Median=\frac{T_{10}+T_{11}}{2}=4\\
Q_1=\frac{T_{5}+T_{6}}{2}=3\\
Q_3=\frac{T_{15}+T_{16}}{2}=\frac{4+5}{2}=4.5\\
Q.D=\frac{Q_3-Q_1}{2}=\frac{4.5-3}{2}=\frac{1.5}{2}=0.75
$$
But my reference gives the solution $1$ and $Q_3=5$, is it really because of the convention in which the quartiles are taken ?
Which one is correct ?
Note: I also tried few online calculators for finding quartiles with a different data
$$
2,4,4,5,5,6,7,7,7,8,8,9
$$
which are giving different values for the quartiles, please check link 1 and link 2
Best Answer
About 10 slightly different rules for defining quartiles are in common use and a few more are occasionally used in particular fields of study. Mostly, the differences are noticeable in small sample sizes. R statistical softwar permits one to choose the
type
of quartile.Here is a sample of $n=13$ observations rounded to one decimal place.
Without extra parameters, the
quantile
function in R give min, lower quartile, median, upper quartile, and max, using what R callstype 7
quantiles.Other
types
give various different results:And so on, for a few more types. Each type is supposed to have its own advantages in various circumstances.
For beginning students, my suggestions are for quantiles:
Don't be surprised if software gives a slightly different result than your text.
Don't be surprised if different software programs give sightly different results.
Learn the definition in your text or class notes, and use it during your class.
Remember that differences are small, but noticeable, for small datasets. But for large datasets (where quantiles are most often used) the differences, if any, are seldom important.
Examples for a sample of 1000, rounded to 2 places.