Download as pdf or txt
Download as pdf or txt
You are on page 1of 23

CHAPTER 3: RANDOM VARIABLES

LEARNING OBJECTIVES
At the end of this chapter, the student would be able to
 learn the concept of random variable.
 learn the distinction between discrete and continuous random variable.
 learn the concept of probability distribution of a discrete random variable.
 learn the concept of the mean, variance and standard deviation of a discrete random
variable and how to compute them.
 learn the concept of the probability distribution of a continuous random variable, and how
it is used to compute probabilities.
 learn basic facts about the family of normally distributed random variables.
 learn the concept of the mean, variance and standard deviation of a continuous random
variable and how to compute them

INTRODUCTION
Statistic is concerned with making inferences about population and population characteristic. It is
often the case that a number is naturally associated to the outcome of a random experiment: the
number of boys in a three-child family, the number of defective light bulbs in a case of 100 bulbs,
the length of time until the next customer arrives at the drive-through window at a bank. Such a
number varies from trial to trial of the corresponding experiment, and does so in a way that cannot
be predicted with certainty; hence, it is called a random variable. In this chapter and the next we
study such variables.

CONCEPT OF RANDOM VARIABLE


Definition
A Random Variable is a rule to assign a number to each outcome of a sample space.

We will denote random variables by a capital letter – 𝑿, 𝒀, 𝒁 and the value of random variable
can take by lowercase letter - 𝒙, 𝒚, 𝒛
Table 2.1 give four example of random variable
Experiment Random Variable, 𝑋 Value of random variable, 𝑥
Roll two fair dice Sum of the numbers of dots 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
on the top of faces
Observe car passing a check Number of car passing the 0, 1, 2, 3, 4,….
point check points
Inspect 42 calculators of class Number of defective 0, 1, 2, 3, 4, …., 42
2 DAU calculators
Observing percentages of Percentages of completed 0% ≤ 𝑝𝑟𝑜𝑗𝑒𝑐𝑡 𝑐𝑜𝑚𝑝𝑙𝑒𝑡𝑒
completed project of building project ≤ 100%
a new library

Example 2.1
Two balls are drawn without replacement from a box containing 4 red balls and 3 black balls.
Y is the number of red balls and y is the value of random variable Y. Find the possible outcome
and the value of y

Solution :

Example 2.2
A stockroom clerk returns three safety helmets at random to three mill employees who had
previously checked them. If Smith, Jones, and Brown in that order, received one of the three
helmets, list the sample points for the possible order of returning the helmets and find the
value 𝑚 of the random variable 𝑀 that represents the number of correct matches

Solution :
There are two types of random variable
i. Discrete random variable
ii. Continuous random variable

Definition
A random variable is called discrete if it has either a finite or a countable number of possible
values. A random variable is called continuous if its possible values contains a whole intervals
of number.

EXERCISE
1. Classify each random variable as either discrete or continuous.
a. The number of arrivals at an emergency room between midnight and 6:00 a.m.
b. The weight of a box of cereal labeled “18 ounces.”
c. The duration of the next outgoing telephone call from a business office.
d. The number of applicants for a job.
e. The number of vehicles owned by a randomly selected household.
2. Let an experiment consist of three tosses of a fair coin.
a. List down the sample space.
b. Let X be the random variable that denotes the number of heads occurring in the three tosses.
Find the possible values for X.
3. There are 3 blue marble and 4 green marbles in a box. Two marbles were selected randomly
with replacement before the second marble was taken. Let Z be the random variable that denoted
the number of blue marble selected. Find the possible values for Z.
4. Let 𝑊 be a random variable giving the number of heads minus the number of tails in three tosses
of a coin. List the elements of the sample space 𝑆 for the three tosses of the coin and to each sample
point assign a value 𝑤 of 𝑊.
DISCRETE RANDOM VARIABLE
A. PROBABILITY DISTRIBUTION FUNCTION, 𝑃(𝑥)
Associated to each possible value 𝑥 of a discrete random variable 𝑋
Definition
The set of ordered pairs (𝑥, 𝑃(𝑥)) is a probability distribution of the discrete random variable 𝑋
if its satisfy the condition

