Joint Probability 2
Joint Probability 2
Joint Probability
Distributions
CHAPTER OUTLINE
5-1 Two or More Random Variables 5-2 Covariance and Correlation
5-1.1 Joint Probability Distributions 5-3 Common Joint Distributions
5-1.2 Marginal Probability 5-3.1 Multinomial Probability
Distributions Distribution
5-1.3 Conditional Probability 5-3.2 Bivariate Normal Distribution
Distributions 5-4 Linear Functions of Random
5-1.4 Independence Variables
5-1.5 More Than Two Random 5-5 General Functions of Random
Variables Variables
Chapter 4 Title and Outline
1
Learning Objective for Chapter 5
After careful study of this chapter, you should be able to do the
following:
1. Use joint probability mass functions and joint probability density
functions to calculate probabilities.
2. Calculate marginal and conditional probability distributions from joint
probability distributions.
3. Interpret and calculate covariances and correlations between random
variables.
4. Use the multinomial distribution to determine probabilities.
5. Understand properties of a bivariate normal distribution and be able to
draw contour plots for the probability density function.
6. Calculate means and variances for linear combinations of random
variables, and calculate probabilities for linear combinations of normally
distributed random variables.
7. Determine the distribution of a general function of a random variable.
Chapter 5 Learning Objectives 2
© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger.
Concept of Joint Probabilities
• Some random variables are not independent of each
other, i.e., they tend to be related.
– Urban atmospheric ozone and airborne particulate matter
tend to vary together.
– Urban vehicle speeds and fuel consumption rates tend to vary
inversely.
• The length (X) of a injection-molded part might not be
independent of the width (Y). Individual parts will vary
due to random variation in materials and pressure.
• A joint probability distribution will describe the behavior
of several random variables, say, X and Y. The graph of
the distribution is 3-dimensional: x, y, and f(x,y).
Chapter 5 Introduction 3
© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger.
Example 5-1: Signal Bars
You use your cell phone to check your airline reservation. The airline system
requires that you speak the name of your departure city to the voice
recognition system.
• Let Y denote the number of times that you have to state your departure
city.
• Let X denote the number of bars of signal strength on you cell phone.
y = number of x = number of bars Bar Chart of
times city of signal strength Number of Repeats vs. Cell
Phone Bars
name is stated 1 2 3
1 0.01 0.02 0.25
0.25
2 0.02 0.03 0.20
0.20
3 0.02 0.10 0.05
Probability
0.15
4 0.15 0.10 0.05 0.10
4 Times
0.05
Figure 5-1 Joint probability 3 Times
0.00 Twice
distribution of X and Y. The table cells 1
2 Once
3
are the probabilities. Observe that Cell Phone Bars
more bars relate to less repeating.
Sec 5-1.1 Joint Probability Distributions 4
© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger.
Joint Probability Mass Function Defined
(2) f x, y 1
x y
XY The sum of all probabilities is 1
1
0.003 1
0.003
Sec 5-1.1 Joint Probability Distributions 9
© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger.
Example 5-2: Server Access Time-2
Now calculate a probability:
1000 2000
P X 1000, Y 2000 f x, y dxdy
XY
x
0.003 x 4 0.001 x
0.003 e e e dx
0
Figure 5-5 Region of
integration for the probability
1 e 3 4 1 e 1
0.003 e that X < 1000 and Y < 2000 is
0.003 0.001 darkly shaded.
0.003 316.738 11.578 0.915
f X x f XY x, y dy
y
2000
P Y 2000 f XY x, y dy dx f XY x, y dy dx
0 2000 2000 x
Dark region left dark region right dark region
e
0.001 x y
e 0.002 y e 0.003 y
ke 0.002 y
6 10 3
0.001 0 0.002 2000
0.003 2000
0.001 y e 4 e 6
0.002 y 1 e 3
6 10 0.05
ke 0.002 0.003
0.001
6 10 3 e 0.002 y 1 e 0.001 y for y 0
V X x 2 f X x X2 x 2 f X x dx X2
R R
(2) f y dy 1
Yx
e 0.002 y
ke 0.001x
0.002 x
0.002
0.001 x e
ke
0.002
0.003e 0.003 x for x 0
f XY x, y ke 0.001x 0.002 y
fY x y
fX x 0.003e 0.003 x
0.002e 0.002 x 0.002 y for 0 x y
Sec 5-1.3 Conditional Probability Distributions 19
© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger.
Example 5-6: Conditional Probability-2
Now find the probability that Y exceeds 2000 given that X=1500:
P Y 2000 X 1500
f Y 1500 y dy
2000
0.0021500 0.002 y
2000
0.002 e
e 0.002 y
0.002e3
0.002 2000
4
3 e 1 Figure 5-8 again The conditional
0.002e e 0.368
PDF is nonzero on the solid line in
0.002
the shaded region.
Sec 5-1.3 Conditional Probability Distributions 20
© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger.
Example 5-7: Conditional Discrete PMFs
Conditional discrete PMFs can be shown as tables.
y = number of x = number of bars
times city of signal strength f(x|y) for y = Sum of
name is stated 1 2 3 f (y ) = 1 2 3 f(x|y) =
1 0.01 0.02 0.25 0.28 0.036 0.071 0.893 1.000
2 0.02 0.03 0.20 0.25 0.080 0.120 0.800 1.000
3 0.02 0.10 0.05 0.17 0.118 0.588 0.294 1.000
4 0.15 0.10 0.05 0.30 0.500 0.333 0.167 1.000
f (x ) = 0.20 0.25 0.55
1 0.050 0.080 0.455
2 0.100 0.120 0.364
3 0.100 0.400 0.091
4 0.750 0.400 0.091
Sum of f(y|x) = 1.000 1.000 1.000
2
V Y x y Y x fY x y dy y 2 fY x y Y2 x
y y
e 0.002 y
e 0.002 y
0.002e3 y
0.002 1500
1500
0.002
dy
0.002 y
3 1500 3 e
0.002e e
0.002 0.002 0.002 1500
1500 3
3 e 3
0.002e e
0.002 0.002 0.002
e 3
0.002e 2000 2000
3
0.002
If the connect time is 1500 ms, then the expected time to be authorized is 2000 ms.
Sec 5-1.3 Conditional Probability Distributions 23
© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger.
Example 5-9
For the discrete random variables in Exercise 5-1, what
is the conditional mean of Y given X=1?
y = number of x = number of bars
times city of signal strength
name is stated 1 2 3 f (y ) =
1 0.01 0.02 0.25 0.28
2 0.02 0.03 0.20 0.25
3 0.02 0.10 0.05 0.17
4 0.15 0.10 0.05 0.30
f (x ) = 0.20 0.25 0.55 y*f(y|x=1) y2*f(y|x=1)
1 0.050 0.080 0.455 0.05 0.05
2 0.100 0.120 0.364 0.20 0.40
3 0.100 0.400 0.091 0.30 0.90
4 0.750 0.400 0.091 3.00 12.00
Sum of f(y|x) = 1.000 1.000 1.000 3.55 13.35
12.6025
0.7475
The mean number of attempts given one bar is 3.55 with variance of 0.7475.
Sec 5-1.3 Conditional Probability Distributions 24
© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger.
Joint Random Variable Independence
• Random variable independence means that
knowledge of the values of X does not change
any of the probabilities associated with the
values of Y.
• X and Y vary independently.
• Dependence implies that the values of X are
influenced by the values of Y.
• Do you think that a person’s height and weight
are independent?
Figure 5-10(a) shows marginal & joint Figure 5-10(b) show the conditional
probabilities, fXY(x, y) = fX(x) * fY(y) probabilities, fY|x(y) = fY(y)
(1) f XY x, y f X x fY y
(2) fY x y fY y for all x and y with f X x 0
(3) f X y y f X x for all x and y with fY y 0
(4) P X A, Y B P X A P Y B for any
sets A and B in the range of X and Y , respectively. (5-7)
and (5-10)
1 0.3
2 0.4
3 0.3
μX = 2.4
Mean
Figure 5-13 Joint probability distributions and the sign of cov(X, Y).
Note that covariance is a measure of linear relationship. Variables
with non-zero covariance are correlated.
Sec 5-2 Covariance & Correlation 46
© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger.
Example 5-20: Intuitive Covariance
y = number of x = number of bars
times city of signal strength
name is stated 1 2 3
1 0.01 0.02 0.25
2 0.02 0.03 0.20
3 0.02 0.10 0.05
4 0.15 0.10 0.05
Since X 0 and Y 0,
XY and cov X , Y have the same sign.
We say that XY is normalized, so 1 XY 1 (5-16)
Note that XY is dimensionless.
Variables with non-zero correlation are correlated.
Sec 5-2 Covariance & Correlation 48
© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger.
Example 5-21: Covariance & Correlation
x y f(x, y) x-μX y-μY Prod
Determine the 0 0 0.2 -1.8 -1.2 0.42
covariance and 1 1 0.1 -0.8 -0.2 0.01
correlation. 1 2 0.1 -0.8 0.8 -0.07
Joint
2 1 0.1 0.2 -0.2 0.00
2 2 0.1 0.2 0.8 0.02
3 3 0.4 1.2 1.8 0.88
0 0.2 covariance = 1.260
1 0.2 correlation = 0.926
2 0.2
Marginal
3 0.4 Note the strong
0 0.2 positive correlation.
1 0.2
2 0.2
3 0.4
μX = 1.8
Mean
μY = 1.8
Figure 5-14 Discrete joint σX = 1.1662
StDev
Joint
2 9 0.6 10.8
3 11 0.2 6.6
1 0.2 18.8 = E(XY)
2 0.6 0.80 = cov(X ,Y )
Marginals
3 0.2 1.00 = ρXY
7 0.2 Using Equations
9 0.6 5-14 & 5-15
11 0.2
μX = 2
Mean
μY = 9.0
Figure 5-15 Discrete joint σX = 0.6325
StDev
1
4 2
E XY x y dx dy
E X x 2 ydx dy 16 0 0
16 0 0
1
4 3 2
x 3 2 2 x
1
4
y dy
y dy 16 0 3 0
16 0 3 0
4
1 8
1 y 2 8 1 16 4
4
y 2 dy
16 0 3
16 2 0 3 6 2 3
1 y3 1 64 32
4
1
4 2
E Y xy 2 dx dy 6 3
0
6 3 9 Figure 5-15 A planar
16 0 0 joint distribution.
1
4 2 2
2 x XY E XY E X E Y
y dy
16 0 2 0 32 4 8
0
2 y 3 1 64 8
4 9 3 3
16 3 0 8 3 3
Using Excel
0.03582 = (FACT(20)/(FACT(12)*FACT(6)*FACT(2))) * 0.6^12*0.3^6*0.08^2
x2 ! x3 !n x2 x3 !
for x2 0 to n x3 and x3 0 to n x2 .
x X 2 x X y Y y Y
2 2
1
u
2 1 X XY Y
2 2 2
for x and y .
x 0, x ,
Parameter limits: 1 1
y 0, y ,
Figure 5-17 These illustrations show the shapes and contour lines of two
bivariate normal distributions. The left distribution has independent X, Y
random variables (ρ = 0). The right distribution has dependent X, Y random
variables with positive correlation (ρ > 0, actually 0.9). The center of the
contour ellipses is the point (μX, μY).
Y
Y x Y x X
X
2
Yx
1 2
Y
2
Sec 5-3.2 Bivariate Normal Distribution 64
© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger.
Correlation of Bivariate Normal Random Variables
SD X 95 9.747 nm
If X
X 1 X 2 ... X p
and E X i
p
p
Then E X (5-28a)
p
p 2 2
Then V X 2 (5-28b)
p p
E Y c11 c2 2 ... c p p
and
SD Y 0.20 0.4472 cm
14.5 14
P Y 14.5 1 1 1.1180 0.1318
.4472
Using Excel
0.1318 = 1 - NORMDIST(14.5, 14, SQRT(0.2), TRUE)
Sec 5-4 Linear Functions of Random Variables 74
© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger.
Example 5-33: Beverage Volume
Soft drink cans are filled by an automated filling machine. The
mean fill volume is 12.1 fluid ounces, and the standard
deviation is 0.1 fl oz. Assume that the fill volumes are
independent, normal random variables. What is the probability
that the average volume of 10 cans is less than 12 fl oz?
Let X i denote the fill volume of the i th can
10
Let X X i 10
i 1
n
10 12.1
E X E X i 10 12.1 fl oz
i 1 10
10 0.1
2
2 10
V X 1 V X 0.001 fl oz 2
10 i 1 i
100
Using Excel
12 12.1
P X 12 3.16 0.00079
0.000783
0.001 = NORMDIST(12, 12.1, SQRT(0.001), TRUE)
fY y
y 4 2 1 y 4
for 4 y 12.
8 2 32
Chapter 5 Summary 81
© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger.