Module 5.0 Joint Probability Distribution
Module 5.0 Joint Probability Distribution
Distribution
Prepared by:
Engr. Jerson A. Culla
INTRODUCTION
The study of random variables and their probability distributions
in the preceding sections is restricted to one dimensional sample
spaces, in that we recorded outcomes of an experiment as values
assumed by a single random variable. However, it is often useful to
have more than one random variable defined in a random experiment.
In general, if X and Y are two random variables, the probability
distribution that defines their simultaneous behaviour is called a joint
probability distribution. In this module, we will investigate some
important properties of these joint probability distributions.
Example 1. Two ballpoint pens are selected at random from a box that contains
3 blue pens, 2 red pens, and 3 green pens. If X is the number of blue pens
selected and Y is the number of red pens selected, find
6
Joint Probability Distribution for Two Random Variables
(a) the joint probability distribution f(x,y).
7
Joint Probability Distribution for Two Random Variables
(b) 𝑃[(𝑋,𝑌)∈𝐴] where A is the region{(𝑥,𝑦)|𝑥+𝑦 ≤ 1}.
8
Joint Probability Distribution for Two Random Variables
Example 2. From a sack of fruit containing 3 oranges, 2 apples, and 3 bananas,
a random sample of 4 pieces of fruit is selected. If X is the number of oranges
and Y is the number of apples in the sample, find
(a) the joint probability distribution of X and Y;
(b) P [(X, Y) ∈ A], where A is the region that is given by {(x, y) | x + y ≤ 2}
9
Joint Probability Distribution for Two Random Variables
Continuous Case. The case where both variables are continuous is obtained
easily by analogy with discrete case on replacing sums by integrals. Thus, the
joint probability function for the random variables X and Y (or, as it is more
commonly called, the joint density function of X and Y). The function f(x, y) is
a joint density function of the continuous random variables X and Y if
1. 𝑓(𝑥,𝑦) ≥ 0 𝑓𝑜𝑟 𝑎𝑙𝑙 (𝑥,𝑦)
∞ ∞
2. −∞ −∞ 𝑓(𝑥, 𝑦) 𝑑𝑥𝑑𝑦 = 1
3. 𝑃[(𝑋,𝑌) ∈ 𝐴]= ∬ 𝑓(𝑥,𝑦) 𝑑𝑥𝑑𝑦, for any region A in the xy plane.
10
Joint Probability Distribution for Two Random Variables
A privately owned business operates both a drive-in facility and a walk-in
facility. On a randomly selected day, let X and Y, respectively, be the proportions
of the time that the drive-in and the walk-in facilities are in use, and suppose that
the joint density function of these random variables is
2
𝑓 𝑥, 𝑦 = ൝5 2𝑥 + 3𝑦 , 0 ≤ 𝑥 ≤ 1,0 ≤ 𝑦 ≤ 1,
0
Find the following:
∞ ∞
(a) Verify condition of joint density function, −∞ −∞ 𝑓 𝑥, 𝑦 𝑑𝑥 𝑑𝑦 = 1
1 1 1
(b) Find P[(X,Y) ∈ 𝐴] 𝑤ℎ𝑒𝑟𝑒 𝐴 = { 𝑥, 𝑦 |0 < 𝑥 < , <𝑦< }
2 4 2
11
Joint Probability Distribution for Two Random Variables
∞ ∞
(a) Verify condition of joint density function, −∞ −∞ 𝑓 𝑥, 𝑦 𝑑𝑥 𝑑𝑦 = 1
The integration of f(x,y) over the whole region is
∞ ∞ 1 1
2
න න 𝑓 𝑥, 𝑦 𝑑𝑥 𝑑𝑦 = න න 2𝑥 + 3𝑦 𝑑𝑥 𝑑𝑦
−∞ −∞ 0 0 5
1 1 4𝑥 6𝑦
= 0 0 + 𝑑𝑥 𝑑𝑦
5 5
1 4 𝑥2 6
= 0 5 2 + (𝑥𝑦) | 𝑥=1
𝑥=0
𝑑𝑦
5
12 6
= 0 + 𝑦 𝑑𝑦
5 5
2 6 𝑦 2 𝑦=1
= 𝑦 + ( )| 𝑦=0
5 5 2
2 6 1
= 1 + ( )
5 5 2
2 3
12
= + =𝟏
5 5
Joint Probability Distribution for Two Random Variables
1 1 1
(b) Find P[(X,Y) ∈ 𝐴] 𝑤ℎ𝑒𝑟𝑒 𝐴 = { 𝑥, 𝑦 |0 < 𝑥 < , < 𝑦 < }
2 4 2
∞ ∞ 1/2 1/2
2
න න 𝑓 𝑥, 𝑦 𝑑𝑥 𝑑𝑦 = න න 2𝑥 + 3𝑦 𝑑𝑥 𝑑𝑦
−∞ −∞ 1/4 0 5
1/2 1/2 4𝑥 6𝑦
= 1/4 0 + 𝑑𝑥 𝑑𝑦
5 5
1/2 4 𝑥 2 6
= 1/4 + (𝑥𝑦) | 𝑥=1
𝑥=0
𝑑𝑦
5 2 5
1/2 2 3
= 1/4 + 𝑦 𝑑𝑦
20 5
𝑦 3 𝑦 2 𝑦=1/2
= + ( )| 𝑦=1/4
10 5 2
1 1
2 3(1/2)2 4 3(1/4)2
= + − +
10 10 10 10
1 7 𝟏𝟑
= − =
13 8 160 𝟏𝟔𝟎
Joint Probability Distribution for Two Random Variables
Let X and Y be two jointly continuous random variables with joint probability
density function
2 0 ≤ 𝑥 ≤ 1, 0 ≤ 𝑦 ≤ 1
𝑓 𝑥, 𝑦 = ቊ𝑥 + 𝑐𝑦
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
(a) Find the constant c.
1 1
(b) Find 𝑃(0 ≤ 𝑥 ≤ , 0 ≤ 𝑦 ≤ )
2 2
14
Joint Probability Distribution for Two Random Variables
(a) Find the constant c.
1 1
1 = 0 0 𝑥 + 𝑐𝑦 2 𝑑𝑥 𝑑𝑦
1 𝑥2
= 0 + 𝑐𝑥𝑦 2 | 𝑥=1𝑥=0
𝑑𝑦
2
11
= 0 + 𝑐𝑦 2 𝑑𝑦
2
𝑦 𝑐𝑦 3 𝑦=1
= + | 𝑦=0
2 3
1 𝑐
1= +
2 3
𝟑
𝒄=
𝟐
15
Joint Probability Distribution for Two Random Variables
1 1
(a) Find 𝑃(0 ≤ 𝑥 ≤ , 0 ≤ 𝑦 ≤ )
2 2
1/2 1/2
3 2
=න න 𝑥 + 𝑦 𝑑𝑥 𝑑𝑦
0 0 2
1 𝑥2 3
= 0 + 𝑥𝑦 2 | 𝑥=1/2
𝑥=0
𝑑𝑦
2 2
11 3 1 2
= 0 + ( )𝑦 𝑑𝑦
8 2 2
𝑦 𝑦 3 𝑦=1/2
= + | 𝑦=0
8 4
1 1
= +
16 32
𝟑
=
𝟑𝟐
16
Marginal Distribution of Two Random Variables
The marginal distribution of X alone and of Y alone are
∞ ∞
𝑔 𝑥 =න 𝑓 𝑥, 𝑦 𝑑𝑦 𝑎𝑛𝑑 ℎ 𝑦 = න 𝑓 𝑥, 𝑦 𝑑𝑥 𝑓𝑜𝑟 𝑡ℎ𝑒 𝑐𝑜𝑛𝑡𝑖𝑛𝑢𝑜𝑢𝑠 𝑐𝑎𝑠𝑒
−∞ −∞
The term marginal is used here because, in the discrete case, the values of g(x)
and h(y) are just the marginal totals of the respective columns and rows when
the values of f(x, y) are displayed in a rectangular table.
17
Marginal Distribution of Two Random Variables
Example: Show that the column and row totals of the previous example give the
marginal distribution of X alone and Y alone. (Example about two ballpoint
pens)
x
Row
f(x,y) 0 1 2
0 3/28 9/28 3/28 15/28
y 1 3/14 3/14 0 3/7
2 1/28 0 0 1/28
Column 5/14 15/28 3/28 1
18
Marginal Distribution of Two Random Variables
Example: Find g(x) and h(y) for the joint density function
2
𝑓 𝑥, 𝑦 = ቊ5 2𝑥 + 3𝑦 , 0 ≤ 𝑥 ≤ 1,0 ≤ 𝑦 ≤ 1,
0
∞ 1
2
𝑔 𝑥 = න 𝑓 𝑥, 𝑦 𝑑𝑦 = න 2𝑥 + 3𝑦 𝑑𝑦
−∞ 0 5
2 6𝑦 2 𝑦=1
= 𝑦 2𝑥 + |
5 10 𝑦=0
4𝑥 3 𝟒𝒙+𝟑
= + =
5 5 𝟓
∞ 1
2
ℎ 𝑦 = න 𝑓 𝑥, 𝑦 𝑑𝑥 = න 2𝑥 + 3𝑦 𝑑𝑥
−∞ 0 5
2 6𝑥𝑦 𝑥=1
= 𝑥2 + | 𝑥=0
5 5
2 6𝑦 𝟐+𝟔𝒚
= + =
5 5 𝟓
19
Marginal Distribution of Two Random Variables
Example: Find g(x) and h(y) for the joint density function
𝑥 + 𝑐𝑦 2 0 ≤ 𝑥 ≤ 1, 0 ≤ 𝑦 ≤ 1 3
𝑓 𝑥, 𝑦 = ቊ 𝑤ℎ𝑒𝑟𝑒 𝑐 =
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒 2
∞ 1
3 2
𝑔 𝑥 = න 𝑓 𝑥, 𝑦 𝑑𝑦 = න 𝑥 + 𝑦 𝑑𝑦
−∞ 0 2
𝑦 3 𝑦=1
= 𝑥𝑦 + |
2 𝑦=0
𝟏
=𝒙+
𝟐
∞ 1
3 2
ℎ 𝑦 = න 𝑓 𝑥, 𝑦 𝑑𝑥 = න 𝑥 + 𝑦 𝑑𝑥
−∞ 0 2
𝑥2 3
= + (𝑥)(𝑦 2 )| 𝑥=1
𝑥=0
2 2
1 3𝑦 2 𝟏+𝟑𝒚𝟐
= + =
2 2 𝟐
20
Conditional Distribution of Two Random Variables
𝑓(𝑥, 𝑦)
𝑓 𝑦|𝑥 = , 𝑝𝑟𝑜𝑣𝑖𝑑𝑒𝑑 𝑔 𝑥 > 0
𝑔(𝑥)
𝑓(𝑥, 𝑦)
𝑓 𝑥|𝑦 = , 𝑝𝑟𝑜𝑣𝑖𝑑𝑒𝑑 ℎ 𝑦 > 0
ℎ(𝑦)
21
Conditional Distribution of Two Random Variables
Example: Find the conditional distribution of X given that Y = 1, and use it to
determine P(X = 0 | Y= 1).
x
Row
f(x,y) 0 1 2
0 3/28 9/28 3/28 15/28
y 1 3/14 3/14 0 3/7
2 1/28 0 0 1/28
Column 5/14 15/28 3/28 1
22
Conditional Distribution of Two Random Variables
Example: Find the conditional distribution f(x|y) and f(y|x) for the joint density
function
2
𝑓 𝑥, 𝑦 = ቊ5 2𝑥 + 3𝑦 , 0 ≤ 𝑥 ≤ 1,0 ≤ 𝑦 ≤ 1,
0
2
𝑓(𝑥, 𝑦) 5 (2𝑥 + 3𝑦) 4𝑥 + 6𝑦 𝟐 + 𝟑𝒚
𝑓 𝑥y = = = =
ℎ(𝑦) 2 + 6𝑦 2 + 6𝑦 𝟏 + 𝟑𝒚
5
2
𝑓(𝑥, 𝑦) 5 (2𝑥 + 3𝑦) 𝟒𝒙 + 𝟔𝒚
𝑓 𝑦x = = =
𝑔(𝑥) 4𝑥 + 3 𝟒𝒙 + 𝟑
5
23
Conditional Distribution of Two Random Variables
Example: Find the conditional distribution f(x|y) and f(y|x) for the joint density
function
𝑥 + 𝑐𝑦 2 0 ≤ 𝑥 ≤ 1, 0 ≤ 𝑦 ≤ 1 3
𝑓 𝑥, 𝑦 = ቊ 𝑤ℎ𝑒𝑟𝑒 𝑐 =
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒 2
3 2
𝑓(𝑥, 𝑦) 𝑥 + 2 𝑦 𝟐𝒙 + 𝟑𝒚𝟐
𝑓 𝑥y = = 2 =
ℎ(𝑦) 1 + 3𝑦 𝟏 + 𝟑𝒚𝟐
2
3 2
𝑓(𝑥, 𝑦) 𝑥 + 2 𝑦 𝟐𝒙 + 𝟑𝒚𝟐
𝑓 𝑦x = = =
𝑔(𝑥) 1 𝟐𝒙 + 𝟏
𝑥+
2
24
Statistical Independence
Let X and Y be two random variables, discrete or continuous, with joint
probability distribution f(x,y) and marginal distribution g(x) and h(y),
respectively. The random variables X and Y are said to be statistically
independent if and only if
𝑓 𝑥, 𝑦 = 𝑔 𝑥 ℎ 𝑦
25
Statistical Independence
Example: Show that random variables are not statistically independent from the
previous Example of discrete case.
x 𝑓 0,1 = 3/14
Row
f(x,y) 0 1 2
5 3
0 3/28 9/28 3/28 15/28 𝑔 0 = ℎ 1 =
y 1 3/14 3/14 0 3/7
14 7
2 1/28 0 0 1/28
Column 5/14 15/28 3/28 1
Checking:
𝑓 0,1 = 𝑔 0 ℎ 1
3 5 3
= ( )
14 14 7
𝟑 𝟏𝟓
≠
𝟏𝟒 𝟗𝟖
Therefore X and Y are not statistically independent.
26