Professional Documents
Culture Documents
Sheet 02 HL
Sheet 02 HL
20 April 2018
Exercise H.3
The following diagram shows a bar plot of the absolute frequencies of a sample of size n = 51,
which contains the age of surveyed persons.
14
11
8
6
4
2
0
18 19 20 21 22 23 26 32
a) Determine the relative frequencies of the different values of the variable age and use them to
draw the empirical distribution function.
b) Determine the proportion of persons who are i) younger than 19; ii) older than 22; iii) older
than 21 and not older than 26.
c) Calculate the mode, the empirical mean, the median, as well as the lower and upper quartiles.
Solution:
a) For the variable age, the following values were observed in the sample
n1 = 5, n2 = 15, n3 = 11, n4 = 7, n5 = 6, n6 = 4, n7 = 2, n8 = 1 .
n1 5 15 11 7 6 4 2 1
f1 = = , f2 = , f3 = , f4 = , f5 = , f6 = , f7 = , f8 = .
n 51 51 51 51 51 51 51 51
The empirical distribution function is a step function with jumps at the observed values ui ,
i =1, . . . , 8. With the help of the formula for the empirical distribution function
1 n 1 8
Fn ( x ) = ∑
n i =1
1(−∞,x] ( xi ) =
51 ∑ n j 1(−∞,x] (u j ) ,
j =1
1.0
0.8
0.6
Fn(x)
0.4
0.2
0.0
20 25 30
c) The mode xmod is the most frequently occuring value in the sample and thus it is 19.
The empirical mean is given by
1 51 1 8
1 1050
51 i∑ ∑ n j · u j = 51 (90 + 285 + 220 + 147 + 132 + 92 + 52 + 32) =
x51 = xi = ≈ 20.59 .
=1
51 j =1
51
Since the number of observations is odd, the median is given by
x̃0.5 = x( 51+1 ) = x(26) = 20 .
2
The lower and upper quartiles correspond to the 0.25 and 0.75 quantiles, respectively. Since
51 · 0.25 = 12.75 and 51 · 0.75 = 38.25, the lower and upper quartiles are given by
x̃0.25 = x(13) = 19 and x̃0.75 = x(39) = 22 .
d) The range is defined as the difference between the maximum and the minimum and hence it
is given by
Sp = 32 − 18 = 14 .
The interquartile range is the difference between the upper and the lower quartile. Thus, with
the help of Part c), we get
IQR = x̃0.75 − x̃0.25 = 22 − 19 = 3 .