You are on page 1of 27

Quartiles and interquartile

range
Quartiles
• Are the summary measures that divide a ranked data set into four
equal parts.

• Three measures will divide any data set into four equal parts:
• Q1- first quartile
• Q2- second quartile
• Q3- third quartile

• The data should be ranked in increasing order before the quartiles are
determined.
Quartiles
Q1- first quartile (25% of the values in a ranked data set)
Q2- second quartile (50%) = Median
Q3- third quartile (75% of the values in a ranked data set)

Each of these proportions contains 25% of the


observations of a data set arranged in increasing order

25% 25% 25% 25%

Q1 Q2 Q3
Formulas

1
First Quartile 25% = (𝑛 + 1)
4

1
Second Quartile = Median 50% = (𝑛 + 1)
2

3
Third Quartile 75% = (𝑛 + 1)
4
Interquartile range

The difference between the third and the first quartiles - IQR:

IQR = Q3 - Q1
Intequartile Range
50%

25% 25% 25% 25%

Min Q1 Q2 Q3 Max
Example
• The following are the ages of nine employees of an insurance
company:

47 28 39 51 33 37 59 24 33

• Find the values of the three quartiles. Where does the age of 28 fall in
relation to the ages of these employees?
• Find the interquartile range.
Solution
• First we rank the given values in increasing order:

24 28 33 33 37 39 47 51 59

1 1
Median 50% = 𝑛+1 = 9+1 =5
2 2
Q1

Values less than the median Values greater than the median

24 28 33 33 37 39 47 51 59

1 1
First Quartile 25% = 𝑛+1 = 9 + 1 = 2.5
4 4
Q1

Values less than the median Values greater than the median

24 28 33 33 37 39 47 51 59

28+33
First Quartile = = 30.5
2
Q3

Values less than the median Values greater than the median

24 28 33 33 37 39 47 51 59

3 3
Third Quartile 75% = (𝑛 + 1) = 9 + 1 = 7.5
4 4
Q3

Values less than the median Values greater than the median

24 28 33 33 37 39 47 51 59

47+51
Third Quartile = = 49
2
Solution

24 28 33 33 37 39 47 51 59

The values of the three quantiles are:

Q1 = 30.5 years, Q2 = 37 years, Q3 = 49 years,

The age of 28 falls into the lowest 25% of ages.


Solution
The interquartile range is:

IQR = Q3 – Q1

IQR = Q3 – Q1 = 49 - 30.5 = 18.5 years


Box-and-whisker plot
Box-and-whisker plot
gives a graphic presentation of data using five measures:
1. the median
2. first quartile
3. third quartile,
4. the smallest value and
5. the largest value in the data set between the lower and the upper
inner fences
Box-and-whisker plot (cont)

• Box-and-whisker plot can help us visualize the center, the spread and
the skewness of a data set.
• It also detect outliers.
• We can compare different distributions by making Box-and-whisker
plot for each of them
Example
• The following data are the incomes (in thousand of lek) for a sample of
12 households.

35 29 44 72 34 64 41 50 54 104 39 58

Construct a box-and-whisker plot for these data.


Solution
35 29 44 72 34 64 41 50 54 104 39 58

1) Rank the data in increasing order:

29 34 35 39 41 44 50 54 58 64 72 104

Calculate the Me, Q1, Q3 and IQR.


29 34 35 39 41 44 50 54 58 64 72 104
1 13 44+50
Median = (𝑛 + 1)= = 6.5 Median = = 47
2 2 2

1 13 35+39
Q1 = 𝑛+1 = = 3.5 Q1 = = 37
4 4 2

3 39 58+64
Q3 = (𝑛 + 1) = = 9.75 Q3 = = 61
4 4 2

IQR= 𝑄3 − 𝑄1 IQR= 61 − 37 = 24
2) The lower and the upper inner fences
are the points that are 1.5 x IQR below Q1 and 1.5 x IQR above Q3.

1.5 x IQR = 1.5 x 24 = 36


Lower inner fence = Q1 - 36 = 37 - 36 = 1
Upper inner fence = Q3 + 36 = 61 + 36 = 97
3) Determine the smallest and the largest values in the
data set between the lower and the upper inner fences
• The smallest and the largest values in the given data within the two
inner fences are

smallest value within the two inner fences = 29


largest value within the two inner fences = 72

29 34 35 39 41 44 50 54 58 64 72 104
4 step) Box-plot

Q1 Me Q3

25 35 45 55 65 75 85 95 105
Box-plot

Smallest value Largest value


within the two within the two
inner fences Q1 Me Q3 inner fences

25 35 45 55 65 75 85 95 105
Outliers
• The observations that fall outside the two inner fences are called
outliers.

3.0 x IQR = 3.0 x 24 = 72


Lower the two inner fence = Q1 - 72 = 37 - 72 = -35
Upper the two inner fence = Q3 + 72 = 61 + 72 = 133
Box-plot
An
Smallest value Largest value outlier
within the two within the two
inner fences Q1 Me Q3 inner fences

25 35 45 55 65 75 85 95 105
Exercise
• The following data give the weights (in kg) lost by 15 members of a
health club at the end of two months after joining the club.

5 10 8 7 25
12 5 8 11 18
14 11 10 21 9

• Construct a box and whisker plot.

You might also like