While the median splits data into two groups with an equal number of data, the quartiles separate them into four groups with an equal number of data. If a set of data has Q_{1} as its first quartile and Q_{3} as its third quartile, theoretically we can conclude that 25% of the data have values less than or equal to Q_{1} and 75% of the data have values less than or equal to Q_{3}. Additionally, the median of the data can be viewed as the second quartile, Q_{2}. Theoretically, half of the data have values less than or equal to Q_{2}. To elaborate more about the median, click here.

Suppose that we are examining n data at ordinal scale, sorted from the smallest to the largest as follows: X_{1}, X_{2}, X_{3}, …, X_{n}. (Thus, X_{1} ≤ X_{2} ≤ X_{3} ≤ … ≤ X_{n}) The quartiles are defined as follows.

**The first quartile**: Q_{1} = X_{b} where

**The third quartile**: Q_{3} = X_{a} where

**Example 1**

Fourteen students took a Social Statistics quiz. Their scores are as follows.

47 56 71 65 29 68 78 73 80 75 29 38 65 90

Find the first and the third quartiles.

**Answer**

Firstly, sort the data from smallest to largest. This results in:

29 29 38 47 56 65 65 68 71 73 75 78 80 90

Let X_{1} = X_{2} = 29, X_{3} = 38, X_{4} = 47, X_{5} = 56, …, X_{14} = 90. To find the first quartile, compute .

Thus, Q_{1} = X_{b} = X_{3.75}. Now, the problem is how to find X_{3.75}. In the real numbers line, 3.75 is located between 3 and 4. Let the difference between 3.75 and 3 be p and the difference between 4 and 3.75 be q. Thus, p : q = (3.75 – 3) : (4 – 3.75) = 0.75 : 0.25 = 3 : 1. To find X_{3.75} it is assumed that the ratio of the difference between Q_{1} and X_{3} to the difference between X_{4} and Q_{1} is also p : q. The quartile is calculated by finding the weighted arithmetic mean of X_{3} and X_{4}. The weights are p and q., i.e. 3 and 1. Since Q_{1} is closer to X_{4} than to X_{3}, we put more weight to X_{4}. Consequently, Q_{1} is determined as follows.

So, in this example

To determine the third quartile, compute

Thus, Q_{3} = X_{a} = X_{11.25}. To find X_{11.25}, first note that in the real numbers line, 11.25 is located between 11 and 12. Let the difference between 11.25 and 11 be p and the difference between 12 and 11.25 be q. Thus, p : q = 1 : 3. To find X_{11.25} it is assumed that the ratio of the difference between Q_{3} and X_{11} to the difference between X_{12} and Q_{3} is also p : q. The quartile is calculated by finding the weighted arithmetic mean of X_{11} and X_{12}. The weights are p and q., that is 3 and 1. Since Q_{3} is closer to X_{11} than to X_{12}, we put more weight to X_{11}. As a consequence, Q_{3} is determined as follows.

So, in this example:

If the data are presented in a frequency distribution table, Q_{1} is determined by the formula below.

……………………………………………………………………………………………………………………………………………………………….. (*)

where

L_{1} = the lower class boundary (LCB) of the first quartile class

n = the sum of all frequencies (= the number of data)

(Ʃf)_{1} = the number of data whose values are less than L_{1}

f_{b} = the frequency of the first quartile class

c = the first quartile class’ width

(Regarding LCB and class width, please refer to The Anatomy of Frequency Distribution Tables.)

Note: The first quartile class is the class in the frequency distribution table that contains the k^{th} data, where k = n/4.

The third quartile, Q_{3}, is determined by the following formula.

………………………………………………………………………………………………………………………………………………………. (**)

where

L_{3} = the lower class boundary (LCB) of the third quartile class

n = the sum of all frequencies (= the number of data)

(Ʃf)_{3} = the number of data whose values are less than L_{3}

f_{a} = the frequency of the third quartile class

c = the third quartile class’ width

Note: The third quartile class is the class in the frequency distribution table that contains the k^{th} data, where k = 3n/4.

**Example 2**

The frequency distribution table below shows the employees’ monthly expenditure on mobile phone telecommunication. Find the quartiles.

**Answer**

The first step is to insert an additional column to the right of the the column indicating frequencies, which is the one with the column heading “Number of Employees”. Name the new column “Data Numbers”. Since the first class contains 5 data, the first class’ data numbers are from 1 to 5. The second class contains 13 data, so its data numbers are 6 to 18. Continuing this way, we have the following table.

(We have renamed the third column “Frequency”.)

In this example, the sum of all frequencies is n = 50, thus n/4 = 50/4 = 12.5. From the entries of Data Numbers column, we know that the 12.5^{th} data is in the 2^{nd} class with the class interval 141-175. This class is called the first quartile class. Then, we calculate the first quartile class’ LCB, i.e. L_{1} = 141-0.5 = 140.5. The number of data whose values are less than L_{1} is (Ʃf)_{1} = 5. The frequency of the first quartile class is f_{b} = 13. The first quartile class’ width is c = 175.5-140.5 = 35. Substituting these values into (*), we get::

So, the first quartile of the employees’ monthly expenditure on mobile phone telecommunication is IDR 160,692.

To calculate the third quartile, we first compute 3n/4 = 3⋅50/4 = 37.5. From the entries of Data Numbers column, we know that the 37.5^{th} data is in the 3^{rd} class with the class interval 176-210. This class is called the third quartile class. Then, we calculate the third quartile class’ LCB, i.e. L_{3} = 176-0.5 = 175.5. The number of data whose values are less than L_{3} is (Ʃf)_{3} = 5 + 13 = 18. The frequency of the third quartile class is f_{a} = 20. The third quartile class’ width is c = 210.5-175.5 = 35. Substituting these values into (**), we get::

So, the third quartile of the employees’ monthly expenditure on mobile phone telecommunication is IDR 209,625.

**References**

Shukla, M. C., S. S., Gulshan, Elements of Statistics for Commerce Students, S. Chand&Co.(Pvt) Ltd., 1971

Spiegel, M. R., Theory and Problems of Statistics, McGraw-Hill Inc., 1981