Вы находитесь на странице: 1из 49

Chapter 1: Random Variables

1.1 Introduction

In this chapter we will discuss two types of random variables and each probability
distribution function, cumulative distribution function. In addition to the calculations
of the probability, we will learn the procedures to find mean, variance and standard
deviation of the distributions.

Definition 1
A random variable assumes any of several different values as a result of some
random event or experiment. Random variables are denoted by a capital letter such as
X, Y or Z. Its might describe the possible outcomes of picking a random box, measure
the height of student and roll a die.

Definition 2
Population is a group of individuals of items that share one or more characteristics
from which data can be gathered and analyzed.

Definition 3
Sample is a subset of the population. Elements are selected intentionally as a
representation of the population being studied.

Definition 4
The set of all possible outcome or events of an experiment is called a sample space,
denoted by S.

Definition 5
Sample size is the number of items in a sample.

Definition 6
Random sample is the sample selected in a way that allows every member of the

1
Chapter 1: Random Variables

population to have the same chance of being chosen.


Example 1
An experiment consists of tossing a fair coin three times. Let X will be a random
variable of getting head. Find the probability of getting head by using p.d.f table
graph and equation.

Answer Example 1
Let X be the random variable that denotes the number of head.
If H denotes head and T denotes tail, then the sample space will be,
S = {HHH, HHT, HTH, HTT, THH, THT, TTH, TTT}
It is because the way to get the outcomes is by chance. So X can have any of the value
0, 1, 2, or 3. Therefore we will get the probability distribution as in answer below.
The possible values of X are given in the table below.

Events HHH HHT HTH HTT THH THT TTH TTT


Values of X 3 2 2 1 2 1 1 0

(a) Probability distribution in table.


x P(x)
0 1/8
1 3/8
2 3/8
3 1/8

(b) Probability distribution in graph.

2
Chapter 1: Random Variables

0.40

0.35

0.30

0.25
0.20

0.15

0.10

0.05
0.00
0 1 2 3

(c) Probability distribution in equation.

1
8 , x 0, 3

3
P( X ) , x 1, 2
8
0 , otherwise

Example 2
Consider the experiment of tossing a fair die twice. Let X be random variable of
getting an odd numbers. Find the outcomes of the experiment and state in the p.d.f.

Answer Example 2
From the experiment the sample space, S = { (1,1), (1,2),, (6,6)}.
Let O be the odd event and E be the even event,
thus O = { 1, 3, 5 } and E = { 2, 4, 6 }.
Then, the outcome of the experiment will be { OO, OE, EO, EE }.
Let X be the random variable of getting an odd. Therefore the probability distribution
function will be as below.
X P(X=x)
0 0.25
1 0.50
2 0.25

Exercise 1.1

3
Chapter 1: Random Variables

1. Consider the experiment of throwing a dart onto a circular plate with the same
unit radius two times. There are three segments on the dart plate with red, blue
and green color. Let X be a random variable of getting red shot of the dart.
(a) List down the sample space.
(b) Find the probability distribution function.

2. Please indicate whether the following statement is a random variable or not


(a) Number of heart beats per second.
(b) Number of wrong answer achieved on a 50 question test.
(c) Number of four rolled in two rolls of die that has four on all its faces.
(d) Classifying birds by their species.
(e) Number of respondent answer yes out of 100 surveyed.

3. The experiment of rolling a die twice. If the random variable is the number of
dots on the two rolls, what is sample space of the experiment?

4.
x Frequency
2 4
4 5
6 2
8 3

Expand the table to find the probability distribution function of X.

Answer Exercise 1.1


1. (a) S = ( RR, RB, RG, BR, BB, BG, GR, GB, GG )
(b)
x 0 1 2
P(X=x) 4/9 4/9 1/9

4
Chapter 1: Random Variables

2. (a) Random variable.


(b) Random variable.
(c) Not a random variable because the experiment is not determined by
random process.
(d) Not a random variable because not state the species.
(e) Random variable.

3. S = { 2,3,4,5,6,7,8,9,10,11,12 }
4.
x P(x)
2 4/14
4 5/14
6 2/14
8 3/14

1.2 Discrete random variables


1.2.1 Probability distribution for a discrete random variable

There are two types of random variables: discrete and continuous.

Definition 7
Discrete random variables denoted as a random variable that can take one of a finite
number of distinct outcomes.

Definition 8
A probability distribution for a discrete random variable is a complete set of all
possible outcomes and their probabilities of occurring.

Below are examples of discrete random variables


X, representing Possible values of X

5
Chapter 1: Random Variables

Number dots appear when tossing a die 1, 2, 3. 4, 5, 6


Number of books in the bag 0, 1, 2, 3. 4, 5
Number of male students in a class 15, 16, 17, 22

Theory 1
The probability distribution of a discrete random variable X is described as the
function P(X=x) = P(x) which is satisfied
(a) 0 P( x ) 1 .
n
(b) P( X ) 1 .
i 1

(c) P ( x i ) P( X x i ) .

Example 3
Consider the table from answer example 1. From the table of probability distribution
function, proof that the distribution is a probability distribution function of discrete
random variable then find the probability,
(a) P ( X 2) .
(b) P ( X 2) .
(c) P ( X 1) .

Answer Example 3
From the value of the P( X x ) , the value of all the probability satisfies the first
n
property that is 0 P( x ) 1 . The second property also satisfies that is P( X i ) 1 .
i 1
n

P( X
i 1
i ) P(0) P(1) P( 2) P(3)

1/ 8 3 / 8 3 / 8 1/ 8

1
Therefore we can conclude that the distribution from answer example 1 is a
probability distribution function of discrete random variable.

