Professional Documents
Culture Documents
Learning Objectives:
At the end of the discussion, the student should be able to;
1. Distinguish a discrete random variable from a continuous random
variable.
2. Describe the probability distributions of a discrete random variable.
3. Calculate the cumulative probability of a random variable.
4. Calculate the summary measures of a probability distribution of
random variables.
5. Use simulation to incorporate uncertainty into spreadsheet models.
Random Variable (Albright and Winston, 2020)
• A key aspect of solving real business problems is dealing
appropriately with uncertainty.
• This involves recognizing explicitly that uncertainty exists
and using quantitative methods to model uncertainty.
• In many situations, the uncertain quantity is a numerical
quantity. In the language of probability, it is called a Random
Variable, usually denoted by uppercase letters like X, Y, M.
A Random Variable is a function that associates a real number
with each element in the sample space.
X = 0, 1, 2, 3, … Y = 0, 1, 2
Random Variable (Albright and Winston, 2020)
A Random Variable is a function that associates a real number
with each element in the sample space.
Experiment: 2 coins S = {HH, HT, TH, TT} P(S) = 1
Let X = the number heads that face up
What are the values of X= 0, 1, 2
{TT} X = 0 P(X = 0) = ¼ or P(0) = 1/4
{HT, TH} X = 1 P(X =1) = 2/4
X 0 1 2
{HH} X = 2 P(X =2) = 1/4 P(X=x) 1/4 2/4 or 1/2 1/4
Random Variable (Walpole, et al., 1998)
Consider for example the random experiment of drawing two
balls in succession from an urn without replacement. Suppose the urn
contains 4 red balls and 3 black balls. Find the possible outcomes
(sample space) and the values y of the random variable Y, where Y is
the number of red balls. S = {RR, RB, BR, BB} n(S) = 4
Sample Space Y = 0, 1, 2
RR 2
RB 1
BR 1 Y 0 1 2
P(Y=y) 1/4 2/4 or 1/2 1/4
BB 0
Discrete and Continuous Random Variables
(Walpole et al., 1998)
Definition:
If a sample space contains a finite, COUNTABLE number of possible
values or an unending sequence with as many elements as there are whole
numbers, it is called a DISCRETE SAMPLE SPACE.
Example:
1. The sum of the numbers between 5 and 7 facing up when 2 dice are
thrown.
2. Four balls drawn from a box of 5 red and 6 green balls where x is the
number of green balls.
3. The number of females from three children.
Discrete and Continuous Random Variables
(Walpole
Definition: et al., 1998)
If a sample space contains an infinite number of possible values
equal to the number of points on a line segment, it is called CONTINUOUS
SAMPLE SPACE.
The outcomes of some statistical experiments may be neither finite nor
countable.
1. When one conducts an investigation measuring the distance that a
certain make of automobile will travel over a prescribed test on 5 liters
of gasoline.
2. If one were to record the length of time in a manufacturing process,
the possible time intervals making up the sample space are infinite in
number and are uncountable.
Statistics by Walpole
Discrete and Continuous Random Variables
(Albright and Winston, 2020)
• Usually a discrete distribution results from a count, whereas
a continuous distribution results from a measurement.
• This distinction between counts and measurements is not
always clear-cut.
• Mathematically, there is an important difference between
discrete and continuous probability distributions.
• Specifically, a proper treatment of continuous
distributions requires calculus.
• The normal distribution learned in Statistics is a type of
continuous distribution.
Discrete and Continuous Random Variables
Discrete and Continuous Random Variables
Example:
Discrete and Continuous Random Variables
3. The sample space giving a detailed description of each possible outcome when
Example:
three electronic components are tested may be written
3. The sample space giving a detailed description of each possible outcome when
S = {NNN, NND, NDN, DNN, NDD, DND, DDN, DDD} n(S) = 8
three electronic components are tested may be written
Where: N denotes non-defective and D denotes defective
S = {NNN, NND, NDN, DNN, NDD, DND, DDN, DDD}
Let M be the random variable for a defective item
Where: N denotes non-defective and D denotes defective
Each point in the sample space will be assigned a numerical value of 0, 1, 2, 3:
Let M be the random variable for a defective item
m = 0 – for no defective occur E={NNN}
Each point in the sample space will be assigned a numerical value of 0, 1, 2, 3:
m = 1 – for 1 defective occur E={NND, NDN, DNN}
m = 0 – for no defective occur E={NNN}
m = 2 - for 2 defective occur E={NDD, DND, DDN}
m = 1 – for 1 defective occur E={NND, NDN, DNN}
m = 3 - for 3 defective occur E={DDD}
m = 2 - for 2 defective occur E={NDD, DND, DDN}
Thus, the variable M is a discrete random variable.
m = 3 - for 3 defective occur E={DDD}
M 0 1 2 3
Thus, the variable M is a discrete random variable.
P(M=m) 1/8 3/8 3/8 1/8
Example:
Discrete and Continuous Random Variables
3. The sample space giving a detailed description of each possible outcome when
Example:
three electronic components are tested may be written
3. The sample space giving a detailed description of each possible outcome when
S = {NNN, NND, NDN, DNN, NDD, DND, DDN, DDD} n(S) = 8
three electronic components are tested may be written
m = 0 – for no defective occur E={NNN}
S = {NNN, NND, NDN, DNN, NDD, DND, DDN, DDD}
m = 1 – for 1 defective occur E={NND, NDN, DNN}
Where: N denotes non-defective and D denotes defective
m = 2 - for 2 defective occur E={NDD, DND, DDN}
Let M be the random variable for a defective item
m = 3 - for 3 defective occur E={DDD}
Each point in the sample space will be assigned a numerical value of 0, 1, 2, 3:
Thus, the variable M is a discrete random variable.
m = 0 – for no defective occur E={NNN}
M
m = 1 – for 1 defective0occur 1 2
E={NND, NDN, DNN} 3
P(M=m) 1/8 3/8 3/8 1/8
m = 2 - for 2 defective occur E={NDD, DND, DDN}
1. What is the probability of defectives less than or equal than 2?
m = 3 - for 3 defective occur E={DDD}
P(X = <2) = P(X=0) + P(X = 1) + P(x = 2) = 1/8+3/8+3/8 = 7/8 or 87.5%
Thus, the variable M is a discrete random variable.
Discrete and Continuous Random Variables
4. Consider for example the random experiment of drawing two balls
in succession from an urn without replacement. Suppose the urn
contains 4 red balls and 3 black balls. Find the possible outcomes
(sample space) and the values y of the random variable Y, where Y
is the number of red balls.
Sample Space Y = 0, 1, 2
Since the values of the random
RR 2
variable Y are whole number that
RB 1 represents the number of red
BR 1 balls drawn, then Y is a discrete
BB 0
random variable.
Probability Distributions (Albright and Winston, 2020)
• A probability distribution lists all of the possible values of the
random variable and their corresponding probabilities.
• The essential properties of a discrete random variable and its
associated probability distribution are quite simple.
• To specify the probability distribution of X, we need to specify its
possible values and their probabilities.
• We assume that there are k possible values, denoted
x1, x2, … , xk.
• The probability of a typical value xi is denoted in one of two
ways, either P(X = xi) or p(xi). P(X = 0) = 1/8, P(0) = 1/8
Probability Distribution of a Discrete Random Variable
Probability distributions must satisfy two criteria:
• The probabilities must be nonnegative.
• They must sum to 1.
Example:
Let us again consider the experiment of drawing two balls in succession from
an urn without replacement. Suppose the urn contains 4 red balls and 3 black
balls. We have listed the sample space of the experiment and identified the
random value of Y (red) = 0, 1 , 2. We now find the probability distributions of
this experiments as follows:
Y 0 1 2
P(Y) 1/4 2/4 or 1/2 1/4
Observe that all probabilities are positive and adding all the probabilities equals 1 .
Probability Distribution of a Discrete Random Variable
Example:
Consider the experiment of three electronic components tested,
S = {NNN, NND, NDN, DNN, NDD, DND, DDN, DDD}
If M is the random variable for a defective item and each point in the sample space will
be assigned a numerical value of 0, 1, 2, 3:
m = 0 – for no defective occur E={NNN}
m = 1 – for 1 defective occur E={NND, NDN, DNN}
m = 2 - for 2 defective occur E={NDD, DND, DDN}
m = 3 - for 3 defective occur E={DDD}
Then the probability distribution is:
m 0 1 2 3
P(M = m) 1/8 3/8 3/8 1/8
Cumulative Probability (Albright and Winston, 2020)
• A cumulative probability is the probability that the random variable is
less than or equal to some particular value.
1. Assume that 10, 20, 30, and 40 are the possible values of a random
variable X, with corresponding probabilities 0.15, 0.25, 0.35, and 0.25.
X 10 20 30 40
P(X) 0.15 0.25 0.35 0.25
M 0 1 3
3 1 4
P(M = 1 or M = 3) = + =
6 6 6 at least there is one correct match of helmet
2 made.
or or 66.67%
3
Statistics by Walpole
Exercise on Cumulative Probability:
b. Based on the stockroom clerk problem in the previous slide,
construct the probability distribution for the random variable M.
c. Find the cumulative probability for P(M 0).
2. A survey was given to 200 companies to determine their motivation
about the newly implemented government policy. Company
completing the survey could choose from 1 to 5 with qualitative
description from least motivated to greatly motivated, respectively. The
survey shows that 18% of the people rated 1, 11% rated 2, 12% rated 3,
36% rated 4, and 23% rated 5.
a. Construct the probability distribution for the survey using X as the
random variable.
b. Find the probability of finding a respondent who rated at least 3.
Statistics by Walpole
Exercise on Cumulative Probability:
3. A manufacturing facility needs to open a new product line. Based on
experience, the manager of this project believes that at most four
possible deliberations his proposal will undergo before it will be
approved by the board of directors. It is currently believed that the
probabilities of these four possibilities are 0.143, 0.263, 0.401, and
0.193. Let V be the random variable that represents the number of
deliberations that will take place before the proposal is approved.
a. What is the sample space V for this experiment?
b. Construct the probability distribution for the random variable V.
c. What is the probability that the proposal will undergo at most 2
deliberations only?
Statistics by Walpole
Cumulative Distribution Using Excel:
1. Two dice are rolled where the sum of all possible outcomes is recorded.
Use excel construct the probability distribution and the cumulative
probability distribution.
2. Based on the probability distribution generated, determine the
probability of
a. Rolling a 6 or less.
b. Rolling a 7 or more.
c. Rolling a number between 4 and 8 or 4 P(X) 8.
© 2020 Cengage. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
protected website or school-approved learning management system for classroom use.
Mean of a Discrete Random Variable for Two fair coins
1. If two fair coins are tossed where X is the number heads that occur per
toss, then the values of X can be 0, 1, or 2.
S = {TT, TH, HT, HH} X 0 1 2
Find the variance and standard deviation for the number of heads per
toss in an experiment.
1 1 1
2 = Var (X) = (0 − 1) 2 + (1 − 1) 2 + (2 − 1) 2 = 0.50
4 2 4
= STdev (X) = Var (X) = 0.50 = 0.7071
• Alternatively, using the computing formula, variance and stdev is;
2
= x i2 p( x i ) − 2
2
i =0
1 1 1
= 0 2 + 12 + 2 2 − 12
4 2 4
1
= 0 + + 1 − 1
2
= 0.5
1 12 18 4 12
= E(X) = (0) + (1) + (2) + (3) = or 1.7 2 components are good
35 35 35 35 7
Variance and Standard Deviation of a Random Variable
for 7 Components
Variance and standard deviation using alternative solutions:
2 = Var (X)
2
2 = x i2 p( x i ) − 2
3 i =0
= [ x i − E(X)] p( x i )
2
1 12 18 4
i =0
= 0 2 + 12 + 2 2 + 32 − 2 2
2 1 2 12 2 18 2 4 35 35 35 35
= (0 − 1.7143) + (1 − 1.7143) + (2 − 1.7143) + (3 − 1.7143)
35 35 35 35 12 72 36
= 0 + + + − 1.71432
= 0.0839 + 0.1749 + 0.0419 + 0.1889 35 35 35
= 0.4896 = 0.4896
= 0.4896 = 0.6997 = 0.4896 = 0.6997
Mean of a Discrete Random Variable for Gambling game
3. In gambling game a man is paid $5 if he gets all heads or all tails when three
coins are tossed, and he will pay out $3 if either one or two heads show. What
is his expected gain?
Solution:
Let Y = be the random variable of the amount the gambler can win.
The sample space for the possible outcomes when three coins are tossed
simultaneously, or equivalently if 1 coin is tossed three times, is
S = {HHH, HHT, HTH, THH, HTT, THT, TTH, TTT}
• One can argue that each of these probabilities is equally likely and occurs with
probability equal to 1/8.
• An alternative approach would be to apply the multiplicative rule of probability
for independent event to each element of S.
Mean of a Discrete Random Variable for Gambling Game
P(H H T ) = P(HHT ) For the random variable Y, the amount the
= P(H )P(H )P(T ) gambler can win, the possible values of Y are $5 if
1 1 1 event E1 = {HHH, TTT} occurs and -$3 if event E2 =
=
2 2 2 {HHT, HTH, THH, HTT, THT, TTH} occurs. Thus the
1 probability table is given by,
=
8 Y E1 = 0 heads or 3 heads E2 = 1 or 2 heads
2 3
= E(Y) = (5) + (−3) = −1, lose $1 per toss of the three coins.
It follows that, 8 4
In this game, the gambler will, on average, lose $1 per toss of the three coins.
Therefore, the expected gain of the gambler will be zero.
Variance and standard deviation of a Discrete Random Variable
4. In gambling game a man is paid $5 if he gets all heads or all tails when
three coins are tossed, and he will pay out $3 if either one or two heads
show. What is the variance and the standard deviation? Use alternative
formulas.
For the random variable Y, the amount the gambler can win, the possible
values of Y are $5 if event E1 = {HHH, TTT} occurs and -$3 if event E2 = {HHT,
HTH, THH, HTT, THT, TTH} occurs. Given the probability distribution below
and the computed expected mean equals μ = 0 (see problem #15, slides 29-
30), solve for variance and standard deviation using alternative formulas:
Y E1 = 0 heads or 3 heads (x1 = $5) E2 = 1 or 2 heads (x2 = -$3)
2 = Var (X) 2
= x i2 p( x i ) − 2
2
3 i =0
= [ x i − E(X)] p( x i )
2
2 6
= 52 + (-3)2
i =0
2 2 6
= (5 − 0) + (− 3 − 0)
2 8 8
8 8 50 54
= + −0
=
50 54
+ 8 8
8 8 = 13
= 13
= 13 = 3.61
= 13 = 3.61