i. 0 ≤ 𝑃(𝑥) ≤ 1
ii. ∑ 𝑃 (𝑥 ) = 1

Example 2.3
A taxi driver randomly guesses at the answer on two true – false questions. Find the
probability distribution.

Solution :
Example 2.4
Determine the value of 𝑚 if he following function is probability distribution
𝑚, 𝑥=0
𝑃 (𝑋 = 𝑥 ) = {
𝑚𝑥, 𝑥 = 1, 2, 3

Solution :

Example 2.5
A shipment of 8 similar microcomputers to a retail outlet contains 3 that are defective. If a
school makes a random purchase of 2 of these computers, find the probability distribution for
the number of defectives. Then find the probability there is no defective computers.

Solution :
Example 2.6
Determine whether the distribution is probability distribution function.

𝑥 0 1 2
𝑃(𝑋 = 𝑥) 2 3 2
7 7 7

Solution :

Example 2.7

𝑥 0 1 2 3 4
𝑃(𝑋 = 𝑥) 0.12 0.45 0.2 0.15 0.08

Use the probability distribution function above to calculate


a) 𝑃(𝑋 ≤ 2)
b) 𝑃(𝑋 ≥ 2)
c) 𝑃(𝑋 < 3)
d) 𝑃(𝑋 > 1)
e) 𝑃(1 ≤ 𝑋 ≤ 3)
f) 𝑃(1 < 𝑋 < 4)
g) 𝑃(1 ≤ 𝑋 < 4)
h) 𝑃(0 ≤ 𝑋 ≤ 2)

Solution :
B. CUMULATIVE DISTRIBUTION FUNCTION, 𝐹(𝑥)
Definition
𝑥

𝐹 (𝑥 ) = 𝑃(𝑋 ≤ 𝑥 ) = ∑ 𝑃(𝑋 = 𝑥)
−∞

Calculation of cumulative distribution function, 𝐹(𝑥)

a) 𝑃 (𝑋 ≤ 𝑎) = 𝐹(𝑎)
0 𝒂 1
a

b) 𝑃(𝑋 > 𝑎) = 1 − 𝐹(𝑎)


0 𝒂 1
a

c) 𝑃 (𝑋 < 𝑎) = 𝐹(𝑎 − 1)
0 𝒂 1
a

d) 𝑃(𝑋 = 𝑎) = 𝐹(𝑎) − 𝐹(𝑎 − 1)


0 𝒂 1
a

e) 𝑃 (𝑎 < 𝑋 ≤ 𝑏) = 𝐹 (𝑏) − 𝐹(𝑎)


0 𝒂 𝒃 1
a a

f) 𝑃(𝑎 ≤ 𝑋 ≤ 𝑏) = 𝐹(𝑏) − 𝐹(𝑎 − 1)


0 𝒂 𝒃 1
a a

g) 𝑃(𝑎 ≤ 𝑋 < 𝑏) = 𝐹 (𝑏 − 1) − 𝐹(𝑎 − 1)


0 𝒂 𝒃 1
a a
h) 𝑃(𝑎 < 𝑋 < 𝑏) = 𝐹 (𝑏 − 1) − 𝐹(𝑎)
0 𝒂 𝒃 1
a a
Example 2.8
Let the random variable 𝑋 denotes the number of heads in 3 tosses of a fair coin.
a) Find the value of 𝐹(𝑥) for 𝑥 = 0, 1, 2 and 3.
b) Find 𝐹(1.5)

Solution :

C. EXPECTED VALUE, VARIANCE AND STANDARD DEVIATION

Definition :
The expected value (also called mean) of a discrete random variable 𝑋

𝐸 (𝑋) = 𝜇 = ∑ 𝑥 𝑃(𝑋 = 𝑥)
𝑥=−∞

Theorem of expected value :


a) 𝐸 (𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡) = 𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡

𝑏) 𝐸 (𝑎𝑥 ) = ∑ 𝑎𝑥𝑃(𝑋 = 𝑥)

= 𝑎 ∑ 𝑥𝑃(𝑋 = 𝑥)