6
Chapter 1: Random Variables

(a) P( X 2) P(0) P(1)


1/ 8 3 / 8
4/8
1/ 2
(b) P( X 2) P(0) P(1) P(2)
1/ 8 3 / 8 3 / 8
7/8
(c) P( X 1) P(1) P( 2) P(3)
3 / 8 3 / 8 1/ 8
7/8
or
P( X 1) 1 P( X 1)
1 P ( 0)
1 1/ 8
7/8

Example 4
Consider the expression P( x ) defined by the equation
x
P( x ) for x 1, 2, 3, 4. Shows that P( x ) is define as a probability
10
distribution function.

Answer Example 4
n
We know that, P( X i ) 1
i 1
Then, when replace the value x = 1, 2, 3, 4 in P(x) we get

1
P(1) ,
10
2 1
P(2) ,
10 5
3
P(3) ,
10

7
Chapter 1: Random Variables

4 2
P(4)
10 5
Then :
1 1 3 2
P(1) P( 2) P(3) P( 4) 1.
10 5 10 5
n
P(x) is a probability distribution since P( X i ) 1
i 1

Example 5
Suppose a random variable X takes on the values -3, -1, 2 and 5 with respective
2k 3 k 1 k 1 k 2
probabilities , , , . Determine the probability distribution of X.
10 10 10 10

Answer Example 5

x -3 -1 2 5
P( x ) 2k 3 k 1 k 1 k 2
10 10 10 10

P(x) 1
2k 3 k 1 k 1 k 2
1
10 10 10 10
(2k 3 k 1 k 1 k 2) 10
5k 10 5
k 3
Then we get
x -3 -1 2 5
P( x ) 3 4 2 1
10 10 10 10

Example 6
Determine the value of k such that the following function is probability distribution
function of X. Find the probability distribution function.

8
Chapter 1: Random Variables

k , x 0.
P( x )
kx , x 1, 2, 3.

Answer Example 6
n
We know that : P( X i ) 1
i 1

P(0) P(1) P(2) P(3) 1


k k 2k 3k 1

1
k
7
17 , x 0.
P( x )
x7 , x 1, 2, 3.

Exercise 1.2.1
1.
x -1 0 1 2 3
P( X x ) 1/8 2/8 2/8 2/8 1/8

Show that the distribution is a probability distribution function. Find


(a) P ( X 2) .
(b) P ( X 2) .
(c) P ( X 1) .

2. Let f(x) is probability distribution function of X with


2x 1
f ( x) , x 0, 1, 2, 3, 4
25
Find
(a) P ( X 3) .
(b) P ( X 2) .
(c) P (1 X 4) .

9
Chapter 1: Random Variables

3. Let f(x) is probability distribution function of X with


x
1
f ( x ) a , x 1, 2, 3.
4
Find
(a) the value of a .
(b) P ( X 2) .
(c) P ( X 3) .
4. Let the random variable X be the number of days that a patient needs to be
admitted to ward in the hospital. If f(x) is probability distribution function of
X with
5 x
f ( x) , x 1, 2, 3, 4
10
Find the probability that the patient admitted to ward
(a) exactly three days.
(b) more than two days.
(c) at least three days.

5. Let P(X=x) is probability distribution function of X. Find


x P(x)
2 0.14
4 2b
6 0.25
8 0.28
10 b
(a) the value of b .
(b) P ( X 4) .
(c) P(1 X 10) .
(d) P(1 X 10) .

10
Chapter 1: Random Variables

6. State whether the functions defined below is a probability function,


2x
, x 1, 2, 3, 4, 5.
P ( x ) 25
0 , otherwise

7. State whether the functions defined below is a probability function,


( 2 x 1)
, x 1, 2, 3, 4, 5.
P( x ) 25
0 , otherwise

Find the probabilities


(a) P(1 X 4) .
(b) P(1 X 3) .

8. State whether the functions defined below is a probability function,


3x
1 , x 1, 2.
P( x ) 4
0 , otherwise

Answer Exercise 1.2.1


1. (a) 5/8 (b) 1/8 (c) 5/8
2. (a) 7/25 (b) 9/25 (c) 12/25
3. (a) 64/21 (b) 4/21 (c) 20/21
4. (a) 2/10 (b) 3/10 (c) 3/10
5. (a) 0.11 (b) 0.64 (c) 0.89 (d) 1
6. No
7. Yes (a) 9/25 (b) 4/25
8. No

1.2.2 Cumulative Distribution Function Of Discrete Random Variables

11
Chapter 1: Random Variables

Theory 2
The cumulative distribution function of a discrete random variable X is described as
x
the function F ( x) P( X x) P( X x) which satisfies

F (x ) is an increase function.

lim F ( x) 1 , which is the maximum value is 1.


x

lim F ( x) 0 , which is the minimum value is 0.


x

Theory 3
The cumulative distribution function of a discrete random variable X can be calculate
by using the following formula
P( X r ) F ( r )
P( X r ) 1 F ( r )
P( X r ) P( X r 1) F ( r 1)
P( X r ) F ( r ) F ( r 1)
P( r X s ) F ( s ) F ( r )
P( r X s ) F ( s ) F ( r ) f ( r )
P( r X s ) F ( s ) F ( r ) f ( r ) f ( s )
P( r X s ) F ( s ) F ( r ) f ( s )

Example 7
Customers purchase a particular make of automobile with a variety of options. The
probability distribution function of the number of options selected is
x 7 8 9 10 11 12 13
P( X x ) 0.11 0.10 0.22 0.23 0.12 0.13 0.09

Find the cumulative distribution function of X, then by using the cumulative


distribution function, find the probability
(a) exactly ten number of options was selected.

