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 Q1 as its first quartile and Q3 as its third quartile, theoretically we can conclude that 25% of the data have values less than or equal to Q1 and 75% of the data have values less than or equal to Q3. Additionally, the median of the data can be viewed as the second quartile, Q2. Theoretically, half of the data have values less than or equal to Q2. 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: X1, X2, X3, …, Xn. (Thus, X1 ≤ X2 ≤ X3 ≤ … ≤ Xn) The quartiles are defined as follows.
The first quartile: Q1 = Xb where
The third quartile: Q3 = Xa 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 X1 = X2 = 29, X3 = 38, X4 = 47, X5 = 56, …, X14 = 90. To find the first quartile, compute .
Thus, Q1 = Xb = X3.75. Now, the problem is how to find X3.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 X3.75 it is assumed that the ratio of the difference between Q1 and X3 to the difference between X4 and Q1 is also p : q. The quartile is calculated by finding the weighted arithmetic mean of X3 and X4. The weights are p and q., i.e. 3 and 1. Since Q1 is closer to X4 than to X3, we put more weight to X4. Consequently, Q1 is determined as follows.
So, in this example
To determine the third quartile, compute
Thus, Q3 = Xa = X11.25. To find X11.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 X11.25 it is assumed that the ratio of the difference between Q3 and X11 to the difference between X12 and Q3 is also p : q. The quartile is calculated by finding the weighted arithmetic mean of X11 and X12. The weights are p and q., that is 3 and 1. Since Q3 is closer to X11 than to X12, we put more weight to X11. As a consequence, Q3 is determined as follows.
So, in this example:
If the data are presented in a frequency distribution table, Q1 is determined by the formula below.
……………………………………………………………………………………………………………………………………………………………….. (*)
where
L1 = 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 L1
fb = 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 kth data, where k = n/4.
The third quartile, Q3, is determined by the following formula.
………………………………………………………………………………………………………………………………………………………. (**)
where
L3 = 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 L3
fa = 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 kth 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.5th data is in the 2nd 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. L1 = 141-0.5 = 140.5. The number of data whose values are less than L1 is (Ʃf)1 = 5. The frequency of the first quartile class is fb = 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.5th data is in the 3rd 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. L3 = 176-0.5 = 175.5. The number of data whose values are less than L3 is (Ʃf)3 = 5 + 13 = 18. The frequency of the third quartile class is fa = 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