= 𝑎𝐸(𝑥)

𝑐) 𝐸 (𝑎𝑥 + 𝑏) = ∑(𝑎𝑥 + 𝑏)𝑃(𝑋 = 𝑥)


= ∑ 𝑎𝑥𝑃(𝑋 = 𝑥 ) + ∑ 𝑏𝑃(𝑋 = 𝑥)

= 𝑎 ∑ 𝑥𝑃(𝑋 = 𝑥 ) + 𝑏 ∑ 𝑃(𝑋 = 𝑥)

= 𝑎𝐸𝑥 + 𝑏
Definition :
The variance of a discrete random variable 𝑋

𝑉𝑎𝑟 (𝑋) = 𝜎 2 = 𝐸 (𝑋 2 ) − [𝐸(𝑋)]2

which

𝐸 (𝑋 2 ) = ∑ 𝑥 2 𝑃(𝑋 = 𝑥)
𝑥=−∞

Theorem of variance :
a) 𝑉𝑎𝑟 (𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡) = 0

𝑏) 𝑉𝑎𝑟(𝑎𝑦) = 𝑎2 𝑉𝑎𝑟(𝑦)

𝑐) 𝑉𝑎𝑟(𝑎 + 𝑦) = 𝑉𝑎𝑟 (𝑎) + 𝑉𝑎𝑟(𝑦)


= 𝑉𝑎𝑟 (𝑦)

Definition :
The standard deviation of a discrete random variable 𝑋 is the square root of its variance

𝑆𝑑 (𝑋) = √𝑉𝑎𝑟 (𝑋)


Example 2.9
Suppose that the number of handphone sold in a day has the following probability distribution:
𝑥 0 1 2 3 4
𝑃(𝑋 = 𝑥 ) 0.2 0.1 0.3 0.1 0.3
Based on this probability distribution, find the average of number of handphone sold in a day,
variance and standard deviations.

Solution :

Example 2.10
A discrete random variable 𝑋 has the following probability distribution :

𝑥 -1 0 1 4
𝑃(𝑋 = 𝑥) 0.2 0.5 𝑎 0.1

a) Find value of 𝑎
b) Find 𝑃(0)
c) Find 𝑃(𝑋 > 0)
d) Find 𝑃(𝑋 ≥ 0)
e) Find 𝐹(𝑥)
f) Compute the value of 𝐸 (𝑋), 𝑉𝑎𝑟 (𝑥 ) 𝑎𝑛𝑑 𝑆𝑑 (𝑋)

Solution :
Example 2.11
The discrete random variable 𝑋 has the probability function

𝑘𝑥 𝑥 = 2,4,6
𝑃(𝑋 = 𝑥 ) = {𝑘(𝑥 − 2) 𝑥=8
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒

where 𝑘 is constant

a) Show that 𝑘 = 1⁄18


b) Find the exact value of 𝐹(5)
c) Find the exact value of 𝐸(𝑋)
d) Find the exact value of 𝐸(𝑋 2 )
e) Calculate 𝑉𝑎𝑟(3 − 4𝑋). Giving your answer to 3 significant figures.

Solution :
EXERCISE
1. A pair of dice is rolled. Let 𝑋 denote the sum of the numbers of dots on the top faces.
a) Construct the probability distribution of 𝑋
b) Find 𝑃(𝑋 ≥ 9)
c) Find the probability that 𝑋 takes an even value

2. A machine has 8 transistors. 3 of them are defective. If 2 transistors are selected at random with
replacement, find the probability distribution function.

3. Determine the value of 𝑐 if the following is probability dirsribution


𝑐𝑥 ,5 ≤ 𝑥 ≤ 7
𝑃(𝑋 = 𝑥 ) = {2𝑐(𝑥 − 1) , 𝑥 = 8
0 , 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
Then find 𝑃(3 ≤ 𝑋 < 7)

4. Suppose a random variable 𝑌 has the following cumulative distribution function:


0 ,𝑦 < 3
0.01 , 3 ≤ 𝑦 < 4
0.23 , 4 ≤ 𝑦 < 5
𝐹 (𝑦 ) =
0.6 , 5 ≤ 𝑦 < 6
0.86 , 6 ≤ 𝑦 < 7
{1 , 𝑦≥7
a) Find 𝑃(𝑌 = 7)
b) Find 𝑃(𝑌 ≥ 6)
c) Find 𝑃(𝑋 < 4)
d) Find the distribution of 𝑌

