You are on page 1of 54

Chapter 1 : Random Variables

CHAPTER 1 : RANDOM VARIABLES


Sub-Topic
Introduction.
Discrete random variables.
Discrete probability distribution function.
Cumulative distributions function of discrete random variables.
Expected value, variance and standard deviation of discrete random variables.
Continuous random variables.
Continuous probability density function.
Cumulative distributions function of continuous random variables.
Expected value, variance and standard deviation of continuous random
variables.
Chapter Learning Outcome
Identify and solve the problems involve with the random variables.
Learning Objective
By the end of this chapter, students should be able to
Identify two types of random variables.
Determine whether the equation function is probability distribution function
for discrete or continuous.
Find the cumulative distribution function of the distributions.
Calculate the probability of the distributions.
Find the expected value, variance and standard deviation of the distributions.
Key Term (English to Bahasa Melayu)

English

Bahasa Malaysia

1.

Random variables

Pemboleh ubah rawak

2.

Discrete

Diskrit

3.

Continuous

Selanjar

4.

Expected value

Nilai jangkaan

5.

Distribution

Taburan

6.

Density

Ketumpatan

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
(a)

Picking a random box.

(b)

Measure the height of student.

(c)

Roll a die.

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

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.

Chapter 1 : Random Variables

Definition 6
Random sample is the sample selected in a way that allows every member of the
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 pdf table, graph
and equation.

Answer Example 1
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.
Let X be the random variable that denotes the number of head.
The possible values of X are given in the table below:
Events

HHH

HHT

HTH

HTT

THH

THT

TTH

TTT

Values of X

(a)

(b)

Probability distribution in table.


X

P(x)

1/8

3/8

3/8

1/8

Probability distribution in graph.

Chapter 1 : Random Variables

0.40
0.35
0.30
0.25
0.20
0.15
0.10
0.05
0.00
0

