You are on page 1of 17

EFA2213

ENGINEERING
MATHEMATICS
IV (STATISTICS)
LECTURE 4 :
RANDOM VARIABLES
WHAT IS RANDOM VARIABLE ?
• A random variable is a variable that assumes numerical
values associated with the random outcomes of an
experiment, where one (and only one) numerical value is
assigned to each sample point.
TYPES OF RANDOM VARIABLE

DISCRETE RANDOM VARIABLE CONTINUOUS RANDOM VARIABLE

 CAN ASSUME A COUNTABLE  CAN ASSUME ANY VALUE ALONG A


NUMBER OF VALUES GIVEN INTERVAL OF A NUMBER LINE

 EXAMPLE:  EXAMPLE:
• NUMBER OF SALES • LENGTH
• NUMBER OF CALLS • DEPTH
• SHARES OF STOCK • VOLUME
• PEOPLE IN LINE • TIME
• MISTAKE PER PAGE • WEIGHT
EXAMPLE 4.1
A coin is tossed three times and the sequence of heads and tails are noted.
1. The sample space for this experiment is S = {HHH, HHT, HTH, HTT, THH, THT, TTH,
TTT}.
2. Let x be the number of heads (H) in the three tosses.
3. X assigns each outcome ω in S a number from the Sx = {0, 1, 2, 3}.

4. The table below lists the eight outcomes of S and the corresponding values of X.

5. X is then a random variable taking on values in the set Sx = {0, 1, 2, 3}


EXAMPLE 4.2

Two passengers are chosen in succession


without replacement from a train
containing 4 male passengers and 3
female passengers.
• The possible outcomes and the value y
of the random variable Y, where Y is
the number of male passengers, are
EXAMPLE 4.3

A player pays RM1.50 to play the following game: A coin is tossed three times and the number
of heads X is counted.
The player receives RM1 if X = 2 and RM 8 if X = 3, but nothing otherwise.

1. Let Y be the reward to the player.


2. Y is a function of the random variable X and its outcomes can be related back to the
sample space of the underlying random experiment as follows:

3. Y is then a random variable taking on values in the set Sx = {0, 1, 8}


WHAT IS DISCRETE AND
CONTINUOUS SAMPLE SPACE ?
• If a sample space contains a finite number of possibilities or an un-ending sequence with as
many elements as there are whole numbers, it called a discrete sample space.
• If a sample space contains an infinite number of possibilities equal to the number of points
on a line segment, it is called a continuous sample space.
Discrete Probability
Distribution
• The set of ordered pairs (x, f(x)) is a probability mass function, probability function, or
probability distribution of the discrete random variable X if, for each possible outcome x,

f ( x)  0
 f ( x)  1
x

P( X  x)  f ( x)
EXAMPLE 4.5
A shipment of 8 similar motorcar to a retail  3  5 
   The probability distribution for X is
outlet contains 3 that are defective. 0 2 10
f ( 0 )  P( X  0 )     
If a car dealer makes a random purchase of 8 28
2 of these motorcars, find the probability  
2 x 0 1 2
distribution for the number of defectives.
 3  5  f(x) 10/28 15/28 3/28
1. Let X be a random variable whose   
values x are the possible numbers of  1  1  15
f ( 1 )  P( X  1 )  
defective motorcars purchased by the 8 28
 
dealer.  2
2. Then x can be any of the number 0, 1,  3  5 
and 2.   
 2  0  3
f ( 2 )  P( X  2 )  
8 28
 
2
EXAMPLE 4.6

A player receives RM1 if the number of heads in three coin tosses is 2, RM8 if the number is
3, but nothing otherwise.
Find the probability distribution of the reward Y.
1. S = {HHH, HHT, HTH, THH, TTH, THT, HTT, TTT}

2. P(Y=0) =f({TTT, TTH, THT, HTT}) = 4/8 =1/2


3. P(Y=1) =f({THH, HTH, HHT}) = 3/8
4. P(Y=8) =f({HHH }) = 1/8
5. P(Y=0) + P(Y=1) + P(Y=2) = 1
EXAMPLE 4.7
A certain union chapter has 32 male and 26 female members. An important committee of 7
people needs to be struck. 7 members are to be randomly selected to be on the committee.
a) What is the probability that there are exactly 6 women on the committee?
b) What is the probability that the committee contains exactly 6 women>

Solution
a) P(X=6) = 26 32
6 1
________ = 0.0245
58
• 7
EXAMPLE 4.7

Solution
b) P(X≥6) = P(X=6) + P(X=7)

26 32 26 32
3 1 7 0
= ___________ + ___________
58 58
7 7

= 0.0245 + 0.022
= 0.0267
Discrete Probability
Distribution
• The cumulative distribution function F(x) of a discrete
random variable X with probability distribution f(x) is

F ( x)  P( X  x)   f (t ), for    x  
tx

• The axioms of probability


and their corollaries 0  Fx ( x)  1
imply that the cumulative
distribution function lim F ( x)  1
x
x

has the following properties:


lim F ( x)  0
x  
x

P( X  b)  1  Fx (b)
EXAMPLE 4.8

Find the cumulative distribution function of the random variable X in Example 4.7.
Using F(x), verify that f(2) = 3/8.

1. f(0) = 1/16, f(1) = 1/4, f(2) =3/8, f(3) = 1/4, f(4) = 1/16
2. F(0) = f(0) = 1/16
3. F(1) = f(0) + f(1) = 5/16
4. F(2) = f(0) + f(1) +f(2) = 11/16
5. F(3) = f(0) + f(1) + f(2) + f(3) = 15/16
6. F(4) = f(0) + f(1) + f(2) + f(3) + f(4) = 1
7. f(2) =F(2) – F(1) = 11/16 – 5/16 = 3/8
EXAMPLE 4.9

Let X be the number of heads in three tosses of a fair coin.


Use the cumulative distribution function to find the probability of the events A= {1 < x ≤ 2},
B= {0.5 ≤ x < 2.5}, and C= {1≤ x < 2}.
Ω HHH HHT HTH THH HTT THT TTH TTT P[{1 < x ≤ 2}] = Fx(2) – Fx(1)
X 3 2 2 2 1 1 1 0 =7/8 – 4/8
= 3/8

P[{0.5 ≤ x < 2.5}] = Fx(2.5) – Fx(0.5)


X = number of head P(X = x)
=7/8 – 1/8
0 1/8 = 6/8
1 3/8
P[{1 ≤ x < 2}] = P(X=1)
2 3/8 = 3/8
3 1/8
EXERCISE
• A shipment of 7 television sets contains 2 defective sets. A hotel makes a random purchase
of 3 of the sets. If x is the number of defective sets purchased by the hotel, find the
probability distribution of X. Express the results graphically as a probability histogram.
• Find the cumulative distribution function of the random variable X representing the
number of defectives. Then using F(x), find
•  P( X = 1);
• P( 0 < X ≤ 2)
• Construct a graph of the cumulative distribution function.

You might also like