5. For discrete random variable 𝑊, the cumulative distribution functions are as follow:
1 𝑤
𝐹 (𝑤) = 1 − (1 − 𝑤) , 𝑤 = 1, 2, 3, 4
4
a) Find 𝐹(3)
b) Find 𝑃(𝑊 = 3)
c) Find 𝑃(2 ≤ 𝑤 ≤ 4)
6. A biased dice with six faces is rolled. The discrete random variable 𝑋 represents the score on
the uppermost face. The probability distribution of 𝑋 is shown in the table below.

𝑥 1 2 3 4 5 6
𝑃(𝑋 = 𝑥) 𝑎 𝑎 𝑎 𝑏 𝑏 0.3

a) Given that 𝐸 (𝑋) = 4.2, find the value of 𝑎 and 𝑏


b) Show that 𝐸 (𝑋 2 ) = 20.4
c) Find 𝑉𝑎𝑟 (5 − 3𝑋)

7. Borachio works in an automotive tire factory. The number of blemished tires that he produces
on a random day has the probability distribution

𝑥 2 3 4 5
𝑃(𝑋 = 𝑥) 0.48 0.36 0.12 0.04

a) Find the probability that Borachio will produce more than three blemished tires tomorrow.
b) Find the probability that Borachio will produce at most two blemished tires tomorrow
c) Compute mean and standard deviate of 𝑋

8. Five thousands lottery tickets are sold for $1 each. One ticket will win $1000, two tickets will
win $500 each and ten tickets will win $100 each. Let 𝑋 denotes the net gain from the purchase of
a randomly selected ticket.
a) Construct the probability distribution of 𝑋
b) Compute the expected value of 𝑋
c) Compute the standard deviation of 𝑋

9. A manufacturer receives a certain component from a supplier in shipments of 100 units. Two
units in each shipment are selected at random and tested. If either one of the units is defective the
shipment is rejected. Suppose a shipment has 5 defective units.
a) Construct the probability distribution for the number of defective units in such a sample.
b) Find the probability that such a shipment will be accepted.
10. A biased dice with five faces is rolled. The discrete random variable 𝑌 represents the score
which is uppermost. The cumulative distribution function of 𝑌 is shown in the table below.

𝑦 1 2 3 4 5
𝑃(𝑌 = 𝑦) 1⁄ 2⁄ 3𝑘 4𝑘 5𝑘
10 10

a) Find the value of 𝑘


b) Find the probability that getting at least two score.
c) Find the probability getting exactly four score
d) Find the probability getting more than three score.
e) Find the probability distribution of 𝑌
f) If each die is rolled once and the score of the two dice is independent, find the probability
that the sum of the two score equals
CONTINUOUS RANDOM VARIABLE
A. PROBABILITY DENSITY FUNCTION, 𝑓(𝑥)

Definition :
The probability density function, 𝑓(𝑥) is the probability that 𝑋 assumes a value in the interval
[𝑎, 𝑏] is equal to the area of the region that is bounded above by the graph of the equation 𝑦 =
𝑓(𝑥), bounded below of the x-axis, and bounded on the left and right by the vertical line through
𝑎 𝑎𝑛𝑑 𝑏.

It must satisfy all the conditions :


i. 𝑓(𝑥 ) ≥ 0, ∀ 𝑥

ii. ∫−∞ 𝑓(𝑥 )𝑑𝑥 = 1
𝑏
iii. 𝑃(𝑎 < 𝑋 < 𝑏) = ∫𝑎 𝑓(𝑥)𝑑𝑥

Calculation of probability density function, 𝑓(𝑥)