12
Chapter 1: Random Variables

(b) more than nine number of options was selected.


(c) between eight and twelve number of options was selected.

Answer Example 7
P(X<7)=0
F(7)=P(X7)=P(X=7)=0.11
F(8)= (X8)=P(X=7)+P(X=8)=0.21
F(9)= (X9)= P(X=7) +P(X=8) +P(X=9)=0.43
F(10)=P(X10)= P(X=7) +P(X=8) +P(X=9) +P(X=10)=0.66
F(11)=P(X11)= P(X=7) +P(X=8) +P(X=9) +P(X=10) +P(X=11) =0.78
F(12)=P(X12)= P(X=7) +P(X=8) +P(X=9) +P(X=10) +P(X=11) +P(X=12) =0.91
F(13)=P(X13)=P(X=7) +P(X=8) +P(X=9) +P(X=10) +P(X=11) +P(X=12)
+P(X=13)=1
0 , x7
0.11 , 7 x8

0.21 , 8 x9

0.43 , 9 x 10
F ( x)
0.66 , 10 x 11
0.78 , 11 x 12

0.91 , 12 x 13
1 x 13
,
(a) P(X=10)= P(X10)-P(X9)= F(10)-F(9)= 0.66-0.43= 0.23.
(b) P(X>9)= 1-P(X9)= 1-F(9)= 1-0.43= 0.57.
(c) P(8<X<12)= P(X11)-P(X8)= F(11)-F(8)= 0.78-0.21= 0.57.

Example 8
Suppose X denotes the number of telephone receivers in a single family residential
house. From an examination of the phone subscription records of 1000 residence in a
city, the following probability distribution function of X is obtained.

13
Chapter 1: Random Variables

0.17 , x 0, 1
0.23 , x 2, 3

f ( x)
0.2 , x4
0 , otherwise
Find the cumulative distribution function of X, then by using the cumulative
distribution function, calculate the value of
(a) P ( X 3) .
(b) P (1 X 4) .
(c) P(0 X 4) .

Answer Example 8
P(X<0)=0
F(0)= P(X0)= P(X=0)= 0.17
F(1)= P(X1)= P(X=0)+ P(X=1) =0.34
F(2)= P(X2)= P(X=0)+ P(X=1) +P(X=2) =0.57
F(3)= P(X3)= P(X=0)+ P(X=1) +P(X=2) +P(X=3) =0.8
F(4)=P(X4)= P(X=0)+ P(X=1) +P(X=2) +P(X=3) +P(X=4) =1
0 , x0
0.17 , 0 x 1

0.34 , 1 x 2
F ( x)
0.57 , 2 x3
0.8 , 3 x4

1 , x4
(a) P(X<3)= P(X2)= F(2)= 0.57.
(b) P(1X<4)= P(X3)- P(X0)= F(3)- F(0)= 0.8-0.17= 0.63.
(c) P(0<X4)= P(X4)- P(X0)= F(4)- F(0)= 1-0.17= 0.83.

Exercise 1.2.2
1. Let P( X x ) is probability distribution function of X.

14
Chapter 1: Random Variables

Find the cumulative distribution function of X.


x -3 -2 -1 0 1 2
P( X x ) 0.09 0.12 0.22 0.24 0.14 0.19

2. Given F (x ) is cumulative distribution function of X.

0 , x 1
0.08 , 1 x 2

F ( x ) 0.36 , 2 x5
0.67 , 5 x 7

1 , x7
Find the probability distribution function of X.

3. Given F (x ) is cumulative distribution function of X.

0 , x 1
0.18 , 1 x 0

F ( x) 0.32 , 0 x3
0.77 , 3 x6

1 , x6
Calculate the probability
(a) exactly five.
(b) not more than three.
(c) greater than two.

4. Given F (x ) is cumulative distribution function of X.

0 , x2
0.1 , 2 x4

F ( x) 0.4 , 4 x7
0.8 , 7 x9

1 , x9
Calculate the probability
(a) exactly four.
(b) more than five.

15
Chapter 1: Random Variables

(c) three to six.

5. Let f ( x ) is probability distribution function of X

6
, x 2, 3, 4, 5
f ( x ) 77cx
0 , otherwise

Find
(a) the value of c .
(b) cumulative distribution function of X .

6. Let P( X x ) is probability distribution function of X.


Find the cumulative distribution function of X.
x 0 1 2
P( X x ) 1/4 1/2 1/4

7. Let P( X x ) is probability distribution function of X.


Find the cumulative distribution function of X.
x 1 2 3 4
P( X x ) 0.12 0.39 0.24 0.25

8. Given the following probability distribution function of X is obtained.


0.11 , x 0, 1
0.22 , x 2, 3

f ( x)
0.34 , x4
0 , otherwise
Find the cumulative distribution function of X, then by using the cumulative
distribution function, calculate the value of
(a) P ( X 3) .
(b) P(2 X 5) .
(c) P (0 X 3) .

16
Chapter 1: Random Variables

Answer Exercise 1.2.2


1.
0 , x 3
0.09 , 3 x 2

0.21 , 2 x 1

F ( x) 0.43 , 1 x 0
0.67 , 0 x 1

0.81 , 1 x 2

1 , x2

2.
x -1 2 5 7
P( X x ) 0.08 0.28 0.31 0.33

3. (a) 0 (b) 0.77 (c) 0.68


4. (a) 0.3 (b) 0.6 (c) 0.3
0 , x2
30 / 77 , 2 x3

5. (a) 1/10 (b) F ( x) 50 / 77 , 3 x4
65 / 77 , 4 x5

