T9 Random Variables (L) 2020 - 2021 by Nuraini
T9 Random Variables (L) 2020 - 2021 by Nuraini
T9 Random Variables (L) 2020 - 2021 by Nuraini
Possible outcome HH HT TH TT
Number of head 2 1 1 0
x 0 1 2
P X x
1 2 1
4 4 4
(b) Two dice are tossed.
Let Random Variable Y = “The sum of the scores on the two dice”
Let’s make a table of possible values:
1st Die
1 2 3 4 5 6
1 2 3 4 5 6 7
2 3 4 5 6 7 8
2nd 3 4 5 6 7 8 9
Die 4 5 6 7 8 9 10
5 6 7 8 9 10 11
6 7 8 9 10 11 12
1 of 58
Lecture Note: 1 of 5 Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
Let's count how often each value occurs, and work out the probabilities:
1
2 occurs just once, then P Y 2 .
36
2 1
3 occurs twice, then P Y 3 .
36 18
3 1
4 occurs three times, then P Y 4 and so on.
36 12
y 2 3 4 5 6 7 8 9 10 11 12
P Y y
1 2 3 4 5 6 5 4 3 2 1
36 36 36 36 36 36 36 36 36 36 36
x
RANDOM
VARIABLES
Discrete Continuous
Random Variable Random Variable
2 of 58
Lecture Note: 1 of 5 Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
P X x 1
k
i
i1
*The variable is said to be a discrete random variable if the sum of the probabilities is 1.
The probability distribution can be presented in the form of table, function or graph.
A table which allocates a probability value to each value of a discrete random variable X
is called a probability distribution table. For example:
x 0 1 2
P X x
1 2 1
4 4 4
A function which relates the values of a discrete random variable X to their respective
associated probabilities is called a probability distribution function. For example:
0.2, x 2, 4,6,
P X x 0.1, x 1,3,5,7,
0, otherwise.
3 of 58
Lecture Note: 1 of 5 Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
i1
Expectation Variance
Mean of X. Variance of X.
Denoted by E X or . Denoted by Var X or 2 .
Formula: Formula:
i1
where E X 2 xi2P X xi
n
i1
Proof:
Var X E X
2
E X 2X 2
2
E X 2 2E X 2
E X 2 E X
2
Properties: Properties:
E a a Var a 0
*The above properties of expectation and variance are true for both discrete and continuous random
variables.
4 of 58
Lecture Note: 1 of 5 Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
EXAMPLE 1
X is a random variable with probability distribution function given by
0.2, x 2, 4,6,
P X x 0.1, x 1,3,5,7,
0, otherwise.
(a) Show that X is a discrete random variable.
P X x P X 1 P X 2 P X 3 P X 4
P X 5 P X 6 P X 7
0.1 0.2 0.1 0.2 0.1 0.2 0.1
1
x 1 2 3 4 5 6 7
(e) Find the cumulative distribution function for X and hence, determine the median. Sketch
the graph of F x.
x 1 2 3 4 5 6 7
F x 0.1 0.3 0.4 0.6 0.7 0.9 1
x
5 of 58
Lecture Note: 1 of 5 Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
0, x 1,
0.1, 1 x 2,
0.3, 2 x 3,
3 x 4,
F x
0.4,
0.6, 4 x 5,
0.7, 5 x 6,
0.9, 6 x 7,
1, x 7.
F m 0.5, where m is the median,
m4
(f) Find
(i) P 1 X 5
P 1 X 5 P X 2 P X 3 P X 4
0.2 0.1 0.2
0.5
(ii) P 1 X 5
P 1 X 5 P X 2 P X 3 P X 4 P X 5
0.2 0.1 0.2 0.1
0.6
(iii) P 1 X 5
P 1 X 5 P X 1 P X 2 P X 3 P X 4
0.1 0.2 0.1 0.2
0.6
(iv) P X 5
P X 5 P X 6 P X 7
0.2 0.1
0.3
(v) P X 3
P X 3 P X 1 P X 2 P X 3
0.1 0.2 0.1
0.4
6 of 58
Lecture Note: 2 of 5 Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
EXAMPLE 2
X is a discrete random variable with probability distribution function
c x 1 , x 1,3,5,
P X x
c x 1 , x 4,6.
2
(a) Find the value of c and construct the probability distribution table for X.
x 1 3 4 5 6
P X x 2c 4c 9c 6c 25c
P X x 1
6
i
i1
2c 4c 9c 6c 25c 1
1
c
46
x 1 3 4 5 6
P X x
1 2 9 3 25
23 23 46 23 46
x
Hence, find
(i) P x 2 2.
P X 2 2 P 2 X 2 2
P 0 X 4
P X 1 P X 3 P X 4
1 2 9
23 23 46
15
46
7 of 58
Lecture Note: 2 of 5 Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
(c) Calculate E X and Var X . Hence, find the Variance of Y, where Y 5X 30.
i1
616
52
23
41
23
8 of 58
Lecture Note: 2 of 5 Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
EXAMPLE 3
The cumulative distribution, F x of a discrete random variable X is defined as follows:
0, x 2,
1
, 2 x 3,
5
8
F x , 3 x 4,
15
4 , 4 x 5,
5
1, x 5.
(a) Find
(i) P X 3 (ii) P X 3
P X 3 F 3 P X 3 1 P X 3
8 1 F 3
15 8
1
15
7
15
(iii) P X 3 (iv) P 2 X 5
P X 3 P X 3 P X 2 P 2 X 5 P X 5 P X 2
F 3 F 2 F 5 F 2
8 1 1
1
15 5 5
1 4
3 5
(v) P 3 X 5 (vi) P 2 X 5
P 3 X 5 P X 4 P X 2 P 2 X 5 P X 5 P X 1
F 4 F 2 F 5 F 1
4 1 10
5 5 1
3
5
9 of 58
Lecture Note: 2 of 5 Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
x 2 3 4 5
F x
1 8 4
1
5 15 5
f x
1 1 4 1
5 3 15 5
1
, x 2,5,
5
1
, x 3,
f x 3
4
x 4,
15
,
0, otherwise.
EXAMPLE 4
A bag contains four pieces of red towels and three yellow towels. The towels are to be drawn at
random one by one without replacement from the bag until a piece of red towel is obtained. If X is
the total number of towels drawn from the bag, construct the probability distribution table for X.
x 1 2 3 4
P X x
4 2 4 1
7 7 35 35
x
10 of 58
Lecture Note: 3 of 5 Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
F x P X x P X x f x dx
x
F x is given by the area under the curve y f x from up to x as indicated by
the shaded region.
11 of 58
Lecture Note: 3 of 5 Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
f x F x
To show that it is a PDF f x dx 1 F 1
At x a,
To find unknown constants
f x dx 1
F a F a
P x a or P x a f x dx F a
a
P x a or P x a f x dx 1 F a
a
Mean or Expectation, E X E X xf x dx
Variance, Var X
where E X 2
x 2f x dx
12 of 58
Lecture Note: 3 of 5 Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
EXAMPLE 5
The function f is defined as
3 2
x , 1 x 2,
f x 7
0, otherwise.
(a) Show that the function is the probability density function.
3 2
f x dx
2
x dx
1 7
x3
2
7 1
23 13
7 7
1 shown
3 5
P X
3 2 3 2
P X 2 3 2 x dx
2 1 7
x dx 4
5
4
7
x3
3 2
x3 2
7 5
7 1 4
3 3 3
13 23 5
2 4
7
7 7 7
19 387
56 448
1 3
(iii) P X
3 2
1 3
3
P X 0dx
1
2 3 2
x dx
3 2
1
3
1 7
3
x3 2
7 1
3 3
13
2
7
7
19
56
13 of 58
Lecture Note: 3 of 5 Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
(c) Sketch the graph of the function. Hence, find the mode.
EXAMPLE 6
A continuous random variable X has probability density function as f x kx3 for 0 x 4.
Find
(a) the value of k.
f x dx 1
4
kx3 dx 1
0
kx4
4
1
4 0
k 4 k 0
4 4
1
4 4
64k 1
1
k
64
(b) E X and E X 2 .
E X 2
E X
xf x dx
x2f x dx
1 1
x x3 dx x2 x3 dx
4 4
0 64 0 64
4
x5
0 64 dx 0 64 dx
x 4 4
x5 x6
4 4
320 0 384 0
4 4
5 6
0 0
320 384
16 32
5 3
14 of 58
Lecture Note: 3 of 5 Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
(c) Var X .
32 16
2
3 5
32
75
32
0 9
75
96
25
15 of 58
Lecture Note: 4 of 5 Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
EXAMPLE 7
The continuous random variable X has probability density function
a ax 1
, 0x ,
3 3 2
f x ax 1
, x 1,
3 2
0,
otherwise.
(a) Find the value of the constant a.
f x dx 1
1
a ax
2 3
dx 1 ax dx 1
1
2
0 3 3
1
ax ax2 2 ax2
1
1
3 6 0 6 1
2
1
a a 1 a 0 a 02 a 12 a 1
2 2
2 1
2 3 6 6 2
3 6 6
a4
1 2
(b) Find P X .
3 3
1 2
1 2
P X
3 3 1
3
2
3 3 2 3
4 4x dx 13 4x dx
1 2
4 x 4x 2 2 4 x2 3
3 6 1 6 1
3 2
1 2 2 2 2
4 4 1 4 1 4 1 4 2 4 1
2 2 3 3 3 2
3 6 3 6 6 6
7
27
16 of 58
Lecture Note: 4 of 5 Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
4 4x 1 4x
1
E X 0
2
x dx 1 x dx
3 3 2
3
1
4x 4x2 1 4x 2
0
2
3 3
dx 12 3 dx
1
4 x 2 4 x 3 2 4 x3
1
6 9 0 9 1
2
1 2 1
3
3
1 3
4
3
4 2
2
2 4 4 0
4 0 4 1
2
6
9 9
6 9 9
1
2
1
4 4x 4x
E X 2 x2 dx 1 x2 dx
1
2
0 3 3 3
2
1
4x2 4x3 1 4 x3
0
2
3 3
dx 12 3 dx
1
4 x3 4 x 4 2 4 x 4 1
9 12 0 12 1
2
1 3 1 4
4 14 4 1
4
4
4
3
2 4 2 4 0 4 0
9 12 12 2
9 12 12
25
72
Var X E X 2 E X
2
25 1
2
72 2
7
72
17 of 58
Lecture Note: 4 of 5 Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
EXAMPLE 8
1
X is a continuous random variable with probability density function f x x, where
8
0 x 4.
(a) Find the cumulative distribution function, F x.
Interval F x F c
F x
x
F 0 0
0 dx
x0
0
F x 0
x 1
xdx
0 8
x2 42
F 4
x
0x4
16 16
0 1
x2
16
x
0, x0
x2
F x , 0 x 4,
16
1, x 4.
1 y F x
18 of 58
Lecture Note: 4 of 5 Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
(c) Calculate
(i) P X 1
P X 1 F 1
1
2
16
1
16
3
(ii) P X
2
3 3
P X 1 F
2 2
3
2
2
1
16
55
64
(iii) P 2 X 3
P 2 X 3 F 3 F 2
3 2
2 2
16 16
5
16
19 of 58
Tutorial 9: 8 Hours Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
EXAMPLE 9
The probability density function of a continuous random variable X is defined as
6x
, 0 x 1,
17
f x 6x 2
, 1 x 2,
17
0,
otherwise.
Interval F x F c
F x
x
F 0 0
0dx
x0
0
F x 0
x 6x
dx
17 3 1
0 2
6x 2 x F 1
0 x 1 17
34
0
3
3x 2 17
17
x 6x 2
17 1 17
3
F x dx
6x 3
x
3
17 51 1 2 2 1
3
1x2 F 2
2x3 2 1 17
3
3
1
17 17 17
2x 1
3
17
x
0,
x 0,
3 x2
, 0 x 1,
F x 3
17
2x 1
, 1 x 2,
17
x 2.
1,
20 of 58
Tutorial 9: 8 Hours Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
(b) Find
3
(i) P X
2
3 3
P X F
2 2
3
3
2 1
2
17
31
68
1
(ii) P X
2
1 1
P X 1 F
2 2
1
2
3
2
1
17
65
68
3 4
(iii) P X
4 3
3 4 4 3
P X F F
4 3 3 4
4 3
3 2
21 of 58
Tutorial 9: 8 Hours Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
EXAMPLE 10
The cumulative distribution function, F x of a continuous random variable X is defined as
follows:
0, x 2,
1 2 x , 2 x 0,
12
F x a ,
x
0 x 4,
6
b x , 4 x 6,
12
1, x 6.
(a) Find the values of the constants a and b.
At x 0, At x 6,
F (0 ) F (0 )
F (6 ) F (6 )
0 1 6
a 2 0 b 1
6 12 12
1 1
a b
6 2
(b) Find the probability density function, f x. (c) Calculate P 3 X 5.
P 3 X 5 F 5 F 3
Interval f x
1 5 1 3
d
x 2 f x 0 0 2 12 6 6
dx
1
d 1 1
2 x 0 f x 2 x 4
dx 12 12
d 1 x 1
0x4 f x
dx 6 6 6
d 1 x
1
4x6 f x
dx 2 12 12
d
x6 f x 1 0
dx
1
, 2 x 0,
12
1
, 0 x 4,
f x 6
1
4 x 6,
12
,
0,
otherwise.
22 of 58
Tutorial 9: 8 Hours Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
SUMMARY
P X x 1
n
To show that it is
a PDF i1
i
f x dx 1
Cumulative F x P X x F x P X x
Distribution
P X xi
n
f x dx
x
Function, CDF
i1
P X m 0.5 P X m 0.5
Median, m or or
F m 0.5 f x dx 0.5
m
Expected or Mean,
x P X x
n
E X i1
i i
xf x dx
i1
x2f x dx
E a a
Properties: E aX aE X
E aX b aE X b
where a and b are constants
Var a 0
Standard
Deviation, Var X
23 of 58
Tutorial 9: 8 Hours Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
2k 2 k 1 k 2 2k 2 1
4k 2 3k 1 0
k 14k 1 0
1
k 1, k
4
1
k
4
x 0 1 2 3
P X x
1 1 1 1
8 4 2 8
x
(b) Find the probability that the company receives at least two requests in a day.
P X 2 P X 2 P X 3
1 1
2 8
5
8
24 of 58
Tutorial 9: 8 Hours Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
f x 120 2 3 8 30 1
1 1 1 1 1
(b) Find the probability that a resident has more than two vehicles.
1 1 19
P x 2 P x 3 P x 4
8 30 120
(c) Find the cumulative distribution function for X and hence, determine the median.
For x 0, F x 0
0, x 0,
1
1
, 0 x 1,
For 0 x 1, F x
120
120
61
1 x 2,
1 1 61 120 ,
For 1 x 2, F x F x
120 2 120
101
, 2 x 3,
61 1 101
120
For 2 x 3, F x
120 3 120
29
, 3 x 4,
30
For 3 x 4, F x
101 1 29
120 8 30
1, x 4.
(d) Let Y 30X 10 be the monthly fee (in RM) imposed by a security company. Find
the expected amount of monthly fee to be paid.
1 1
E X xf x 0 1 2 1 3 1 4 1 67
120 2 3 8 30 40
67
E Y E 30X 10 30E X E 10 30 10
241
or 60.25
40 4
25 of 58
Tutorial 9: 8 Hours Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
x 0 1 2 3 4 5
E X xP X x
0 0.15 1 0.05 2 0.05 3 0.15 4 0.25 5 0.35
3.35
E X 2 x 2 P X x
02 0.15 12 0.05 22 0.05 32 0.15 4 2 0.25 52 0.35
14.35
E Y E 5 2X
E 5 2E X
5 2 3.35
1.7
14.35 3.35
2
3.1275
Var Y Var 5 2X
= 2 Var X
2
4 3.1275
12.51
26 of 58
Tutorial 9: 8 Hours Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
4. A nurse works five days in a week. The number of days in a week she works overtime is a
discrete random variable X with probability function
k
3x 1 , x 0,1,2,
3
k
f x
x 2 , x 3,4,
3
k
x 1, x 5,
3
1
where k is a constant. Show that k .
5
f x 1
k 2k 5k k 2k 4k
1
3 3 3 3 3 3
1
k
5
(a) Find the probability she works overtime every day in a week.
4
P X 5
15
(b) Calculate the probability that she will work overtime for at least three days in a week.
1 1 1
P X 3 3 2 4 2 5 1
15 15 15
7
15
(c) Determine the most likely number of days in week she will work overtime.
5 1
P X 2
15 3
x2
(d) Find the expected number of day in week she will work overtime.
Hence, evaluate E 3X 1.
27 of 58
Tutorial 9: 8 Hours Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
Var X 0.61
E X 2 E X 0.61
2
E X 2 1.3 0.61
2
E X 2 2.3
02 a 12 b 22 c 2.3
b 4c 2.3
a b c 1
Substitute into ,
1.3 2c 4c 2.3
c 0.5
When c 0.5,
b 1.3 2 0.5
0.3
28 of 58
Tutorial 9: 8 Hours Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
P X x 1
6
i
i1
a 2a 3a 4a 5a 6a 1
21a 1
1
a shown
21
x P X x
6
E X i i
i1
E X 2 xi2P X xi
6
i1
13
2
21
3
20
9
29 of 58
Tutorial 9: 8 Hours Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
(c) Find the cumulative distribution function of X and sketch the graph of F x.
For x 1, F x 0
1
For 1 x 2, F x
21
1 2 3
For 2 x 3, F x
21 21 21
3 3 6
For 3 x 4, F x
21 21 21
6 4 10
For 4 x 5, F x
21 21 21
10 5 15
For 5 x 6, F x
21 21 21
15 6
For x 6, F x 1
21 21
0,
x 1,
1
, 1 x 2,
21
3
2 x 3,
21
,
6
F x , 3 x 4,
21
10
, 4 x 5,
21
15
, 5 x 6,
21
1, x 6.
(d) Find P 4 X 3E X 2 .
4X 3E X 2 4X 13 2
4X 13 2 or 4X 13 2
X 3.75 or X
P 4X 3E X 2 P X 2 P X 4
F 2 1 F 3
3 6
1
21 21
6
7
30 of 58
Tutorial 9: 8 Hours Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
6 5 5
5 5 5 5
C0 C1 C2 C3 C4 C
P X xi 5 5 5 5 5 55
i1 2 2 2 2 2 2
1 5 10 10 5 1
32 32 32 32 32 32
1 shown
P X x 1, then
6
Since i g x is a probability distribution function.
i1
(a) Find the probability distribution table of X and sketch the graph of the function.
x 0 1 2 3 4 5
5 5
P X x
1 5 5 1
32 32 16 16 32 32
10
P X 2
32
(ii) P X 2
P X 2 P X 0 P X 1
1 5
32 32
3
16
(iii) P 2 X 4
P 2 X 4 P X 2 P X 3 P X 4
10 10 5
32 32 32
25
32
31 of 58
Tutorial 9: 8 Hours Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
E X xP X x
1 3 1 3 1 3 1 3
0 1 2 3
8 0
8 1
8 2 8 3
3
2
E X 2 x2 P X x
1 3 1 3 1 3 1 3
02 12 22 32
8 0 8 1 8 2 8 3
3
3
2
3
2
3
4
32 of 58
Tutorial 9: 8 Hours Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
9. A committee consisting of 3 people will be chosen at random from 6 men and 3 women. If
X represents the number of men selected,
(a) tabulate the probability distribution P X x.
6
C0 3C3 1
P X 0 9
C3 84
C1 3C2
6
3
P X 1 9
C3 14
6
C2 3C1 15
P X 2 9
C3 28
6
C3 3C0 5
P X 3 9
C3 21
x 0 1 2 3
3 15 5
P X x
1
84 14 28 21
x
E X 2 x 2 P X x
1 18 45 20
02 12 22 32
84 84 84 84
9
2
9
2
2
2
1
2
33 of 58
Tutorial 9: 8 Hours Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
0, x 0,
1
, 0 x 1,
84
19
F X P X x , 1 x 2,
84
16 , 2 x 3,
21
1, x 3.
(d) If Y represents the number of women selected, determine the mean and variance for Y,
without calculating the probability distribution P Y y .
X Y 3
Y 3X
E Y E 3 X
3 E X
3 2
1
Var Y Var 3 X
(1)2 Var X
1
(1)
2
1
2
34 of 58
Tutorial 9: 8 Hours Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
x 1 2 4 6
P X x
1 1 1 1
6 2 6 6
x
E X xP X x
1 1 1 1
1 2 4 6
6 2 6 6
5
2
E X 2 x P X x
2
2 1 1 1 1
1 22 42 62
6 2 6 6
65
6
65 5
2
6 2 12
35 of 58
Tutorial 9: 8 Hours Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
11. Let X be the random variable representing the number obtained when dice is rolled. The
probability of the biased dice to give odd numbers is three times higher than even numbers
when it is rolled.
(a) If the dice is rolled once,
(i) construct a probability distribution table of X.
P X 1 P X 2 P X 3 P X 6 1
3a a 3a a 3a a 1
1
a
12
x 1 2 3 4 5 6
P X x
1 1 1 1 1 1
4 12 4 12 4 12
x
E X 2 x 2 P X x
1 1 1 1 1 1
12 22 32 42 52 62
4 12 4 12 4 12
161
12
(b) If the dice is rolled 100 times, find the expected value of getting the number “6”.
1
E X 6 100
12
25
3
36 of 58
Tutorial 9: 8 Hours Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
12. Two dice are thrown and the numbers x and y obtained from each dice are noted. The
discrete random variable W is defined as
xy,
x y,
W
x y , x y.
5
(a) Write all the outcomes for W 4 and hence, show that P W 4 .
36
y
1 2 3 4 5 6
x
1 1 1 2 3 4 5
2 1 4 1 2 3 4
3 2 1 9 1 2 3
4 3 2 1 16 1 2
5 4 3 2 1 25 1
6 5 4 3 2 1 36
(b) Construct a table of the probability distribution of the random variable W. Hence, show
that W is a discrete random variable.
x 1 2 3 4 5 9 16 25 36
2 1 1
P X x
11 5 1 1 1 1
36 9 6 36 18 36 36 36 36
P W w 36 36 36 36 36 36 36 36 36 1
11 8 6 5 2 1 1 1 1
37 of 58
Tutorial 9: 8 Hours Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
E W wP W w
11 8 6 5 2 1 1 1 1
1 2 3 4 5 9 16 25 36
36 36 36 36 36 36 36 36 36
161
36
161
E 3 4W 3 4
36
134
9
38 of 58
Tutorial 9: 8 Hours Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
13. A fair die is thrown once. A random variable represents the score on the uppermost face of
a die. If the score is two or more, then the random variable X is the score. If the score is
one, the die is to be thrown once again and the random variable X is the sum of the scores
of two throws. Construct the probability distribution table for X.
1 1 7
P X 2
6 36 36
1 1 7
P X 3
6 36 36
1 1 7
P X 4
6 36 36
1 1 7
P X 5
6 36 36
1 1 7
P X 6
6 36 36
1
P X 7
36
x 2 3 4 5 6 7
P X x
7 7 7 7 7 1
36 36 36 36 36 36
39 of 58
Tutorial 9: 8 Hours Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
14. A continuous random variable X has the probability density function f x given by
2k, 0 x 1,
f x
3k 3 x , 1 x 3,
0, otherwise.
(a) Find the value of k.
f x dx 1
2kdx 3k 3 x dx 1
1 3
0 1
3k 3 x2
2kx
3
10 1
2 1
2k 6k 1
1
k
8
0.5 8 1 8 3 x dx
2 1.5 3
P 0.5 X 1.5
1
dx
x 3 2
1 1.5
3 x
4 0.5 16 1
0.453
3
P X 2 3 x dx
3
2 8
3 2
3
3 x
16 2
0.1875
40 of 58
Tutorial 9: 8 Hours Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
15. Let the probability density function of a continuous random variable X be defined by
x2
, c x c,
f x 18
0, elsewhere,
with c is a constant.
(a) Show that c 3.
x2
c 18 dx 1
c
x3
c
1
54 c
c3 c3
1
54 54
2c 3
1
54
c3
Interval F x F c
F x F 3 0
x
x 3 0dx 0
x3
x
x2 x3 33
F x 0
1 1
F 3
x
3 x 3 dx 1
54
3 18
3 54 2 54 2
x3 F x 1 0dx 1
3
0,
x 3,
x
F x
3
1
, 3 x 3,
54 2
1, x 3.
41 of 58
Tutorial 9: 8 Hours Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
P 0 X 2 F 2 F 0
23 1 03 1
54 2 54 2
4
27
42 of 58
Tutorial 9: 8 Hours Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
16. The time for patients to experience complications in a week after a heart surgery, X is a
continuous random variable with probability density function given by
a 1 x,
0 x 1,
f x
0, otherwise,
where a is a constant. Show that a 2.
a 1 x dx 1
1
a 1 x2
1
1
2 0
a2
F x F 0 0
0
x0 0dx 0
2m m2 0.5
2m2 4m 1 0
F x 0 2 1 x dx
x
x 1 F x 1 0dx 1
1
0, x 0,
F x 2 x x 2 , 0 x 1,
1, x 1.
43 of 58
Tutorial 9: 8 Hours Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
E X 2x 1 x dx
1
2x 2x dx
1
2
0
2x2 2x3
1
2 3 0
1
3
E X 2 2x2 1 x dx
1
2x 2x3 dx
1
2
0
2x 3 2x 4
1
3 4 0
1
6
1 1
2
=
6 3
1
18
1
= 4
18
2
=
9
44 of 58
Tutorial 9: 8 Hours Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
17. A continuous random variable X has the probability density function f x given by
1
k x 2 x , 0 x 1,
f x
0, otherwise.
(a) Show that k 6.
k x dx 1
1 1
0
2
x
3
1
k 2x x 1
2 2
3 2 0
k
1
6
k6
E X x x 3 2
1 2
Var X
1
6x
dx
14 5
2
0
6
x x
1 3
dx 19
2 2
0
5
1 350
6 2x 2 x
3
6 x dx
1
5
0
2
x3
7
1
6 2x x
2 4
7 4 0
3
14
45 of 58
Tutorial 9: 8 Hours Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
Interval F x F c
F x F 0 0
0
x0 0dx 0
F x 6 x dx
x 1
0
2
x
3 x 3
0 x 1 6 2x x
2
3 2 0 1
3
4 x 2 3x2
x1 F x 1
0, x 0,
3
F x 4x 2 3x2 , 0 x 1,
1, x 1.
3
(d) Show that the median of X, m satisfies the equation 6m 2 8m 2 1 0.
1
F m , where m is median
2
3
1
4m 2 3m 2
2
3
8 m 6m 2 1
2
3
6m 2 8 m 2 1 0
46 of 58
Tutorial 9: 8 Hours Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
18. A commuter travels into town by train and then has to catch a bus from the station to the
office. The time x minutes, that the commuter has to wait for the bus can be modelled by
the probability density function
k,
0 x 4,
1
f x
k 6 x, 4 x 6,
2
0, otherwise.
Interval F x F c
F x F 0 0
x
x0 0dx 0
F x F 4 4k
x
0x4 kdx kx 0x kx
0
F x 4k
1
k 6 x dx
x
4 2
1 x2
x
F 6 3k 6 k 62 4k
1
4k k 6x
2 2 4 4
4x6 1 18k 9k 4k
4k 3kx kx2 12k 4k 5k
4
1 2
3kx kx 4k
4
x6 F x 5k 0dx 5k
6
0,
x 0,
kx, 0 x 4,
F x 1
3kx kx 2 4k , 4 x 6,
4
x 6.
5k ,
47 of 58
Tutorial 9: 8 Hours Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
19. The continuous random variable Y has the following probability density function.
cy 2 , y 1,
f y
0,
otherwise.
Find
(a) the value of c.
1
cy 2 dy 1
1
cy 3
1
1
3 1
2c
1
3
3
c
2
1
(b) P Y .
2
3
y 2 , 1 y 1,
f y
2
0, otherwise.
1
P Y
1 3 2
y dy
2
1
2 2
y3
1
2 1
2
7
16
48 of 58
Tutorial 9: 8 Hours Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
3 3
E Y
1
y dy
1 2
3y 4
1
8
1
0
E Y 2
3 41
y dy
1 2
3y 5
1
10
1
3
5
E Y 2 7 E Y 2 7
3
7
5
38
5
3
Var Y 0
2
5
3
5
1
(d) P Y .
2
1 1 1
P Y P Y
2
2 2
1
3 2
2
1 y dy
2
2
1
y3 2
2 1
2
1
8
49 of 58
Tutorial 9: 8 Hours Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
a b 0 2a 4b 1
a b
Substitute into ,
2 b 4b 1
6b 1
1
b
6
1
When b , a
1
6 6
1
6
3
(b) P X .
2
3 3
P X 1 P X
2
2
3
1 F
2
1 3 1 3 2
1
6 2 6 2
3
8
50 of 58
Tutorial 9: 8 Hours Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
1
(c) the value of m such that P X m .
2
1
F m
2
1 1 1
m m2
6 6 2
m m3 0
2
1 12 4 13
m
2 1
m 2.303, m 1.303
m 1.303
Interval f x
d
x 1 f x 0 0
dx
d 1 1 2 1 1
1 x 2 f x x x x
dx 6 6 6 3
d
x2 f x 1 0
dx
1 1
x, 1 x 2,
f x 6 3
0, otherwise.
(e) E X 2 .
1 1
E X 2 x2 x dx
2
1 6 3
1 2 1 3
x x dx
2
1 6 3
1 1
2
x3 x4
18 12 1
7
4
51 of 58
Tutorial 9: 8 Hours Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
21. The continuous random variable X has cumulative distribution function F x given by
0, x 0,
x2
, 0 x 2,
F x 2
6
x
2x 2, 2 x 3,
3
1, x 3.
Find
(a) P 1 X 2.2.
m 1.73, 0 m 2
Interval f x
d
x0 f x 0 0
dx
d x2 x
0x2 f x
dx 6 3
d x2
2x 2 x 2
2
2x3 f x
dx 3 3
d
x f x 1 0
dx
52 of 58
Tutorial 9: 8 Hours Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
x
, 0x2
3
f x
2x
2, 2 x 3
3
0, otherwise.
0 3 2 3
x2 3
dx 2x dx
2
2x 2
0 3
2 3
x3 2x 3
2 3
x2
9 0 9 2
5
3
19 5
2
Var X
6 3
7
18
53 of 58
Tutorial 9: 8 Hours Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
0
12
a1
F 7 1
14 7 7 25
2
1
b
b 24
(b) Find P 2 X 5 .
P 2 X 5 F 5 F 2
14 5 5 25 2 1
2 2
24 12
3
4
54 of 58
Tutorial 9: 8 Hours Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
x 1
2
1
1x3 F x F 3
12 3
F m 0.5
14m m 25
2
0.5
24
m2 14m 37 0
14x x2 24
3x7 F x F 7 1
14 14 4 137
2
24
m
2 1
m 3.54, m 10.46
m 3.54, 3 m 7
x
Interval f x
d
x 1 f x 0 0
dx
d x 12 x 1
1x3 f x
dx 12 6
d 14x x2 25 7 x
3x7 f x
dx 24 12
d
x7 f x 1 0
dx
x 1
, 1 x 3,
6
f x
7 x
, 3 x 7,
12
0, otherwise.
(e) Sketch the graph of f x and hence, find the mode.
55 of 58
Tutorial 9: 8 Hours Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
Answers
0, x 0,
1
, 0 x 1,
120
61
, 1 x 2,
(c) F x
1 5 13 19 120
1. (a) (b) (c) 2. (b) m1 (d) 60.25
4 8 8 120 101
, 2 x 3,
120
29
, 3 x 4,
30
1, x 4.
1 5
(c) E Y 1.7, Var Y 12.51
x 0 1 2 3 4
3. (a) (b)
P X x
10 0.35
0.15 0.05 0.05 0.15 0.25
4 7 43 48
4. (a) (b) (c) 2 (d) E X , E 3 X 1 5. a 0.2, b 0.3, c 0.5
15 15 15 5
13 20
6. (b) E X , Var X
3 9
0, x1
1
, 1x2
21
3
, 2x3
21
6 6
6. (c) F x , 3x4 6. (d)
21 7
10
4x5
,
21
15
, 5x6
21
x6
1,
7. (a)
x 0 1 2 3 4 5
5 5
P X x
1 5 5 1
32 32 16 16 32 32
10 3 25
7. (b) (i) (ii) (iii)
32 16 32
56 of 58
Tutorial 9: 8 Hours Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
1 3 3 3
8. (a) k , P 1 X 3 (b) E X , Var X , Var 2X 3 3
8 8 2 4
1
9. (a) x 0 1 2 3 (b) E X 2, Var X
2
1 3 15 5
P X x
84 14 28 21
0, x 0,
1
, 0 x 1,
84
19
9. (c) F X
1
, 1 x 2, (d) E Y 1, Var Y
84 2
16 , 2 x 3,
21
1, x 3.
55
10(a) x 1 2 4 6 (b)
12
P X x
1 1 1 1
6 2 6 6
1 13 137
11. (a)(i) x 1 2 3 4 5 6 (ii) (iii) E X , Var X
3 4 48
1
P X x
1 1 1 1 1
4 12 4 12 4 12
25
11. (b)
3
5
12. (a) 2, 2 , 5,1 , 1, 5 , 2, 6 , 6, 2 ,
36
1
12. (b) x 1 2 3 4 5 9 16 25 36 (c) (d) 1
12
2 1 1
P X x
11 5 1 1 1 1
36 9 6 36 18 36 36 36 36
161 134
12. (e) E W , E 3 4 W
36 9
13. x 2 3 4 5 6 7
P X x
7 7 7 7 7 1
36 36 36 36 36 36
1
14. (a) (b) (c) 0.453 (d) 0.1875
8
57 of 58
Tutorial 9: 8 Hours Mathematics 2 SM025
Ch. 9 Random Variables Session 2020/2021
0, x 3,
x3 1
15. (b) F x
4
, 3 x 3 c) (i) (ii) 0
54 2 27
1, x3
0, x 0,
F x 2 x x 2 , 0 x 1, m 0.2929 (b) E X
1
, Var X
1
, Var 3 2 X =
2
16. (a)
1,
3 18 9
x 1.
0, x 0,
2 19 38 3
F x 4x 2 3x2 ,
17. (b) E X , Var X , Var 2 X 3 0 x 1,
(c)
5 350 175
1, x 1.
0, x 0,
kx , 0 x 4,
18. (a) F x
1
(b) (c) 3
3kx 1 kx 2 4 k , 4 x 6, 5
4
5k , x 6.
(c) E Y 0, E Y 2 7
3 7 38 3 1
19. (a) (b) , Var Y (d)
2 16 5 5 8
1 1
x, 1 x 2,
(d) f x 6
1 1 3 7
20. (a) a ,b (b) (c) 1.303 3 (e)
6 6 8
4
0, otherwise.
x
, 0x2
3
(c) f x
31 5 7
21. (a) (b) 1.73 2x (d) (e)
50 2, 2x3 3 18
3
0,
otherwise.
x 1
, 1 x 3,
6
(d) f x
3
22. (b) (c) 3.5359 7 x (e) mode = 3
4 , 3 x 7,
12
0,
otherwise.
58 of 58