Module 3-2: Probability Models
A random variable is a variable that associates a numerical value with
each outcome of a random event.
Notation:
random variable: capital letter
specific value: lower-case letter
A random variable is said to be:
discrete if its set of possible values is finite or countably infinite
(isolated points on a number line).
continuous if its set of possible values is uncountably infinite
(an entire interval on a number line).
The probability distribution (or probability model) of a random vari-
able is a function that associates a probability to:
each value of a discrete random variable X.
any interval of values of a continuous random variable X
(using a density curve).
Notation: P (X = x) or P (x)
The probability distribution of a discrete random variable satisfies:
0 ≤ P (X = x) ≤ 1, for each value x of X
X
P (X = x) = 1
x
Module 3-2 Page 1 of 22
Example: Roll two fair dice.
Outcomes: (1, 1) (1, 2) (1, 3) (1, 4) (1, 5) (1, 6)
(2, 1) (2, 2) (2, 3) (2, 4) (2, 5) (2, 6)
(3, 1) (3, 2) (3, 3) (3, 4) (3, 5) (3, 6)
(4, 1) (4, 2) (4, 3) (4, 4) (4, 5) (4, 6)
(5, 1) (5, 2) (5, 3) (5, 4) (5, 5) (5, 6)
(6, 1) (6, 2) (6, 3) (6, 4) (6, 5) (6, 6)
(a) X = sum of the two dice
x P (X = x)
2
3 2
36
5 4
36
6 5
36
8 5
36
9 4
36
10 3
36
11 2
36
12 1
36
Module 3-2 Page 2 of 22
Compute the following:
i) P (X ≤ 3)
ii) P (6 ≤ X < 9)
iii) P (X > 10)
iv) P (X ≥ 3)
(b) X = maximum of the numbers showing on the two dice
x P (X = x)
1 1
36
2 3
36
4 7
36
6 11
36
Module 3-2 Page 3 of 22
Expected Value or Mean
To describe the center and spread of a probability distribution of a random
variable, we often use the mean and the standard deviation, respectively.
The probability distribution is a model, so the mean and the standard de-
viation are parameters of this model.
Notation: µ = mean σ = standard deviation
Let X be a discrete random variable with probability distribution P (x).
The mean or expected value of X is given by
X
µX = µ = E(X) = xP (x)
x
Example: Roll two fair dice.
(a) X = sum of the two dice.
E(X) =
(b) X = maximum of the numbers showing on the two dice
E(X) =
Module 3-2 Page 4 of 22
Example: You draw a card from a standard deck of 52 cards. If you
draw a black card, you win nothing. If you draw a diamond, you win $5.
If you draw a heart, you win $10, unless it is the Queen of Hearts. You
win $30 for the Queen of Hearts.
(a) Create a probability distribution for the amount of money you win at
this game.
Outcome x P (X = x)
(b) Find your expected winnings.
(c) Would you pay $6 to play this game? How about $2?
Module 3-2 Page 5 of 22
Example: In a litter eight of puppies, there are five males and three
females. Two puppies are randomly selected.
(a) Create a probability distribution for the number of male puppies se-
lected.
x P (X = x)
(b) Find the expected number of male puppies selected.
Module 3-2 Page 6 of 22
Variance and Standard Deviation
The variance of a random variable is the expected value of the squared
deviations from the mean.
Let X be a discrete random variable with probability distribution P (x)
and mean µ. The variance of X is:
X
2 = σ 2 = Var(X) =
σX (x − µ)2P (x)
x
and the standard deviation is
p
σX = σ = SD(X) = Var(X)
Alternative formula for variance:
X
σ 2 = Var(X) = x2P (x) − µ2
x
Example: Card Game
Outcome x P (x) (x − µ)2P (x)
Black 0 1
2
Diamond 5 1
4
Heart 10 3
13
(not queen)
Queen of 30 1
52
Hearts
Module 3-2 Page 7 of 22
Example: Roll two fair dice.
X = maximum of the numbers showing on the two dice
x P (x) x2P (x)
1 1
36
2 3
36
3 5
36
4 7
36
5 9
36
6 11
36
Module 3-2 Page 8 of 22
Properties of Expectation, Variance, and Standard Deviation
(for discrete and continuous random variables)
Shifting:
add (or subtract) a constant to every value of a random variable X.
Let c be a constant.
E(X ± c) = E(X) ± c
Var(X ± c) = Var(X)
SD(X ± c) = SD(X)
Example: Card Game: add $2 to all payouts
Recall: E(X) = $4.13, Var(X) = 29.54, SD(X) = $5.44.
Outcome y P (Y = y)
Black 2 1
2
Diamond 7 1
4
Heart 12 3
13
(not queen)
Queen of 32 1
52
Hearts
Module 3-2 Page 9 of 22
Scaling: multiply every value of a random variable X by a constant.
Let a be a constant.
E(aX) = aE(X)
Var(aX) = a2 Var(X)
SD(aX) = |a|SD(X)
Example: Card Game: multiply all payouts by 4
Recall: E(X) = $4.13, Var(X) = 29.54, SD(X) = $5.44.
Outcome y P (Y = y)
Black 0 1
2
Diamond 20 1
4
Heart 40 3
13
(not queen)
Queen of 120 1
52
Hearts
Module 3-2 Page 10 of 22
Adding / Subtracting Random Variables
Let X be a random variable with mean / expected value µX = E(X),
2 = Var(X), and standard deviation σ = SD(X).
variance σX X
Let Y be a random variable with mean / expected value µY = E(Y ),
variance σY2 = Var(Y ), and standard deviation σY = SD(Y ).
Then X +Y and X −Y are random variables with means (expected values)
E(X + Y ) = E(X) + E(Y ) and E(X − Y ) = E(X) − E(Y )
If X and Y are independent, then the variances are
Var(X+Y ) = Var(X)+Var(Y ) and Var(X−Y ) = Var(X)+Var(Y )
Warning: In general,
SD(X + Y ) 6= SD(X) + SD(Y )
SD(X + Y ) =
Let a and b be constants and let X and Y be random variables (discrete
or continuous), then
E(aX ± bY ) = aE(X) ± bE(Y )
and if X and Y are independent
Var(aX ± bY ) = a2 Var(X) + b2 Var(Y )
Warning: For repeated instances of a random variable X, we use the
notation X1, X2, X3, . . ., since each instance represents a different outcome
of X. In particular,
X1 + X2 + X3 6= 3X
Module 3-2 Page 11 of 22
Note:
For a continuous random variable X with a Normal probability
model, shifting or scaling X produces a random variable that also has
a Normal probability model, but with a different mean and standard
deviation.
If X and Y are independent continuous random variables with Nor-
mal probability models, then their sum X + Y (or difference X − Y )
also has a Normal probability model (with a new mean and standard
deviation).
1 9
Example: Flip a fair coin. E(X) = Var(X) =
2 4
Outcome x P (X = x)
H -1 1
2
T 2 1
2
Flip two fair coins (independent trials): Y = X1 + X2.
Outcome y P (Y = y)
Module 3-2 Page 12 of 22
Example: Suppose you are given two independent random variables, X
and Y , with means and standard deviations:
Mean Standard deviation
X 10 3
Y -25 5
Compute:
(a) E(2X − 1)
(b) Var(2X − 1)
(c) E(4X − 3Y + 6)
(d) Var(4X − 3Y + 6)
Module 3-2 Page 13 of 22
Example: A company sells flower seeds in packets of 20. They estimate
that the mean number of good seeds (that is, seeds that actually grow)
in each packet is 18 with a standard deviation of 1.2. You buy 5 packets
of seeds. Assume the number of good seeds in each packet is independent
(trials of picking seed packets are independent).
(a) What is the expected value of the total number of good seeds you will
get?
(b) What is the standard deviation of the total number of good seeds you
will get?
(c) In one packet of seeds, what is the expected number of bad seeds? The
standard deviation of the number of bad seeds?
Module 3-2 Page 14 of 22
Example: A farming couple send their son Bob every Saturday to a
local farmer’s market to sell carrots and broccoli, where he sells an av-
erage of $250 worth of carrots with a standard deviation of $30 and an
average of $110 worth of broccoli with a standard deviation of $10. Sup-
pose Bob’s parents pay him $100 plus 10% commission on the carrot sales
and 15% commission on the broccoli sales for that day. Assume that the
dollar amount of carrots sold and the dollar amount of broccoli sold are
independent.
(a) Find the expected value of Bob’s total Saturday income.
(b) Find the variance and standard deviation of Bob’s total Saturday in-
come.
Module 3-2 Page 15 of 22
Example: A factory manager collects data on the number of equipment
breakdowns per day. From this data the following probability distribution
was obtained.
Let X = the number of breakdowns on a random day.
x P (X = x)
0 0.80
1 0.15
2 0.05
(a) Find the mean and standard deviation of X.
Module 3-2 Page 16 of 22
(b) Assume that the number of breakdowns on different days are indepen-
dent. Let X1 and X2 be the number of breakdowns on two random
days. Create a probability distribution for Y = X1 + X2, the total
number of breakdowns on two days.
Outcome y P (Y = y)
Module 3-2 Page 17 of 22
(c) Find the expected value and standard deviation of Y , the total number
of breakdowns on two random days.
X1 + X2
(d) Let X = be the average number of breakdowns on two ran-
2
dom days. Find the expected value and standard deviation of X, the
average number of breakdowns on two days.
Module 3-2 Page 18 of 22
Example: Suppose that the heights of adult males in Canada can be
described by a Normal model with a mean of 176 cm and standard deviation
of 7 cm and the heights of adult females in Canada can be described by
a Normal model with a mean of 163 cm and standard deviation of 6 cm.
Suppose we randomly select a Canadian male and a Canadian female.
What is the probability that the male is taller than the female? Assume
the heights of Canadian males and females are independent.
Module 3-2 Page 19 of 22
Example: A bicycle shop receives its bikes in boxes, which then have to
be unpacked, assembled, and tuned-up before they can sell them. Suppose
that unpacking time can be described by a Normal model with mean 3.5
minutes and a standard deviation of 0.7 minutes, that assembly time can be
described by a Normal model with mean 21.8 minutes and a standard de-
viation of 2.4 minutes, and that tuning time can be described by a Normal
model with mean 12.3 minutes and a standard deviation of 2.7 minutes.
Also suppose that times for each of the set-up phases is independent.
Let Xu = unpacking time of a bike
Let Xa = assembly time of a bike
Let Xt = tuning time of a bike
(a) What are the mean and standard deviation of the total bicycle set-up
time?
Module 3-2 Page 20 of 22
(b) A customer wants to purchase a bike in a colour that is still in the box.
The manager says it will be ready for them in 30 minutes. What is the
probability that it will be ready on time?
Module 3-2 Page 21 of 22
Formulas:
Let X and Y be random variables (continuous or discrete) and let a, b, and
c be constants.
Expected Value
E(X ± c) = E(X) ± c
E(aX) = aE(X)
E(X ± Y ) = E(X) ± E(Y )
E(aX + bY + c) = aE(X) + bE(Y ) + c
Variance
Var(X ± c) = Var(X)
Var(aX) = a2 Var(X)
If X and Y are independent
Var(X ± Y ) = Var(X) + Var(Y )
Var(aX + bY + c) = a2 Var(X) + b2 Var(Y )
Module 3-2 Page 22 of 22