1 , x5
6.
x 0 1 2
F ( X x) 1/4 3/4 1
7.
x 1 2 3 4
F ( X x) 0.12 0.51 0.75 1.0
8.
x 0 1 2 3 4

17
Chapter 1: Random Variables

F ( X x) 0.11 0.22 0.44 0.66 1.00

(a) 0.44 (b) 0.56 (c) 0.55

1.2.3 Expected Value, Variance and Standard Deviation

Definition 9

The expected value of a discrete random variable is defined as its weighted average
over all possible outcomes, with the weight for each outcome being the relative
frequency or probability associated with that outcome.

Theory 4

Expected value of discrete random variable is E ( X ) X P( X )


all Xi
i i

where
Xi : ith outcome of X

P( X i ) : probability of occurrence of the ith outcome of X


i : 1, 2,

Definition 10
The variance of a discrete random variable is defined as the weighted average of the
squared differences between each possible outcome and the average value of the
outcomes, with the weights being the probabilities associated with each of the
outcomes.

Theory 5
Variance of discrete random variable
2 Var ( X ) E ( X 2 ) E ( X )2

E( X 2 ) X
2
i .P( X i )
all Xi

18
Chapter 1: Random Variables

where
Xi : ith outcome of X

P( X i ) : probability of occurance of the ith outcome of X


i : 1, 2,

Theory 6
The standard deviation of the probability distribution of a discrete random variable is
the square root of the variance. Std ( X ) Var( X )

Example 9
The discrete random variable X has range space { 1, 2, 3, 4, 5 } and its cumulative
distribution function takes the value
x 2 5x
P( X x ) , x 1, 2, 3, 4, 5.
50
(a) Tabulate the probability distribution function.
(b) Compute the mean and variance.

Answer Example 9
(a) Cumulative distribution function (discrete)
x 2 5x
P( X x ) , x 1, 2, 3, 4, 5.
50
(1) 2 5(1) 6 3
x 1 , P( X 1)
50 50 25
(2) 2 5(2) 14 7
x 2 , P ( X 2)
50 50 25
(3) 2 5(3) 24 12
x 3 , P( X 3)
50 50 25
(4) 2 5(4) 36 18
x 4 , P ( X 4)
50 50 25

19
Chapter 1: Random Variables

(5) 2 5(5) 50
x 5 , P( X 5) 1
50 50

Probability Distribution Function (Discrete)


x 1 2 3 4 5
P( x ) 3 4 5 6 7
25 25 25 25 25

3 4 5 6 7
(b) Mean : E ( X ) 1 2 3 4 5
25 25 25 25 25
3 8 15 24 35

25 25 25 25 25
85

25
3.4

3 4 5 6 7
E ( X 2 ) 12 2 2 32 4 2 52
25 25 25 25 25
3 16 45 96 175

25 25 25 25 25
335

25
13.4

Variance : Var( X ) E X 2 E X 2

13.4 3.4 2
1.84

Example 10
A random variable Y has the following probability distribution.
y -2 0 2
P (Y y ) k 1 2k k

20
Chapter 1: Random Variables

(a) Show that Var(Y ) 8k .


1
(b) If given k , find mean and variance.
3

Answer Example 10
(a)
y -2 0 2
P (Y y ) k 1 2k k

Mean : E Y y PY

2k 01 2k 2k
2k 2k
0

E Y 2 y 2 PY

2 2 k 0 2 1 2k 2 2 k
4k 4k
8k

VarY E Y 2 E Y
2

8k 0
2

8k

(b)
y -2 0 2
P (Y y ) 1 1 1
3 3 3
Mean : E Y y PY

21
Chapter 1: Random Variables

1 2 1
2 01 2
3 3 3
2 2
0
3 3
0

E Y 2 y 2 PY

1 1 1
2 2 0 2 1 2 2 2
3 3 3
4 4
0
3 3
8

3

VarY E Y 2 E Y
2

0
8

2

3
8

3

Example 11
The following table lists the probability distribution of the number of student taken
course per semester in science centre.
x 3 4 5 6 7
P( x ) 0.37 0.26 0.18 0.11 0.08
Calculate the mean and standard deviation for this probability distribution.

Answer Example 11
Mean : E ( X ) x. p( x )
3(0.37) 4(0.26) 5(0.18) 6(0.11) 7(0.08)
4.27

22
Chapter 1: Random Variables

E ( X 2 ) x 2 . p( x )

32 (0.37) 42 (0.26) 52 (0.18) 62 (0.11) 72 (0.08)


19.87

Variance : Var( X ) E ( X 2 ) E ( X ) 2

19.87 ( 4.27)
2

1.6371
Standard deviation : Sd Var( X ) 1.6371 1.2794

Note :
E(aX + b) = a E(x) + b.
Var(aX + b) = a2 Var(x)

Example 12
Let the probability distribution function of X be defined by
26 x
64 , x 1, 2, 3, 4, 5, 6
p( x )
1 , x7
64

(a) Find P(1 X 4) .


(b) Calculate the mean and variance.
(c) Find the value of E ( 2 X 9) and Var(3 X 10) .

Answer Example 12
(a)
x 1 2 3 4 5 6 7
32 16 8 4 2 1 1
P( X x )
64 64 64 64 64 64 64
32 16 8 46
P(1 X 4)
64 64 64 64

23
Chapter 1: Random Variables

32 16 8 4 2 1 1 127
(b) E ( X ) 1 2 3 4 5 6 7
64 64 64 64 64 64 64 64
127

64
32 16 8 4 2 1 1
E ( X 2 ) 12 2 2 32 4 2 52 6 2 7 2
64 64 64 64 64 64 64
367

64

Var X E X 2 E ( X ) 2
2
367 127

64 64
1.7966