𝑎
1. 𝑃(𝑋 < 𝑎) = 𝑃(𝑋 ≤ 𝑎) = ∫−∞ 𝑓 (𝑥 )𝑑𝑥
𝑎
2. 𝑃(𝑋 > 𝑎) = 1 − 𝑃(𝑋 ≤ 𝑎) = 1 − ∫−∞ 𝑓(𝑥 )𝑑𝑥
𝑏
3. 𝑃(𝑎 < 𝑋 < 𝑏) = 𝑃(𝑎 ≤ 𝑋 ≤ 𝑏) = 𝑃(𝑎 ≤ 𝑋 < 𝑏) = 𝑃(𝑎 < 𝑋 ≤ 𝑏) = ∫𝑎 𝑓 (𝑥 )𝑑𝑥
Example 2.12
Show that the following function is a continuous random variable:
3𝑥 2 , 0 ≤ 𝑥 ≤ 1 ;
𝑓 (𝑥 ) = {
0 , otherwise.

Solution :

Example 2.13
Suppose that the error in the reaction temperature in °𝐶 for a controlled laboratory experiment
is a continuous random variable 𝑋 having the probability distribution function

𝑥 2⁄ , −1 < 𝑥 < 2
𝑓 (𝑥 ) = { 3
0, 𝑒𝑙𝑠𝑒𝑤ℎ𝑒𝑟𝑒

a) Verify condition 2, ∫−∞ 𝑓 (𝑥 )𝑑𝑥 = 1
b) Find 𝑃(0 < 𝑥 ≤ 1)

Solution :
B. CUMULATIVE DENSITY FUNCTION, 𝐹(𝑥)

Definition
𝑥
𝐹(𝑥 ) = 𝑃(𝑋 ≤ 𝑥 ) = ∫ 𝑓(𝑥 ) 𝑑𝑥 𝑓𝑜𝑟 − ∞ < 𝑥 < ∞
−∞

Calculation of cumulative density function, 𝐹(𝑥)


a) 𝑃 (𝑋 ≤ 𝑎) = 𝑃(𝑋 < 𝑎) = 𝐹(𝑎)
b) 𝑃(𝑋 > 𝑎) = 𝑃(𝑋 ≥ 𝑎) = 1 − 𝐹(𝑎)
c) 𝑃 (𝑎 < 𝑋 < 𝑏) = 𝑃(𝑎 ≤ 𝑋 ≤ 𝑏) = 𝑃(𝑎 ≤ 𝑋 < 𝑏) = 𝑃(𝑎 < 𝑋 ≤ 𝑏) = 𝐹 (𝑏) − 𝐹(𝑎)

Example 2.14
Refer example 2.13. Find
a) 𝐹(𝑥)
b) 𝑃(0 < 𝑋 ≤ 1)

Solution :
Example 2.15
The following is cumulative distribution for continuous random variable 𝑇:
0 , 𝑡<0
1
𝐹 (𝑡) = { (𝑡 3 + 2𝑡) , 0 ≤ 𝑡 ≤ 4
72
1 , 𝑡≥4
Find:
1) 𝑃(1 ≤ 𝑇 ≤ 2)
2) 𝑃(𝑇 > 3)
3) 𝑃(2 < 𝑇 < 4)

Solution :

C. EXPECTED VALUE, VARIANCE AND STANDARD DEVIATION

Definition :
The expected value (also called mean) of a continuous random variable 𝑋

𝐸 (𝑋) = ∫ 𝑥 𝑓(𝑥 ) 𝑑𝑥
−∞

If 𝑔(𝑥 )is any function for continuous random variable 𝑋 that has probability distribution
function of 𝑋, 𝑓(𝑥), then

𝐸 [𝑔(𝑥 )] = ∫ 𝑔(𝑥 )𝑓(𝑥 ) 𝑑𝑥
−∞
Definition :
The variance of a continuous random variable 𝑋

𝑉𝑎𝑟 (𝑋) = 𝜎 2 = 𝐸 (𝑋 2 ) − [𝐸(𝑋)]2

which

𝐸 (𝑋 2 ) = ∫ 𝑥 2 𝑓(𝑥 ) 𝑑𝑥
−∞

Definition :
The standard deviation of a continuous random variable 𝑋 is the square root of its variance

𝑆𝑑 (𝑋) = √𝑉𝑎𝑟 (𝑋)

