Quartiles

Introduction to Quantiles and Quartiles

Quantiles are the techniques used to divide the data into different equal parts. For example, quantiles divide the data into four equal parts. Quartile comes from quarter which means 4th part. Deciles divide the data into ten equal parts and they come from deca means the 10th part. Percentiles divide the data into hundred parts and it comes to percent which means the 100th part.

Therefore, quartiles, deciles, and percentiles are used to divide the data into 4, 10, and 100 parts respectively. The quantiles, deciles, and percentiles are collectively called quantiles.

Quartiles

Quartiles are the rules that divide the data into four equal parts. When we divide any data into four equal parts, we cut it at equidistant points. The quartiles ($Q_1, Q_2$, and $Q_3$) divide the data into four equal parts, so divide the number of observations by four for each quartile.

Quartiles for Ungroup Data

\begin{align*}
Q_1 &= \left(\frac{n+1}{4}\right)th \text{ value is the} \frac{1}{4} \text{ part}\\
Q_2 &= \left(\frac{2(n+1)}{4}\right)th \text{ value is the} \frac{2}{4} \text{ part}\\
Q_3 &=\left(\frac{3(n+1)}{4}\right)th \text{ value is the} \frac{3}{4} \text{ part}
\end{align*}

The following ungroup data has 96 observations $(n=96)$

222225253030303131333639
404042424848505152555759
818689899091919192939393
939494949596969697979898
999999100100100101101102102102102
102103103104104104105106106106107108
108108109109109110111112112113113113
113114115116116117117117118118119121

The first, second, and third quartiles of the above data set are:

\begin{align*}
Q_1 &= \left(\frac{n}{4}\right)th \text{ position } = \left(\frac{96}{4} = 24\right)th \text{ value} = 59\\
Q_2 &= \left(\frac{2\times 96}{4}\right) = 48th \text{ position} = 98\\
Q_3 &= \left(\frac{3\times n}{4}\right)th = \left(\frac{3\times 96}{}\right)th \text{ position} = 72th \text{ position} = 108
\end{align*}

Note that the above data is already sorted. If the data is not sorted, we first need to arrange/sort it in ascending order.

Quartiles for Gruoped Data

One can also compute the quantiles for the following grouped data, hence the quartiles.

ClassesfxC.B.CF
65-84974.564.5-84.59
85-1041094.584.5-104.519
105-12417114.5104.4.5-124.536
125-14410134.5124.5-144.546
145-1645154.5144.5-164.551
165-1844174.5164.5-184.455
185-2045194.5184.5-204.560
Total60   

From the above-grouped data, we have 60 observations $(n=60)= \sum\limits_{i=1}^n = f_i = \Sigma f = 60$. The three quartile will be

\begin{align*}
\frac{n}{4} &= \left(\frac{60}{4}\right)th = 15th \text{ value}\\
Q_1 &= l + \frac{h}{f}\left(\frac{n}{4} – CF\right) = 84.5 + \frac{20}{10}(15-9) = 96.5\\
\frac{2n}{4} &= \left(\frac{2\times 60}{4} \right) = 30th \text{ value}\\
Q_2 &= l + \frac{h}{f}\left(\frac{2n}{4} – CF\right) = 104.5 + \frac{20}{17}(30-19) = 117.44\\
\frac{3n}{4} &= \left(\frac{3\times 60}{4} \right) = 45th \text{ value}\\
Q_3 &= l + \frac{h}{f}\left(\frac{3n}{4} – CF\right) = 124.5 + \frac{20}{17}(45-36) = 142.5\\
\end{align*}

Frequently Asked Questions about Quantiles

  1. Define Quartiles, Deciles, Percetiles.
  2. What are fractiles or Quantiles?
  3. How quantiles are computed for grouped and ungrouped data.

https://rfaqs.com

https://gmstat.com

Quantiles or Fractiles Uncovered (2020)

When the number of observations is sufficiently large, the principle by which a distribution is divided into two equal parts may be extended to divide the distribution into four, five, eight, ten, or hundred equal parts. The median, quartiles, deciles, and percentiles values are collectively called quantiles or fractiles. Let us start learning about Quantiles or Fractiles.

Quantiles or Fractiles Uncovered

Quantiles or Fractiles

Quartiles

These are the values that divide a distribution into four equal parts. There are three quartiles denoted by $Q_1, Q_2$, and $Q_3$. If $x_1,x_2,\cdots,x_n$ are $n$ observations on a variable $X$, and $x_{(1)}, x_{(2)}, \cdots, x_{(n)}$ is their array then $r$th quartile $Q_r$ is the values of $X$, such that $\frac{r}{4}$ of the observations is less than that value of $X$ and $\frac{4-r}{4}$ of the observations is greater.