(c) E 2 X 9 2E X E 9

127
2 9
64
5.03125

Var3X 10 32Var X Var10

91.7966 0
16.1694

Exercise 1.2.3
1. The discrete random variable X has range space { 1, 2, 3, 4 } and its
probability distribution function takes the value
x
P( X x) , x 1, 2, 3, 4.
10
(a) Tabulate the probability distribution function.
(b) Compute the mean and variance.

24
Chapter 1: Random Variables

2. A random variable Y has the following probability distribution.


y 0 1 2 3
P (Y y ) c c 2c 5c
Find c and compute the mean and variance.

3. The following table lists the probability distribution of the number of student
taken course per semester in science centre.
x 1 0 1 2 3
P( x ) 0.34 0.23 0.12 0.15 k
Find the value of k and calculate the mean and standard deviation for this
probability distribution.

4. The following table lists the probability distribution of the number of student
taken course per semester in science centre.

x 2 3 4 5 6
P( x ) 1/9 2/9 3/9 1/9 k

Find the value of k and calculate the mean and standard deviation for this
probability distribution.

Answer Exercise 1.2.3

1 (a) x 1 2 3 4
P( x ) 1/10 2/10 3/10 4/10

(b) =3, 2=1


2. c=1/9, =20/9, 2= 1.0617
3. k=0.16, =0.56, = 1.4786
4. k=2/9, =37/9, =1.286

25
Chapter 1: Random Variables

1.3 Continuous Random Variables

1.3.1 Probability Density Function for Continuous Random Variables


The second type of the random variable is the continuous random variable.

Definition 11
A random variable that can take any numeric value within a range of value is called
continuous random variable. The range may be infinite or bounded at either both
ends.
Below are examples of continuous random variables

X, representing Possible values of X


The height of the students 150cm<X<170cm
The weight of the students 45kg<X<85kg
The time to complete a quiz 5 minutes to 10 minutes

Theory 7
Properties of the ability Density Function of Continuous Random Variable
f ( x) 0 .

f ( x) dx 1 .

b
P(a x b) P(a x b) P(a x b) P(a x b) f ( x ) dx
a

Example 13
Let X be a continuous random variable of X with probability density function (p.d.f)
2 x , 0 x 1
f ( x)
0 , otherwise
Show that the function is the probability density function of X.

Answer Example 13

26
Chapter 1: Random Variables

f ( x) dx 1

2 xdx 1
0

x 2 1
0 1

12 0 1

Proof that the f ( x ) is probability distribution function of X.


Example 14
The continuous random variable X has the probability distribution function
2k ( x x 2 ) , 0 x 1
f ( x)
0 , otherwise
Find
(a) the value of k .
(b) P(0.5 X 1) .
(c) P( X 0.25) .

Answer Example 14

(a) f ( x)dx 1

2k ( x x )dx 1
2

1
x2 x3
2 k ( ) ( ) 1
2 3 0

1 1
2 k ( ) 0 1
2 3
1
k 1
3
k 3

27
Chapter 1: Random Variables

1
1
x2 x3

2
(b) 6( x x ) dx 6 2
( ) (
3 0.5
)
0.5

1 1 0.52 0.53
6( ) (
3
)
2 3 2

0.5

1
1
x2 x3
6( x x )dx 6( 2 ) ( 3 )
2
(c)
0.25 0.25

1 1 0.252 0.253
6( ) (
3
)
2 3 2

0.84375

Exercise 1.3.1
1. The continuous random variable X has the probability distribution function
3
(2 x x 2 ) , 0 x 2
f ( x) 4
0 , otherwise

Find
(a) P ( X 1) .
(b) P ( X 1) .
(c) P(0.5 X 2) .

2. The continuous random variable X has the probability distribution function


0.125 x , 0 x 4
f ( x)
0 , otherwise
Find
(a) P ( X 3) .
(b) P ( X 2.5) .
(c) P(1.5 X 3) .

28
Chapter 1: Random Variables

3. The continuous random variable X has the probability distribution function.


1
3 , 0 x 1
2
f ( x) , 1 x 2
3
0 , otherwise

Find
(a) P ( X 0.5) .
(b) P ( X 1.5) .
(c) P(0.5 X 1.5) .

4. The continuous random variable X has the probability distribution function.


x, 0 x 1.

f ( x) 2 x, 1 x 2.
0,
otherwise.

Find
(a) P ( X 1) .
(b) P ( X 1) .
(c) P(0.5 X 2) .

5. The continuous random variable X has the probability distribution function.


2c, 0 x 2.

f ( x) 2c(2 x 3), 2 x 3.
0,
otherwise.

Find
(a) the value of c .
(b) P ( X 1) .

29
Chapter 1: Random Variables

(c) P(2.5 X 3) .

6. Specifications call for the thickness of aluminum sheets that are to be made
into cans to be between 8 and 11 thousandths of an inch. Let X be the
thickness of an aluminum sheet. Assume the probability density function of X
is given by
x
, 6 x 12
f ( x ) 54
0 , otherwise

(a) Find the probability the thickness of aluminum at least 9.5.


(b) Find the probability the thickness of aluminum not more than 6.5.
(c) Find the mean of the thickness an aluminum sheet.
(d) Find the standard deviation of the thickness an aluminum sheet.

7. The density function of the continuous random variable X is given as


follows, calculate
6 x 1 x , 0 x 1
f ( x)
0 , elsewhere

3
(a) P X .
4
(b) mean.
(c) variance.

3x 2
8. Let the probability density function of X be defined by f ( x ) where
16
c x c.
(a) Calculate the value of c so that f ( x ) is a probability distribution
function.
(b) Find the cumulative distribution function, F(x).