Example 2.16
Given 𝑥 is continuous random variable with probability density function as follow:

𝑥 , 0≤𝑥<1
( )
𝑓 𝑥 = {2 − 𝑥 , 1 ≤ 𝑥 < 2
0 , others.

Find:
a) 𝐸(𝑋)
b) 𝑉𝑎𝑟 (𝑋)
c) 𝐸(2𝑋 + 3)
d) 𝑉𝑎𝑟 (3𝑋 − 1)

Solution :
Example 2.17

𝑘, −1<𝑥 <0
𝑓 (𝑥 ) = {𝑘 (1 + 𝑥 ), 0<𝑥<2
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒

a) Find value of 𝑘
1
b) Find 𝑃 (− 2 < 𝑥 < 1)

c) Find 𝐸(𝑥)

Solution :
EXERCISE

1. The total number of hours, measured in units of 10, that a student spends on reading book over
a period of one week is a continuous random variable 𝑋 with density function,
𝑥2 , 0<𝑥<1
( )
𝑓 𝑥 = {𝑘 − 𝑥 , 1 ≤ 𝑥 < 2
0 , elsewhere.
a) Find the value of 𝑘.
b) Find:
i) 𝑃(𝑋 < 1.5)
ii) 𝑃(𝑋 > 1.5)
iii) 𝑃(1 ≤ 𝑋 < 1.8)

2. Given 𝑧 is continuous random variable with probability density function as follow:


2(1 − 𝑧) , 0 ≤ 𝑧 ≤ 1
𝑓 (𝑧 ) = {
0 , others.
Find:
a) 𝑃 (𝑍 < 0.45)
b) 𝑃 (0.1 < 𝑍 < 0.79)
c) 𝐸 (𝑍) and 𝑉𝑎𝑟 (𝑍)
d) Determine 𝐸(4𝑍), 𝐸(5𝑍 + 2) and 𝑉𝑎𝑟 (2𝑍 − 2)

3. The length of time, in minutes that a customer queues in a Post office is a random variable 𝑇
with probability density function
𝑐 (81 − 𝑡 2 ), 0≤𝑡≤9
𝑓 (𝑡 ) = {
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
where c is a constant
1
a) Show that the value of 𝑐 is 486

b) Show that the cumulative distribution function 𝐹(𝑡)is given by


0, 𝑡<0
3
𝑡 𝑡
𝐹 (𝑡 ) = { − ,0 ≤ 𝑡 ≤ 9
6 1458
1, 𝑡>9
c) Find the probability that a customer will queue for longer than 3 minutes.

4. The continuous random variable 𝑋 has the following probability density function
𝑎 + 𝑏𝑥, 0≤𝑥≤5
𝑓 (𝑥 ) = {
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
where 𝑎 and 𝑏 are constants.
a) Show that 10𝑎 + 25𝑏 = 2
35
Given that 𝐸 (𝑋) = 12

b) Find a second equation in 𝑎 and 𝑏


c) Find the value of 𝑎 and 𝑏

5. The queueing time, 𝑋 minutes of a customer at a till of a supermarket has probability density
function
3
( )
𝑓 (𝑥 ) = {32 𝑥 𝑘 − 𝑥 , 0≤𝑥≤𝑘
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒

a) Show that the value of 𝑘 is 4


b) Write down the value of 𝐸(𝑋)
c) Calculate Var(X)

6. Let 𝑋 be the number of minutes that it takes a random selected person to solve a word puzzle.
The probability density function of 𝑋 is
3
𝑓 (𝑥 ) = {𝑥 4 , 𝑥≥1
0, 𝑥<1
a) Find the probability that a person takes more than two minutes to solve the puzzle
b) Find the cumulative distribution function of 𝑋
c) Find the probability that it takes a person 1.5 minutes or less to solve the puzzle.
7. If a dealer’s profit, in units of RM 1000, on a new automobile can be looked upon as a random
variable 𝑋 having the density function
2(1 − 𝑥 ), 0<𝑥<1
𝑓 (𝑥 ) = {
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
Find the average profit per automobile and its variance.

You might also like