(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.

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.

P(X=x)

0.25

0.50

0.25

Chapter 1 : Random Variables

Exercise 1.1
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.

2.

3.

(a)

List down the sample space.

(b)

Find the probability distribution function.

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.

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

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

5.

Bag H contains 3 cards numbered 1, 2, 3. Bag K contains 4 cards numbered 1,


2, 3, 4. Two fair dice are tossed simultaneously. If both dice show the same
number, a card will be selected at random from Bag H, otherwise a card will
be selected from Bag K. Let X be the random variable which denotes the sum

Chapter 1 : Random Variables

of the numbers obtained in each trail. Show that X is a discrete random


variable and find the probability distribution of X.

6.

Two players A and B are to play a badminton tournament. The first person to
win three games wins the tournament. The probability that player A will win
any one game is 2/7. Let S represents the number of games that they play.
Show that X is discrete random variable and find the probability distribution
of X.

Answer Exercise 1.1


1.

(a)

S = ( RR, RB, RG, BR, BB, BG, GR, GB, GG )

(b)

2.

(a)

x
P(X=x)
Random variable.

0
4/9

1
4/9

2
1/9

(b)

Random variable.

(c)

Not a random variable because the experiment is not determined by


random process.

3.

(d)

Not a random variable because not state the species.

(e)

Random variable.

S = { 1,2,3,4,5,6,7,8,9,10,11,12 }

4.
x

Frequency

P(X=x)

4/14

5/14

2/14

3/14

5.
x
P(X=x)
x

3
4/432
9

4
10/432
10

5
20/432
11

6
28/432
12

7
44/432
13

8
52/432
14

15

Chapter 1 : Random Variables

P(X=x)

62/432

58/432

56/432

40/432

32/432

16/432

10/432

6.
x
3
4
5
P(X=x) 175/625 234/625 216/625

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

Number dots appear when tossing a die

0, 1, 2, 3. 4, 5, 6

Number of books in the bag

0, 1, 2, 3. 4, 5,

Number of students in a class

0, 1, 2, 3. 4, 5,

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 .

Chapter 1 : Random Variables

P( X ) 1 .

(b)

i 1

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

(c)

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
property that is 0 P( x ) 1 . The second property also satisfies that is

P( X i ) 1 .
i 1

P( X

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

i 1

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.
(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

Chapter 1 : Random Variables

(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
P( x )

x
10

the

expression

P(x )

defined

the

equation

x 1, 2, 3, 4. Shows that P(x ) is define as a probability

for

distribution function.

Answer Example 4
n

We know that,

by

P( X i ) 1
i 1

Then, when replace the value x = 1, 2, 3, 4 in P(x) we get


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

P(4)
10 5
Then :

P(1)

P(1) P( 2) P(3) P( 4)

1 1 3 2
1.
10 5 10 5
n

P(x) is a probability distribution since

P( X i ) 1
i 1

Chapter 1 : Random Variables

Example 5
Suppose a random variable X takes on the values -3, -1, 2 and 5 with respective
probabilities

2k 3 k 1 k 1 k 2
,
,
,
. Determine the probability distribution of X.
10
10
10
10

Answer Example 5
x
P(x )

-3
2k 3
10

-1
k 1
10

2
k 1
10

5
k 2
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
P(x )

-3
3
10

-1
4
10

2
2
10

5
1
10

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

P( x )

kx ,

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

10

x 0.
x 1, 2, 3.

Chapter 1 : Random Variables

17 ,
P( x )
x7 ,

1
7

x 0.
x 1, 2, 3.

Exercise 1.2
1.
x

-1

P( X x )

1/8

2/8

2/8

2/8

1/8

Show that the distribution is a probability distribution function. Find

2.

(a)

P( X 2) .

(b)

P( X 2) .

(c)

P( X 1) .

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


2x 1
f ( x)
, x 0, 1, 2, 3, 4
25

Find

3.

(a)

P( X 3) .

(b)

P( X 2) .

(c)

P(1 X 4) .

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) .

11

Chapter 1 : Random Variables

(c)

4.

P( X 3) .

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
f ( x)

5 x
,
10

x 1, 2, 3, 4

Find the probability that the patient admitted to ward

5.

6.

(a)

exactly three days.

(b)

more than two days.

(c)

at least three days.

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

(a)

the value of b .

(b)

P( X 4) .

(c)

P(1 X 10) .

(d)

P(1 X 10) .

P(x)

0.14

2b

0.25

0.28

10

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,

12

Chapter 1 : Random Variables

( 2 x 1)
, x 1, 2, 3, 4, 5.

P( x ) 25
0
, otherwise

Find the probabilities

8.

(a)

P(1 X 4) .

(b)

P(1 X 3) .

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.

(a)

5/8

(b)

1/8

(c)

5/8

2.

(a)

7/25

(b)

9/25

(c)

12/25

3.

(a)

64/63 (b)

4/63

4.

(a)

2/10

(b)

3/10

(c)

9/10

5.

(a)

0.11

(b)

0.64

(c)

0.89

6.

No

7.

Yes

8.

No

(c)

20/63

(d)

1.2.2 Cumulative distribution function of discrete random variables

Theory 2
The cumulative distribution function of a discrete random variable X is described as
n

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

13

Chapter 1 : Random Variables

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

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.

(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

14

Chapter 1 : Random Variables

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
0.11

0.21

0.43
F ( x)
0.66
0.78

0.91
1

x7

7 x8

8 x9

9 x 10

, 10 x 11
, 11 x 12
, 12 x 13
,

x 13

(a)

P(X=10)= P(X10)-P(X11)= 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.
0.17
0.23

f ( x)
0.2
0

x 0, 1

x 2, 3

x4

, 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) .

15

Chapter 1 : Random Variables

(c)

P(1 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
0.17

0.34
F ( x)
0.57
0 .8

x0

, 0 x 1
, 1 x 2
, 2 x3
, 3 x4
,

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.3
1.

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


Find the cumulative distribution function of X.

2.

-3

-2

-1

P( X x )

0.09

0.12

0.22

0.24

0.14

0.19

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


0
0.08

F ( x ) 0.36
0.67

x 1

, 1 x 2
,

2 x5

5 x 7

x7

16

Chapter 1 : Random Variables

Find the probability distribution function of X.

3.

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


0
0.18

F ( x) 0.32
0.77

x 1

, 1 x 0
,

0 x3

3 x6

x6

Calculate the probability

4.

(a)

exactly five.

(b)

not more than three.

(c)

greater than two.

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


0
0.1

F ( x) 0.4
0.8

x2

, 2 x4
, 4 x7
, 7 x9
,

x9

Calculate the probability

5.

(a)

exactly four.

(b)

more than five.

(c)

three to six.

Let f (x ) is probability distribution function of X

f ( x ) 77cx

, x 2, 3, 4, 5
,

otherwise

Find
(a)

the value of c .

(b)

cumulative distribution function of X .

17

Chapter 1 : Random Variables

6.

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


Find the cumulative distribution function of X.

7.

P( X x )

1/4

1/2

1/4

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


Find the cumulative distribution function of X.

8.

P( X x )

0.12

0.39

0.24

0.25

Given the following probability distribution function of X is obtained.


0.11
0.22

f ( x)
0.34
0

x 0, 1

x 2, 3

x4

, 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) .

Answer Exercise 1.3


1.
0
0.09

0.21

F ( x) 0.43
0.67

0.81

x 3

, 3 x 2
, 2 x 1
,

1 x 0

0 x 1

1 x 2

x2

18

Chapter 1 : Random Variables

2.
x

-1

P( X x )

0.08

0.28

0.31

0.33

3.

(a)

(b)

0.77

(c)

0.68

4.

(a)

0.3

(b)

0.6

(c)

0.3

(b)

0
30 / 77

F ( x) 50 / 77
65 / 77

5.

(a)

1/10

x2

, 2 x3
, 3 x4
, 4 x5
x5

6.
x

F ( X x)

1/4

3/4

7.
x

F ( X x)

0.12

0.51

0.75

1.0

8.

(a)

F ( X x)

0.11

0.22

0.44

0.66

1.00

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 )
i

all Xi

19

Chapter 1 : Random Variables

where
Xi

: ith outcome of X

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

: 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 )

2
i

.P( X i )

all Xi

where
Xi

: ith outcome of X

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

: 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

20

Chapter 1 : Random Variables

x 2 5x
P( X x )
50

x 1, 2, 3, 4, 5.

(a)

Tabulate the probability distribution function.

(b)

Compute the mean and variance.

Answer Example 9
(a)

Cumulative distribution function (discrete)


P( X x )

x 2 5x
50

x 1 , P( X 1)

x 1, 2, 3, 4, 5.

(1) 2 5(1) 6
3

50
50 25

P ( X 2)

( 2) 2 5( 2) 14 7

50
50 25

x 3 , P ( X 3)

(3) 2 5(3) 24 12

50
50 25

x4 ,

P ( X 4)

( 4) 2 5( 4) 36 18

50
50 25

x5 ,

P ( X 5)

(5) 2 5(5) 50

1
50
50

x2 ,

Probability Distribution Function (Discrete)


x
P(x )

(b)

1
3
25

2
4
25

3
5
25

4
6
25

5
7
25

3 4 5 6 7
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

21

Chapter 1 : Random Variables

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

P(Y y )

1 2k

(a)

Show that Var(Y ) 8k .

(b)

1
If given k , find mean and variance.
3

Answer Example 10
(a)
y

-2

P(Y y )

1 2k

Mean : E Y y PY
2k 01 2k 2k

2k 2k

22

Chapter 1 : Random Variables

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

8k 0

8k

(b)
y

-2

P(Y y )

Mean : E Y y PY
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

23

Chapter 1 : Random Variables

VarY E Y 2 E Y

8
2
0
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

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
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)