The $Q_1$ is the value of $X$ such that $\frac{1}{4}$ of the observations is less than the value of $X$ and $\frac{4-1}{4}$ of the observations is greater, the $Q_3$ is the value of $X$, such that $\frac{3}{4}$ of the observations is less than that of $X$ and $\frac{4-3}{4}$ of the observations is greater.

Deciles

These are the values that divide a distribution into ten equal parts. There are 9 deciles $D_1, D_2, \cdots, D_9$.

Percentiles

These are the values that divide a distribution into a hundred equal parts. There are 99 percentiles denoted as $P_1,P_2,\cdots, P_{99}$.

The median, quartiles, deciles, percentiles, and other partition values are collectively called quantiles or fractiles. All quantiles are percentages. For example, $P_{50}, Q_2$, and $D_5$ are also median.

\begin{align*}
Q_2 &= D_5 = P_{50}\\
Q_1 &= P_{25} = D_{2.5}\\
Q_3 &= P_{75}=D_{7.5}
\end{align*}
The $r$th quantile, $k$th decile, and $j$th percentile are located in the array by the following relation:

For ungrouped Date
\begin{align}
Q_r &=\frac{r(n+1)}{4}\text{th value in the distribution and } r=1,2,3\\
D_k &=\frac{k(n+1)}{10}\text{th value in the distribution and } k=1,2,\cdots, 9\\
P_j &=\frac{j(n+1)}{100}\text{th value in the distribution and } k=1,2,\cdots, 99
\end{align}

For grouped Data
\begin{align}
Q_r&= l+\frac{h}{f}\left(\frac{rn}{4}-c\right)\\
D_k&= l+\frac{h}{f}\left(\frac{kn}{10}-c\right)\\
P_j&= l+\frac{h}{f}\left(\frac{jn}{100}-c\right)
\end{align}

Procedure for obtaining Percentile

A procedure for obtaining percentile (quartiles, deciles) of a data set of size $n$ is as follows:

Step 1: Arrange the data in ascending/ descending order.
Step 2: Compute an index $i$ as follows: $i=\frac{p}{100} (n+1)$th (in case of odd observation).

  • If $i$ is an integer, the $p$th percentile is the average of the $i$th and $(i+1)$th data values.
  • if $i$ is not an integer then round $i$ up to the nearest integer and take the value at that position or use some mathematics to locate the value of percentile between $i$th and $(i+1)$th value.

Percentile Example

Consider the following (sorted) data values: 380, 600, 690, 890, 1050, 1100, 1200, 1900, 890000.

For the $p=10$th percentile, $i=\frac{p}{100} (n+1) =\frac{10}{100} (9+1)= 1$. So the 10th percentile is the first sorted value or 380.

For the $p=75$ percentile, $i=\frac{p}{100} (n+1)= \frac{75}{100}(9+1) = 7.5$

To get the actual value we need to compute 7th value + (8th value – 7th value) $\times 0.5$. That is, $1200 + (1900-1200)\times 0.5 = 1200+350 = 1550$.

Quantiles or Fractiles

Read More about: Quartiles, Deciles, and Percentiles

Learn R Programming, Test Preparation MCQs

Frequently Asked Questions Fractiles

  1. What is meant by quartile, deciles, and percentiles?
  2. Describe the procedure of obtaining percentiles (quartiles, and deciles).
  3. What is the interquartile range?
  4. Why do we need to sort the data first when computing quartiles, deciles, and percentiles?

Quartiles in Statistics (2025)

Quartiles in Statistics

Like Percentiles and Deciles, Quartiles is a type of Quantile, which is a measure of the relative standing of observation within the data set. The Quartiles values are three points that divide the data into four equal parts each group comprising a quarter of the data (the first quartile $Q_1$, second quartile $Q_2$ (also median), and the third quartile $Q_3$) in the order statistics.

The first quartile, (also known as the lower quartile $Q_1$) is the value of order statistic that exceeds 1/4 of the observations and less than the remaining 3/4 observations. The third quartile known as the upper quartile is the value in the order statistic that exceeds 3/4 of the observations and is less than the remaining 1/4 observations, while the second quartile is the median.

Quartiles in Statistics for Ungrouped Data

For ungrouped data, the quartiles are calculated by splitting the order statistic at the median and then calculating the median of the two halves. If $n$ is odd, the median can be included on both sides.

Example: Quartiles in Statistics

