Tagged: Quartiles

Quantiles or Fractiles

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. Let us start learning about 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. Thus $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}

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 Fractions

Read More about: Quartiles, Deciles, and Percentiles

Quartiles: Measure of relative standing of an observation within data

Like Percentile and Deciles, Quartiles is a type of Quantile, which is a measure of the relative standing of observation within the data set. Quartiles are the 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) is the value of order statistic that exceeds 1/4 of the observations and less than the remaining 3/4 observations. The third quartile is known as upper quartile is the value in the order statistic that exceeds 3/4 of the observations and is less than remaining 1/4 observations, while the second quartile is the median.

Quartiles 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 in both sides.

Example: Find the $Q_1, Q_2$ and $Q_3$ for the following ungrouped data set 88.03, 94.50, 94.90, 95.05, 84.60.Solution: We split the order statistic at the median and calculate 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.

\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 forth observation})
\end{align*}

Quartiles 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 to 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.

Example: Find the quartiles for the following grouped dataQuartiles, Deciles, Percentiles for 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 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*}

Reference:

x Logo: Shield Security
This Site Is Protected By
Shield Security