Probability and statistics II
Chapter 4: Bivariate random variables
Semester 1, 2021
Lecture 22
Motivation example
The number of eggs an insect lays follows a Poisson distribution with rate of 15 eggs per insect in a single
brood.
The probability of each one of the eggs hatching is 0.001 independent of the other eggs.
• What is the expected number of eggs per insect to hatch?
• What is the variance of the number of hatching eggs per insect ?
Discrete bivariate distributions
The joint probability of two or more events arises naturally in many experiments or in the consideration of
nature, and is therefore frequently of interest.
For example, the observation of the height and weight of individuals represents the intersection of a particular
pair of events. Calculation of the probability of these types of intersection are essential for making inferences
about the population from which such samples are drawn.
The above example considers the intersection of two random variables. Formalising the probability of this
intersection results in what is known as a bivariate distribution.
Bivariate probability mass function
Y, Yz
Let X and Y be discrete real-valued random variables on state spaces S1 and S2 , respectively.
f④ I 2)
The joint pmf (also known as bivariate pmf) f (X, Y ) for X and Y is defined to be
, ,
Pl Yi ,
Ya) =p ( Y =L ,
, ,
Ya =
Ya) =
Pt Y
,
= Y ,/A / 4<=22 } )
P (X, Y ) = P (X = x, Y = y) = P ({X = x} fl {Y = y}),
for ≠Œ < x < Œ and ≠Œ < y < Œ.
Y, Yz
Example Y
Y, ≥
Toss a coin three times. Let X be the number of heads on the first two coins and Y be the total number of
tails, what is the joint pmf of X and Y ?
Y, Yz
S = {(HHH), (HHT ), (HT H), (T HH), (HT T ), (T T H), (T HT ), (T T T )}
The probability of each outcome is 1/8.
We can visualise what is going on here by establishing a simple probability table of outcomes based on the
marginal state spaces
1
, ( for the first two coins )
heads Tails
S Y
,
Yz
☐ HHH 2 O
Y,
☒ HHT 2 1 possibility of Tinta
0 I 2
⑤ HTH 1 I
④ HTT I 2 O O O £ →
joint probability of mass
⑤ THH I 1 I 0 IT £ function .
%
⑥ THT I 2
2 SÉ ¥ 0
It TTH 0 2
3 £ 0 °
⑧T
each row has
a
possibility of
£
, X œ S1 = {0, 1, 2} and Y œ S2 = {0, 1, 2, 3}
For example,
• (X = 2, Y = 0) corresponds to event (HHH), so P (2, 0) = 1/8.
• (X = 1, Y = 2) corresponds to (HT T ) fi (T HT ), so P (1, 2) = 1/8 + 1/8 = 1/4
Y =0 Y =1 Y =2 Y =3
X=0 0 0 1/8 1/8
X=1 0 1/4 1/4 0
X=2 1/8 1/8 0 0
✗ =Y , Y=Yz
Properties of the bivariate pmf
If X and Y are discrete real-valued random variables on state spaces S1 and S2 , respectively, with joint pmf
P (x, y), then
• P
q(x, y) q
Ø 0 for all ≠Œ < x, y < Œ.
• xœS1 yœS2 P (x, y) = 1.
In the previous example, you should check (as a sanity check) that the sum of all probability is actually 1.
That is,
2 ÿ
ÿ 3
P (x, y) = 1.
X=0 Y =0
Marginal probability mass function
Let X and Y be jointly discrete random variables with probability mass function P (x, y).
The marginal probability mass functions of X and Y , respectively, are given by Calculate
using law
ÿ of total
probability
f1 (x) = P (x, y) for ≠ Œ < x < Œ,
yœS2
ÿ
f2 (y) = P (x, y) for ≠ Œ < y < Œ.
xœS1
Example
Toss a coin three times, let X be the number of heads on the first two coins and Y be the total number of
tails, so that P (X = x) is given by
x 0 1 2
P (X = x) 1/4 1/2 1/4
2
Chapter 4: Bivariate random variables
Semester 1, 2021
Lecture 22
Motivation example
The number of eggs an insect lays follows a Poisson distribution with rate of 15 eggs per insect in a single
brood.
The probability of each one of the eggs hatching is 0.001 independent of the other eggs.
• What is the expected number of eggs per insect to hatch?
• What is the variance of the number of hatching eggs per insect ?
Discrete bivariate distributions
The joint probability of two or more events arises naturally in many experiments or in the consideration of
nature, and is therefore frequently of interest.
For example, the observation of the height and weight of individuals represents the intersection of a particular
pair of events. Calculation of the probability of these types of intersection are essential for making inferences
about the population from which such samples are drawn.
The above example considers the intersection of two random variables. Formalising the probability of this
intersection results in what is known as a bivariate distribution.
Bivariate probability mass function
Y, Yz
Let X and Y be discrete real-valued random variables on state spaces S1 and S2 , respectively.
f④ I 2)
The joint pmf (also known as bivariate pmf) f (X, Y ) for X and Y is defined to be
, ,
Pl Yi ,
Ya) =p ( Y =L ,
, ,
Ya =
Ya) =
Pt Y
,
= Y ,/A / 4<=22 } )
P (X, Y ) = P (X = x, Y = y) = P ({X = x} fl {Y = y}),
for ≠Œ < x < Œ and ≠Œ < y < Œ.
Y, Yz
Example Y
Y, ≥
Toss a coin three times. Let X be the number of heads on the first two coins and Y be the total number of
tails, what is the joint pmf of X and Y ?
Y, Yz
S = {(HHH), (HHT ), (HT H), (T HH), (HT T ), (T T H), (T HT ), (T T T )}
The probability of each outcome is 1/8.
We can visualise what is going on here by establishing a simple probability table of outcomes based on the
marginal state spaces
1
, ( for the first two coins )
heads Tails
S Y
,
Yz
☐ HHH 2 O
Y,
☒ HHT 2 1 possibility of Tinta
0 I 2
⑤ HTH 1 I
④ HTT I 2 O O O £ →
joint probability of mass
⑤ THH I 1 I 0 IT £ function .
%
⑥ THT I 2
2 SÉ ¥ 0
It TTH 0 2
3 £ 0 °
⑧T
each row has
a
possibility of
£
, X œ S1 = {0, 1, 2} and Y œ S2 = {0, 1, 2, 3}
For example,
• (X = 2, Y = 0) corresponds to event (HHH), so P (2, 0) = 1/8.
• (X = 1, Y = 2) corresponds to (HT T ) fi (T HT ), so P (1, 2) = 1/8 + 1/8 = 1/4
Y =0 Y =1 Y =2 Y =3
X=0 0 0 1/8 1/8
X=1 0 1/4 1/4 0
X=2 1/8 1/8 0 0
✗ =Y , Y=Yz
Properties of the bivariate pmf
If X and Y are discrete real-valued random variables on state spaces S1 and S2 , respectively, with joint pmf
P (x, y), then
• P
q(x, y) q
Ø 0 for all ≠Œ < x, y < Œ.
• xœS1 yœS2 P (x, y) = 1.
In the previous example, you should check (as a sanity check) that the sum of all probability is actually 1.
That is,
2 ÿ
ÿ 3
P (x, y) = 1.
X=0 Y =0
Marginal probability mass function
Let X and Y be jointly discrete random variables with probability mass function P (x, y).
The marginal probability mass functions of X and Y , respectively, are given by Calculate
using law
ÿ of total
probability
f1 (x) = P (x, y) for ≠ Œ < x < Œ,
yœS2
ÿ
f2 (y) = P (x, y) for ≠ Œ < y < Œ.
xœS1
Example
Toss a coin three times, let X be the number of heads on the first two coins and Y be the total number of
tails, so that P (X = x) is given by
x 0 1 2
P (X = x) 1/4 1/2 1/4
2