Find the $Q_1, Q_2$, and $Q_3$ for the following ungrouped dataset 88.03, 94.50, 94.90, 95.05, 84.60.Solution: We split the order statistic at the median and calculated the median of two halves. Since $n$ is odd, we can include the median in both halves. The order statistic is 84.60, 88.03, 94.50, 94.90, 95.05.

Quartiles in Statistics: Relative Measure of Observation

\begin{align*}
Q_2&=median=Y_{(\frac{n+1}{2})}=Y_{(3)}\\
&=94.50  (\text{the third observation})\\
Q_1&=\text{Median of the first three value}=Y_{(\frac{3+1}{2})}\\&=Y_{(2)}=88.03 (\text{the second observation})\\
Q_3&=\text{Median of the last three values}=Y_{(\frac{3+5}{2})}\\
&=Y_{(4)}=94.90 (\text{the fourth observation})
\end{align*}

Quartiles in Statistics for Grouped Data

For the grouped data (in ascending order) the quartiles are calculated as:
\begin{align*}
Q_1&=l+\frac{h}{f}(\frac{n}{4}-c)\\
Q_2&=l+\frac{h}{f}(\frac{2n}{4}-c)\\
Q_3&=l+\frac{h}{f}(\frac{3n}{4}-c)
\end{align*}
where
$l$    is the lower class boundary of the class containing the $Q_1, Q_2$ or $Q_3$.
$h$    is the width of the class containing the $Q_1, Q_2$ or $Q_3$.
$f$    is the frequency of the class containing the $Q_1, Q_2$ or $Q_3$.
$c$    is the cumulative frequency of the class immediately preceding the class containing $Q_1, Q_2$ or $Q_3, \left[\frac{n}{4},\frac{2n}{4} \text{or} \frac{3n}{4}\right]$ are used to locate $Q_1, Q_2$ or $Q_3$ group.

Quartiles in Statistics: Relative Measure of Observation

Quartiles in Statistics Example

Find the quartiles for the following grouped data

Solution: To locate the class containing $Q_1$, find $\frac{n}{4}$th observation which is here $\frac{30}{4}$th observation i.e. 7.5th observation. Note that the 7.5th observation falls in the group ($Q_1$ group) 90.5–95.5.
\begin{align*}
Q_1&=l+\frac{h}{f}(\frac{n}{4}-c)\\
&=90.5+\frac{5}{4}(7.5-6)=90.3750
\end{align*}

For $Q_2$, the $\frac{2n}{4}$th observation=$\frac{2 \times 30}{4}$th observation = 15th observation falls in the group 95.5–100.5.
\begin{align*}
Q_2&=l+\frac{h}{f}(\frac{2n}{4}-c)\\
&=95.5+\frac{5}{10}(15-10)=98
\end{align*}

For $Q_3$, the $\frac{3n}{4}$th observation=$\frac{3\times 30}{4}$th = 22.5th observation. So
\begin{align*}
Q_3&=l+\frac{h}{f}(\frac{3n}{4}-c)\\
&=100.5+\frac{5}{6}(22.5-20)=102.5833
\end{align*}

Application of Quartiles

By analyzing quartiles, one can get insights into the:

  • Spread of the data: The distance between $Q_1$ and $Q_3$ (called the interquartile range or IQR) indicates how spread out the data is. A relatively large IQR indicates a wider distribution, while a small IQR shows that the data is more concentrated around the median ($Q_2$).
  • Presence of outliers: If the data points are extremely far from the quartiles, they might be outliers that could skew the analysis of measures like the mean.
Statistics Help

Reference:

Frequently Asked Questions about Quartiles in Statistics

  1. What is the first, second, and third quartile?
  2. How to compute quartiles for ungrouped data?
  3. How to compute quartiles for grouped data?
  4. What is the application of quartiles?
  5. Give some Numerical examples of quartiles.

R Frequently Asked Questions

Online MCQs Test Quiz with Answers

Percentiles: Relative Standing

Percentiles are a measure of the relative standing of observation within a data. Percentiles divide a set of observations into 100 equal parts, and percentile scores are frequently used to report results from national standardized tests such as NAT, GAT, and GRE, etc.

The $p$th percentile is the value $Y_{(p)}$ in order statistic such that $p$ percent of the values are less than the value $Y_{(p)}$ and $(100-p)$ (100-p) percent of the values are greater $Y_{(p)}$. The 5th percentile is denoted by $P_5$, the 10th by $P_{10}$ and 95th by $P_{95}$.

Percentiles for the Ungrouped data

To calculate percentiles (a measure of the relative standing of an observation) for the ungrouped data, adopt the following procedure:

  1. Order the observation
  2. For the $m$th percentile, determine the product $\frac{m.n}{100}$. If $\frac{m.n}{100}$ is not an integer, round it up and find the corresponding ordered value and if $\frac{m.n}{100}$ is an integer, say k, then calculate the mean of the $K$th and $(k+1)$th ordered observations.

Example: For the following height data collected from students find the 10th and 95th percentiles. 91, 89, 88, 87, 89, 91, 87, 92, 90, 98, 95, 97, 96, 100, 101, 96, 98, 99, 98, 100, 102, 99, 101, 105, 103, 107, 105, 106, 107, 112.

Solution: The ordered observations of the data are 87, 87, 88, 89, 89, 90, 91, 91, 92, 95, 96, 96, 97, 98, 98, 98, 99, 99, 100, 100, 101, 101, 102, 103, 105, 105, 106, 107, 107, 112.

\[P_{10}= \frac{10 \times 30}{100}=3\]

So the 10th percentile i.e. $P_{10}$ is the 3rd observation in sorted data is 88, which means that 10 percent of the observations in the data set are less than 88.

\[P_{95}=\frac{95 \times 30}{100}=28.5\]

The 29th observation is our 95th Percnetile i.e., $P_{95}=107$

Percentiles for the Frequency Distribution Table (Grouped data)

The $m$th percentile (a measure of the relative standing of an observation) for the Frequency Distribution Table (grouped data) is

\[P_m=l+\frac{h}{f}\left(\frac{m.n}{100}-c\right)\]

Like median, $\frac{m.n}{100}$ is used to locate the $m$th percentile group.

$l$    is the lower class boundary of the class containing the $m$th percentile
$h$   is the width of the class containing $P_m$
$f$    is the frequency of the class containing
$n$   is the total number of frequencies $P_m$
$c$    is the cumulative frequency of the class immediately preceding the class containing $P_m$

Note that the 50th percentile is the median by definition as half of the values in the data are smaller than the median and half of the values are larger than the median. Similarly, the 25th and 75th percentiles are the lower ($Q_1$) and upper quartiles ($Q_3$) respectively. The quartiles, deciles, and percentiles are also called quantiles or fractiles.

Percentiles: Measure of Relative Standing

Example: For the following grouped data compute $P_{10}$, $P_{25}$, $P_{50}$, and $P_{95}$ given below.Solution:

  1. Locate the 10th percentile (lower deciles i.e. $D_1$)by $\frac{10 \times n}{100}=\frac{10 \times 3o}{100}=3$ observation.
    so, $P_{10}$ group is 85.5–90.5 containing the 3rd observation
    \begin{align*}
    P_{10}&=l+\frac{h}{f}\left(\frac{10 n}{100}-c\right)\\
    &=85.5+\frac{5}{6}(3-0)\\
    &=85.5+2.5=88
    \end{align*}
  2. Locate the 25th percentile (lower quartiles i.e. $Q_1$)  by $\frac{10 \times n}{100}=\frac{25 \times 3o}{100}=7.5$ observation.
    so, $P_{25}$ group is 90.5–95.5 containing the 7.5th observation
    \begin{align*}
    P_{25}&=l+\frac{h}{f}\left(\frac{25 n}{100}-c\right)\\
    &=90.5+\frac{5}{4}(7.5-6)\\
    &=90.5+1.875=92.375
    \end{align*}
  3. Locate the 50th percentile (Median i.e. 2nd quartiles, 5th deciles) by $\frac{50 \times n}{100}=\frac{50 \times 3o}{100}=15$ observation.
    so, P50 group is 95.5–100.5 containing the 15th observation
    \begin{align*}
    P_{50}&=l+\frac{h}{f}\left(\frac{50 n}{100}-c\right)\\
    &=95.5+\frac{5}{10}(15-10)\\
    &=95.5+2.5=98
    \end{align*}
  4. Locate the 95th percentile by $\frac{95 \times n}{100}=\frac{95 \times 30}{100}=28.5$th observation.
    so, $P_{95}$ group is 105.5–110.5 containing the 3rd observation
    \begin{align*}
    P_{95}&=l+\frac{h}{f}\left(\frac{95 n}{100}-c\right)\\
    &=105.5+\frac{5}{3}(28.5-26)\\
    &=105.5+4.1667=109.6667
    \end{align*}

The percentiles and quartiles may be read directly from the graphs of the cumulative frequency function.

Further Reading: https://en.wikipedia.org/wiki/Percentile

Drawing Graphs and Charts in R Language