Answer Exercise 1.3.1

30
Chapter 1: Random Variables

1. (a) 12 (b) 12 (c) 0.84375


2. (a) 0.5625 (b) 0.6094 (c) 0.4219
3. (a) 1/6 (b) 1/3 (c) 1/2
4. (a) 12 (b) 12 (c) 7/8

5. (a) 1/8 (b) 14 (c) 0.3125


6. (a) 0.497685 (b) 0.05787 (c) 9.333333
(d) 90, 1.699675
7. (a) 0.8438 (b) 1/2 (c) 3/10, 1/20
8. (a) 2
0 , x 2
3
x 8
(b) F ( x) , 2 x2
16
1 , x2

1.3.2 Cumulative Distribution Function of Continuous Random Variables

Theory 8
The cumulative distribution function of a continuous random variable X is described
x
as the function F ( x ) P( X x ) f ( x) dx for x .

Example 15
Refer to example 13
2 x , 0 x 1
f ( x)
0 , otherwise
Find the cumulative distribution function of X. By using it, calculate
(a) P ( X 0.3) .
(b) P( X 0.4) .
(c) P(0.3 X 0.4) .

Answer Example 15

31
Chapter 1: Random Variables

x 0 , x0
x
2x2
(0 x 1); 2 xdx x and F ( x ) x 2
2
, 0 x 1.
2 0 1
0
, x 1

(a) P( x 0.3) F (0.3) (0.3) 2 0.09


(b) P( x 0.4) 1 P( x 0.4)
1 F (0.4)

1 (0.4) 2
0.84

(c) P(0.3 x 0.4) P( x 0.4) P( x 0.3)


F (0.4) F (0.3)
0.16 0.09
0.07

Example 16
Refer to example 14
6( x x 2 ) , 0 x 1
f ( x)
0 , otherwise
Find the cumulative distribution function of X. By using it, calculate
(a) P ( X 0.5) .
(b) P( X 0.8) .
(c) P(0.5 X 0.8) .

Answer Example 16
x
x
x2 x3
(0 x 1); 6( x x )dx 6 3x 2 2 x 3 and
2

0 2 3 0

0 , x0
2
F ( x ) 3x 2 x , 0 x 1
3

x 1
1 ,

32
Chapter 1: Random Variables

(a) P( x 0.5) P( x 0.5)


F (0.5)

3(0.5) 2 2(0.5)3
0.5
(b) P( x 0.8) 1 P( x 0.8)
1 F (0.8)

1 (3(0.8) 2 2(0.8) 3 )
0.104

(c) P(0.5 x 0.8) P( x 0.8) P( x 0.5)


F (0.8) F (0.5)
0.896 0.5
0.396

Exercise 1.3.2
1. Given the probability density function
x / 8 , 0 x 4
f ( x)
0 , otherwise
Find the cumulative distribution function of X. By using it, calculate
(a) P ( X 2) .
(b) P( X 1) .

2. Given the probability density function


k , 0 x 3
f ( x)
0 , otherwise
(a) Find the value of k.
(b) Find the cumulative distribution function of X.

3. Given the probability density function

33
Chapter 1: Random Variables

k / 8 , 0 x 4
f ( x)
0 , otherwise
(a) Find the value of k.
(b) Find the cumulative distribution function of X.

4. Given the probability density function


kx2 , 1 x 4
f ( x)
0 , otherwise
(a) Find the value of k.
(b) Find the cumulative distribution function of X.
(c) Find P( X 2) .
(d) P (0 X 3)

5. The actual amount of coffee (in gram) in a 230-gram jar filled by a certain
machine is a random variable and the probability density function is given by,
0, x 227.5
1
f ( x) , 227.5 x 232.5
5
0, x 232.5

Find the probability that a 230-gram jar filled by this machine will contain
(a) at most 228.65 grams of coffee.
(b) anywhere from 229.85 grams to 231.66 grams of coffee.

Answer Exercise 1.3.2

0 , x0
x 2
1. F ( x) , 0 x4
16
1 , x4

(a) 1/4 (b) 15/16


2. (a) 1/3

34
Chapter 1: Random Variables

0 , x0
1
(b) F ( x) x , 0 x 3
3
1 , x3
3. (a) 2
0 , x0
1
(b) F ( x) x , 0 x 4
4
1 , x4

4. (a) 1/21
0 , x 1
x 3 1
(b) F ( x) , 1 x 4
63
1 , x4

(c) 8/9 (d) 26/63

5. (a) 0.23 (b) 0.362

1.3.3 Expected Value, Variance and Standard Deviation

Theory 9
Expected value of continuous random variable

E ( X ) x f ( x ) dx

Theory 10
Variance of continuous random variable
2 Var ( X ) E ( X 2 ) E ( X ) 2

E( X ) x f ( x ) dx
2 2

Theory 11
The standard deviation of the probability distribution of a continuous random variable

35
Chapter 1: Random Variables

is the square root of the variance.

Sd( X ) Var ( X )

Example 17
Refer to example 13, find the mean and variance of X.
2 x , 0 x 1
f ( x)
0 , otherwise
Answer Example 17

E ( X ) x f ( x ) dx

1
x 2 x dx
0

1
2 x 2 dx
0

1
2x3

3 0
2

3

E( X 2 ) x f ( x ) dx
2

1
x 2 2 x dx
0

1
(2 x 3 ) dx
0

1
2x4

4 0
1

2

36
Chapter 1: Random Variables

Var ( X ) E ( X 2 ) E ( X )
2

2
1 2

2 3
1

18

Example 18
Refer to example 14, find the mean and variance of X
6( x x 2 ) , 0 x 1
f ( x)
0 , otherwise