1.6371
Standard deviation : Sd Var( X ) 1.6371 1.2794
Note :

24

Chapter 1 : Random Variables

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

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

p( x ) 64
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(3X 10) .

Answer Example 12
(a)
x

P( X x )

32
64

16
64

8
64

4
64

2
64

1
64

1
64

P( 1 X 4)

32 16 8
46

64 64 64 64

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

25

Chapter 1 : Random Variables

367 127

64 64

1.7966

(c)

E 2 X 9 2 E X E 9

127
2
9
64

5.03125
Var3 X 10 32Var X Var10
91.7966 0

16.1694
Exercise 1.4
1.

The discrete random variable X has range space { 1, 2, 3, 4 } and its


cumulative distribution function takes the value
P( X x)

2.

x
10

, x 1, 2, 3, 4.

(a)

Tabulate the probability distribution function.

(b)

Compute the mean and variance.

A random variable Y has the following probability distribution.


y

P(Y y )

c2

c2 + c

3c2 + 2c

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.

26

Chapter 1 : Random Variables

P(x )

0.34 0.23 0.12 0.15

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

5.

Let the probability distribution function of X be defined by


3 2
a , x 0,1, 2, 3...
p( x) 4
0
, otherwise

(a)

Find the value of a.

(b)

Find P( 1 X 4) .

(c)

Calculate the mean and variance.

(d)

Find the value of E (2 X 11) and Var(3 X 3) .

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