Answer Example 18

E ( X ) x f ( x ) dx


1
x 6( x x 2 ) dx
0

1
6( x 2 x 3 )dx
0

1
x3 x4
6
3 4 0

13 14
6 0
3 4
1

2


E( X 2 ) x
2
f ( x )dx

37
Chapter 1: Random Variables


1
x 2 6( x x 2 ) dx
0

1
6( x 3 x 4 )dx
0

1
x4 x5
6
4 5 0

14 15
6 0
4 5
3

10
Var ( X ) E ( X 2 ) E ( X )
2

2
3 1

10 2
1

20

Example 19
The continuous random variable X has probability density function such as below,
calculate
1
( x 1) , 0 x 4
f ( x ) 12

0 , otherwise
(a) the mean.
(b) the variance.

Answer Example 19
4
(a) Mean E ( X ) x. f ( x) dx
0

1 4
12 0
x ( x 1) dx
1 4
x 2 x dx
12 0

38
Chapter 1: Random Variables

4
1 x3 x2

12 3 2 0
1 ( 4 ) 3 ( 4 ) 2 ( 0) 3 ( 0) 2

12 3 2 3 2
1 88

12 3
22

9

4
(b) E ( X 2 ) x 2 . f ( x) dx
0

1 4 2
12 0
x ( x 1) dx
1 4
x 3 x 2 dx
12 0
4
1 x4 x3

12 4 3 0
1 ( 4 ) 4 ( 4 ) 3 ( 0) 4 ( 0 ) 3

12 4 3 4 3
1 256

12 3
64

9
Var( X ) E ( X 2 ) E ( X ) 2
2
64 22

9 9
92

81

Exercise 1.3.3
1. Given the probability density function
x / 8 , 0 x 4
f ( x)
0 , otherwise
(a) the mean.

39
Chapter 1: Random Variables

(b) the variance.

2. Given the probability density function


3x(2 2 x) , 0 x 1
f ( x)
0 , otherwise
Find
(a) the mean.
(b) the variance.
3. Given the probability density function
3(8 2 x x 2 ) / 80 , 0 x 4
f ( x)
0 , otherwise
Find the
(a) mean.
(b) variance.

4. Let the continuous random variable X has probability density function as


follows.
kx , 0 x2
2 2 x 2x3
f ( x)
,

0 elsewhere

(a) Find the value of k.


(b) Find E (2x +1).

Answer Exercise 1.3.3


1. (a) 8/3 (b) 8/9
2. (a) 1/2 (b) 1/20
3. (a) 8/5 (b) 24/25
4. (a) 2 (b) -11/3

EXERCISE CHAPTER 1

40
Chapter 1: Random Variables

1. A continuous random variable Y has a probability density function as below.

0.2 1 y 0

f y 0.2 cy 0 y 1
0
others
(a) Show that value of c is 1.2.
(b) Obtain the cumulative distribution function of Y.
(c) Calculate P(0 Y 0.5) .

2. A continuous random variable X has the probability density function


1
, 0 x 10
f ( x ) 10
0 , elsewhere

(a) Show that f ( x ) is a probability density function.


(b) Find F ( 4.5) .
(c) Find P(3 X 10) .
(d) Find Var ( X ) .

3. Given probability density function for continuous random variable X as


below.
h ( 2 x ) , 0 x 1

f ( x ) hx , 1 x 3
0
, otherwise

Find
(a) the value of h .
(b) P ( X 2) .
(c) P ( X 2) .
(d) E ( X ) and Var ( X ) .

4. Given probability distribution function for discrete random variable X as


below.

41
Chapter 1: Random Variables

x 2 4 6 8 10
P( X x ) 0.23 0.14 0.25 0.16 0.22

(a) Show that P( X x ) is probability distribution function of X.


(b) Find P( X 6) , P( X 6) and P( X 6) .
(c) Find mean and variance of X.

5. The number of minutes that a flight from Penang to Senai is early or late, is a
random variable with the probability density function is given by
1
(36 x 2 ) 6 x 6
f ( x) 288
0 otherwise

Negative values indicate that the flight being early and positive values
indicate that the flight being late. Find the probabilities that the flight will be
(a) at least two minutes early.
(b) at least one minute late.
(c) between three to one minute early.
(d) the expected value and variance.

6. The density function for continuous random variable X is given by


w2 , 0 x2

f ( x ) 2 w 2 x 3w 2 , 2 x3
0 , otherwise

Find
(a) the constant w .
(b) the cumulative distribution function of X.
(c) P(1 X 2.5) by using cumulative distribution function of X.

7. A discrete random variable has a probability distribution as follows.

42
Chapter 1: Random Variables

x 1 2 r 10 15
P( X x ) 2t t 3t 3t t

(a) Find the value of t .


(b) Find the value of r if the expected value is 6.7.
(c) Find the cumulative distribution function, F (x ) .

8. Random variable Y has a probability density function as following.


0.2 1 y 0

f y 0.2 cy 0 y 1
0
others

Find
(a) the value of c .
(b) the cumulative distribution function, F (Y ) .

(c) P 0.5 Y 0.5 .


(d) E (Y ) .
(e) E (10Y 2) .

9. The discrete random variable X has the probability distribution function as


below.
x2
23 , x 1, 2, 3

x
P( X x ) , x 4, 5
23
0, elsewhere


(a) Show that P( X x ) is a probability distribution function.
(b) Find the cumulative distribution function of X, then find F ( 2.5) .
(c) Find P( 2 X 5) .
(d) Calculate E ( X ) and Var ( X ) .

43
Chapter 1: Random Variables

10. Given probability distribution function for discrete random variable X as


below.