P(x )

1/9

2/9

3/9

1/9

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

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.

27

Chapter 1 : Random Variables

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 times to complete a quiz

5minutes<X<10minutes

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

f ( x) dx 1 .

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 ability density function of X.

Answer Example 13

f ( x) dx 1

2 xdx 1
0

x
2

1
0

12 0 1

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

28

Chapter 1 : Random Variables

Example 14
The continuous random variable X has the probability distribution function
2 k ( 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

f ( x )dx 1

(a)

2k ( x x

)dx 1

0
1

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

1 1

2 k ( ) 0 1
2 3

1
k 1
3

k 3

x2
x3
6
(
x

x
)
dx

6
(
)

(
)
2
0.5
3

0. 5
1

(b)

1 1
0.52 0.53
6 ( ) (

)
2
3
2 3

0.5

29

Chapter 1 : Random Variables

x2
x3
6
(
x

x
)
dx

6
(
)

(
)
2
0.25
3 0.25

(c)

1 1
0.252 0.253
6 ( ) (

)
2
3
2 3

0.84375

Exercise 1.5
1.

The continuous random variable X has the probability distribution function

(2 x x 2 ) , 0 x 2
f ( x) 4

0
, otherwise

Find

2.

(a)

P( X 1) .

(b)

P( X 1) .

(c)

P(0.5 X 2) .

The continuous random variable X has the probability distribution function


0.125 x , 0 x 4
f ( x)
, otherwise
0

Find

3.

(a)

P( X 3) .

(b)

P( X 2.5) .

(c)

P(1.5 X 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

30

Chapter 1 : Random Variables

Find

4.

(a)

P( X 0.5) .

(b)

P( X 1.5) .

(c)

P(0.5 X 1.5) .

The continuous random variable X has the probability distribution function.


x,

f ( x ) 2 x ,
0,

0 x 1.
1 x 2.
otherwise.

Find

5.

(a)

P( X 1) .

(b)

P( X 1) .

(c)

P(0.5 X 2) .

The continuous random variable X has the probability distribution function.


2c,

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

0 x 2.
2 x 3.
otherwise.

Find

6.

(a)

the value of c .

(b)

P( X 1) .

(c)

P(2.5 X 3) .

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

31

Chapter 1 : Random Variables

f ( x ) 54
0

7.

, 6 x 12
, 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.

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


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

8.

(a)

P X .
4

(b)

mean.

(c)

variance.

Let the probability density function of X be defined by f ( x )

3x 2
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.5


1.

(a)

12

(b)

12

2.

(a)

0.5625 (b)

0.6094 (c)

3.

(a)

1/6

(b)

4.

(a)

12

(b)

(c)

0.875

1/3

(c)

1/2

12

(c)

7/8

0.4219

32

Chapter 1 : Random Variables

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
, x 2
0
3
x 8
F ( x)
, 2 x2
16
, x2
1

(b)

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
0
x
2x2

2
(0 x 1); 2 xdx
x and F ( x ) x 2

2 0
0
1

(a)

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

33

x0

, 0 x 1.
,

x 1

Chapter 1 : Random Variables

(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

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

0
,
x0

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

1
,
x 1

(a)

P( x 0.5) P( x 0.5)
F (0.5)
3(0.5) 2 2(0.5) 3

0.5

34

Chapter 1 : Random Variables

(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.6
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

2.

(a)

P( X 2) .

(b)

P( X 1) .

Given the probability density function


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

3.

(a)

Find the value of k.

(b)

Find the cumulative distribution function of X.

Given the probability density function


k / 8 , 0 x 4
f ( x)
0 , otherwise

(a)

Find the value of k.

(b)

Find the cumulative distribution function of X.

35

Chapter 1 : Random Variables

4.

Given the probability density function


kx 2
f ( x)
0

5.

1 x 4

, 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)

Let the continuous random variable X has probability density function as


follows,
kx , 2 x 0
x
f ( x ) , 0 x 2
3
0 , elsewhere

(a)

Find the value of k.

(b)

Find the cumulative distribution function F(x).

(c)

Find the value P( 1 X 1.5).

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 2 )

Theory 11

36

f ( x ) dx

Chapter 1 : Random Variables

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


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

x 2 x dx
0
1

2 x 2 dx
0
1

2x3

3 0

2
3

E( X 2 )

f ( x ) dx

x 2 2 x dx
0
1

( 2 x 3 ) dx
0
1

2x4

4 0

1
2

37

Chapter 1 : Random Variables

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

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

x f ( x ) dx

E( X )

x 6( x x 2 ) dx
0
1

6( x 2 x 3 )dx
0
1

x3 x4
6
4 0
3
13 14
6 0
3 4

1
2

E( X )
2

f ( x )dx

x 2 6( x x 2 ) dx
0

38

Chapter 1 : Random Variables

6( x 3 x 4 )dx
0
1

x4 x5
6
5 0
4
14 15
6 0
4 5

3
10

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

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
(a)

Mean E ( X ) x. f ( x ) dx
0

1 4
x( x 1) dx
12 0

39

Chapter 1 : Random Variables

1 4 2
x x dx
12 0
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

(b)

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

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

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

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

64 22


9 9
92

81

Exercise 1.7
1.

Given the probability density function


x / 8 , 0 x 4
f ( x)
0 , otherwise

40

Chapter 1 : Random Variables

2.

(a)

the mean.

(b)

the variance.

Given the probability density function


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

Find

3.

(a)

the mean.

(b)

the variance.

Given the probability density function


3(8 2 x x 2 ) / 80 , 0 x 4
f ( x)
0
, otherwise

Find the

4.

(a)

mean.

(b)

variance.

Given the probability density function


k

f ( x) (1 x) 4

5.

x0

, x0

(a)

Find the value of k.

(b)

Find the mean.

(c)

Find standard deviation.

Let the continuous random variable X has probability density function as


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

41

Chapter 1 : Random Variables

(a)

Find the value of k.

(b)

Find E (2x +1).

(c)

Find Var (3x 2).

EXERCISE CHAPTER 1
1.

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

0.2

f y 0.2 cy
0

2.

0 y 1
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) .

A continuous random variable X has the probability density function


1

f ( x ) 10
0

3.

1 y 0

, 0 x 10
, 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 ) .

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 .