x 2 4 6 8 10
P( X x ) 0.08 0.25 0.35 0.20 0.12

(a) Show that P( X x ) is probability distribution function of X.


(b) Find P ( X 8) and P( X 6) .
(c) Find mean and variance of X.

11. A discrete random variable, X can assume five possible values which are 2, 3,
5, 8 and 10. The probability distribution is shown below.
X 2 3 5 8 10
P( X ) 0.15 0.10 a 0.25 0.25

(a) What is the value for a ?


(b) What is the probability that X equals two or ten?
(c) What is the probability that X is less than ten but more than two?

12. A discrete random variable, X can take only the values 0, 1 and 2 with
4
probability P0 , P1 and P2 respectively. Given that E ( X ) and
3
5
Var ( X ) , find the values of P0 , P1 and P2 .
9

13. Given the cumulative probability distribution function of random variable X


such as below, find
1 1 x 4
3
1 4 x6
F ( x) 2
5 6 x 10
6
1 x 10

44
Chapter 1: Random Variables

(a) the probability density function of X.


(b) P3 x 6 .

14. Random variable X has continuous density function f ( x ) 2 x on 0 x 1.


(a) Verify that f ( x ) is a valid probability density function.

(b)
Compute P X 1 , P X 3 and P 1 X 3 .
2 4 2 4

15. Given the function f ( x ) such as below.

1 , 1 x 0
2
f ( x) 1
(2 x ) , 0 x2
4
(a) Verify that f is a valid density.

(b)
2

Compute P 1 X 1 .
2

16. The continuous random variable X has probability density function such as
below, find
k ( x 2 ) 2 , 2 x 0

4
f ( x ) 4 k , 0 x
3
0 , otherwise

(a) the value of the constant k .


(b) P 1 X 1 .
(c) P X 1 .

17. The following is a probability density function of continuous random variable.


2
(6 x x ) , 0 x 3,
2
f ( x) 27
0, otherwise.

45
Chapter 1: Random Variables

(a) Calculate P(0 X 1 12 ) .

(b) P( X 2)
(c) Find the mean of X.

18. The continuous random variable, X has a probability density function, f ( x )


where
k ( x 6)( x 1) , 1 x 6
f ( x)
0 , otherwise

(a) Find the value of k .


(b) Find P( X 2.5)
(c) Find P( 2.3 X 5.6) .

19. A random variable X has a probability density function f as follows.

a 5 x , 5 x 6
f ( x)
0 , others
(a) Show that a 1/ 2.
(b) Find P( X 5.7) .

20. Give the probability distribution function of continuous random variable of X


such as below.
c x , 0 x 1
f ( x)
0 , elsewhere

(a) Find the value of c .

(b) Calculate the P X 1 4 .

(c) Find the mean of X.

46
Chapter 1: Random Variables

ANSWER EXERCISE CHAPTER 1


0 , x 1
0.2( y 1) , 1 x 0

1. (b) F ( x)
0.2 0.4 y 0.6 y , 0 x 1
2

1 , x 1
(c) 0.25
2. (b) 0.45 (c) 7/10 (d) 25/3
3. (a) 2/11 (b) 0 (c) 6/11 (d) =56/33,
2=1813/2178
4. (b) 0.62, 0.63, 0.25 (c) =6, 2=8.4
5. (a) 7/27 (b) 325/864 (c) 95/432 (d) E(X) = 0
Var(X) = 36/5
6. (a) 1/2
0 , x0
1
x , 0 x2
(b) F ( x) 4
1
(4 x 2 3x) , 2 x3
4
1 , x3

(c) 0.4375
7. (a) 1/10 (b) 6
0 , x 1
2 / 10 , 1 x 2

3 / 10 , 2 x6
(c) F ( x)
6 / 10 , 6 x 10
9 / 10 , 10 x 15

1 , x 15
8. (a) 1.2
0 , y 1
0.2 y 0.2 , 1 y 0

(b) F ( y)
0.6 y 0.2 y 0.2 , 0 y 1
2

1 , y 1
(c) 0.35 (iv) 0.4 (v) 6

47
Chapter 1: Random Variables

9. (b) 5/23
0 , x 1
1 / 23 , 1 x 2

5 / 23 , 2 x3
F ( x)
14 / 23 , 3 x 4
18 / 23 , 4 x5

1 , x5
(c) 17/23 (d) =77/23, 2=1.2475
10. (b) 0.88, 0.67 (c) =6.06, 2=4.9964
11. (a) 0.25 (b) 0.4 (c) 0.6
12. P0 =1/6 P1 = 1/3 P3 = 1/2
13. (a) The density functions such as below.
x 1 4 6 10
P( x ) 1/3 1/6 1/3 1/6

(b) 1/2
14. (a) The function, f is a valid probability density function when
1
1 2x2

0
2 x dx
2 0

(1) (0) 2
2

The value of f ( x ) is nonnegative over the interval [0, 1].

1 3
(b) P X 1 / 4 , P X 7 / 16
2 4

1 3
P X 5 / 16
2 4
15. (b) 15/32
16. (a) 1/8 (b) P( 1 X 0) 7 / 24 , P(0 X 1) 1 / 2
P( 1 X 1) 19 / 24
(c) P( X 1) 1 / 6

17. (a) P(0 X 1 12 ) 2 / 3 , P( 2 X 3) 13 / 81 (b) 7/6


6
18. (a) (b) P( X 2.5) 0.2160
125

48
Chapter 1: Random Variables

(c) P( 2.3 X 5.6) 0.8142


19. (a) 1/2 (b) P( X 5.7) 0.405

1
20. (a) 3/2 (b) P X 7/8
4
(c) 3/5

49