42

Chapter 1 : Random Variables

4.

(b)

P( X 2) .

(c)

P( X 2) .

(d)

E ( X ) and Var ( X ) .

Given probability distribution function for discrete random variable X as


below.

5.

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.

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

6.

(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.

The density function for continuous random variable X is given by

w2

f ( x ) 2 w 2 x 3w 2

Find

43

0 x2

2 x3

, otherwise

Chapter 1 : Random Variables

7.

(a)

the constant w .

(b)

the cumulative distribution function of X.

(c)

P(1 X 2.5) by using cumulative distribution function of X.

A discrete random variable has a probability distribution as follows.


x

10

15

P( X x )

2t

3t

3t

(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

f y 0.2 cy
0

1 y 0
0 y 1
others

Find

9.

(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) .

The discrete random variable X has the probability distribution function as


below.

44

Chapter 1 : Random Variables

x2
23 ,

x
P( X x ) ,
23
0,

10.

x 1, 2, 3
x 4, 5
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 ) .

Given probability distribution function for discrete random variable X as


below.

11.

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.

A discrete random variable, X can assume five possible values which are 2, 3,
5, 8 and 10. The probability distribution is shown below.

12.

10

P( X )

0.15

0.10

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 ?

A discrete random variable, X can take only the values 0, 1 and 2 with

45

Chapter 1 : Random Variables

probability P0 , P1 and P2

respectively. Given that E ( X )

4
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
3
1
F ( x) 2
5
6
1

14.

15.

1 x 4
4x6
6 x 10
x 10

(a)

the probability density function of X.

(b)

P 3 x 6 .

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 2 , P X 3 4 and P 1 2 X 3 4 .

Given the function f (x ) such as below.


1
,
2
f ( x) 1
(2 x ) ,
4

16.

(a)

Verify that f is a valid density.

(b)

Compute P 1 2 X 1 2 .

1 x 0
0 x2

The continuous random variable X has probability density function such as


below, find

46

Chapter 1 : Random Variables

k ( x 2 ) 2 , 2 x 0

f ( x ) 4 k
, 0 x
3

0
,
otherwise

17.

(a)

the value of the constant k .

(b)

P 1 X 1 .

(c)

P X 1 .

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


2
2
(6 x x ) ,
f ( x) 27
0,

18.

(a)

Calculate P(0 X 1 12 ) .

(b)

P( X 2)

(c)

Find the mean of X.

0 x 3,
otherwise.

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


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

19.

(a)

Find the value of k .

(b)

Find P( X 2.5)

(c)

Find P(2.3 X 5.6) .

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


a 5 x , 5 x 6
f ( x)
, others
0

47

Chapter 1 : Random Variables

20.

(a)

Show that a 1 / 2.

(b)

Find P( X 5.7) .

Give the probability distribution function of continuous random variable of X


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

(a)

Find the value of c .

(b)

Calculate the P X 1 4 .

(c)

Find the mean of X.

ANSWER EXERCISE CHAPTER 1

1.

(b)

0.2( y 1)

F ( x)
3
0.2(1 y 3 y )

x 1

, 1 x 0
,

0 x 1

x 1

(c)

0.25

2.

(b)

0.45

(c)

7/10

(d)

175/3

3.

(a)

1/5

(b)

(c)

15 (d) =28/3,

2=539/36
=6, 2=8.4

4.

(b)

0.62, 0.63, 0.25

(c)

5.

(a)

41/144

(b)

61/576

6.

(a)

1/3
0
1
x
9

(b)

F ( x)
1
(x2
9

(c)

(c)
x0

, 0 x2

3 x 4) , 2 x 3
1

x3

0.1944

48

2/9

Chapter 1 : Random Variables

7.

8.

9.

(a)

1/10

(b)

(c)

0
2 / 10

3 / 10
F ( x)
6 / 10
9 / 10

x 1

1 x 2

2 x6

6 x 10

, 10 x 15
x 15

(a)

1.2

(b)

0.2 y 0.2

F ( y)
2
0.6 y 0.2 y 0.2

(c)

0.35

(b)

5/23

(iv)

0
1 / 23

5 / 23
F ( x)
14 / 23
18 / 23

y 1

, 1 y 0
,

0 y 1

y 1

0.6

(v)

x 1

, 1 x 2
, 2 x3
, 3 x 4
, 4 x5
x5

(c)

17/23

(d)

=77/23, 2=672/529

10.

(b)

0.88, 0.67

(c)

=6.06, 2=4.9964

11.

(a)

0.25

(b)

0.4

13.

(a)

The density functions such as below.


x
P(x )

14.

1
1/3

(c)

4
1/6

6
1/3

0.6

10
1/6

(b)

1/2

(a)

The function, f is a valid probability density function when


1

2x2
2 x dx
2

(1) (0) 2
2

49

Chapter 1 : Random Variables

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


(b)

1
3

P X 1 / 4 , P X 7 / 16
2
4

15.

(b)

3
1
P X 5 / 16
4
2
15/32

16.

(a)

1/8

(c)

P( X 1) 1 / 6

17.

(a)

18.

(a)

P(0 X 1 12 ) 2 / 3 , P(2 X 3) 13 / 81
(b)
6

(b)
P( X 2.5) 0.2160
125

P(1 X 0) 7 / 24 , P(0 X 1) 1 / 2
P( 1 X 1) 19 / 24

(b)

(c)

P(2.3 X 5.6) 0.8142

19.

(a)

1/2

(b)

P( X 5.7) 0.405

20.

(a)

3/2

(b)

P X 7/8
4

(c)

3/5

7/6

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

P( X ) 1 .
i 1

P( x i ) P( X x i ) .
The cumulative distribution function of a discrete random variable X is described as
n

the function F ( x ) P( X x ) P( X x ) which satisfies

50

Chapter 1 : Random Variables

F (x ) is an increase function.

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

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

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 )

X P( X )

Expected value of discrete random variable is E ( X )

all Xi

where
Xi

: ith outcome of X

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

: 1, 2,

Variance of discrete random variable

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

2
i

.P( X i )

all Xi

where
Xi

: ith outcome of X

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

: 1, 2,

51

Chapter 1 : Random Variables

The standard deviation of the probability distribution of a discrete random variable is


the square root of the variance. Std ( X ) Var( X )
Note :
E(aX + b) = a E(x) + b.
Var(aX + b) = a2 Var(x)

Properties of the Probability Density Function of Continuous Random Variable


f ( x) 1 .

f ( x) dx 1 .

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

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 .

Expected value of continuous random variable

E ( X ) x f ( x ) dx

Variance of continuous random variable

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

E( X 2 )

f ( x ) dx

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


is the square root of the variance.

Sd( X ) Var ( X )

52

Chapter 1 : Random Variables

CORRECTION PAGE CHAPTER 1

53

Chapter 1 : Random Variables

54

You might also like