0% found this document useful (0 votes)
12 views43 pages

Lecture 5 - Joint Distributions

The lecture covers joint probability distributions for discrete random variables, focusing on calculating probabilities, marginal distributions, means, and variances. It includes examples illustrating the use of joint probability mass functions and the calculation of marginal distributions. Additionally, it discusses joint probability density functions for continuous random variables and conditional probability distributions.

Uploaded by

mawoye3141
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views43 pages

Lecture 5 - Joint Distributions

The lecture covers joint probability distributions for discrete random variables, focusing on calculating probabilities, marginal distributions, means, and variances. It includes examples illustrating the use of joint probability mass functions and the calculation of marginal distributions. Additionally, it discusses joint probability density functions for continuous random variables and conditional probability distributions.

Uploaded by

mawoye3141
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 43

Lecture 5

Joint Probability
Distributions
DR. MAHA HASSANEIN
Lecture Objectives
Use joint probability mass functions to calculate
probabilities in two discrete random variables
Calculate marginal distributions from joint probability
distributions
Calculate means and variance for linear combinations of
random variables and calculate probabilities

Spring 2024 DR. MAHA A. HASSANEIN


Example 1: Two discrete RVs
Box contains 3 Red, 2 Green balls, 3 Blue . Select three balls
at random from a box together
Let X = number of Red balls in the selection
Let Y = number of Green balls in the selection

Define the probability distribution in two discrete random


variables X and Y

𝑓 𝑥, 𝑦 = 𝑃(𝑋 = 𝑥, 𝑌 = 𝑦)

Spring 2024 DR. MAHA A. HASSANEIN


Solution
𝑋 = 0,1,2,3 and 𝑌 = {0,1,2} 30
5 2 3 𝑃 𝑋 = 1, 𝑌 = 1 =
𝑃 𝑋 = 0, 𝑌 = 0 = 0 0 3
=
1
=
1 120
10 10.9.8
120 15
3 3!
𝑃 𝑋 = 1, 𝑌 = 0 =
5 2 3 120
𝑃 𝑋 = 1, 𝑌 = 2 = 1 2 0
10 =
5.1
10.9.8 =
5
120
30
3 3! 𝑃 𝑋 = 2, 𝑌 = 0 =
5 2 3 120
𝑃 𝑋 = 2, 𝑌 = 1 = 2 1 0
=
5.4
2!
.2
=
20 6
10 10.9.8
120 𝑃 𝑋 = 0, 𝑌 = 1 =
3 3!
120
5 2 3 5.4.3
.1 10
3
𝑃 𝑋 = 3, 𝑌 = 0 = 3 0 0
10 = 3!
10.9.8 =
120
𝑃 𝑋 = 0, 𝑌 = 2 =
3 3! 120

Spring 2024 DR. MAHA A. HASSANEIN


Solution Example 1:
Probability Distribution of two discrete random variables

Y/X 0 1 2 3

0
1/120 15/120 30/120 10/120

1
6/120 30/120 20/120 0

2
3/120 5/120 0 0

Each entry in the table defines 𝑃 𝑋 = 𝑥, 𝑌 = 𝑦


Probability that RV X takes value x and RV Y takes exactly value y

Spring 2024 DR. MAHA A. HASSANEIN


Joint Probability Distribution
Function
The joint Probability mass function of the DRVs X and Y,
denoted as 𝑓 𝑥, 𝑦 is

𝑓 𝑥, 𝑦 = 𝑃 𝑋 = 𝑥, 𝑌 = 𝑦
satisfies
𝑓 𝑥, 𝑦 ≥ 0

෍ ෍ 𝑓 𝑥, 𝑦 = 1
𝑦 𝑥

Spring 2024 DR. MAHA A. HASSANEIN


Marginal Probability
Distributions
The marginal probability mass functions of X and Y are
𝑓𝑋 𝑥 = 𝑃 𝑋 = 𝑥 = ෍ 𝑓(𝑥, 𝑦)
𝑓𝑜𝑟 𝑎𝑙𝑙 𝑦

𝑓𝑌 𝑦 = 𝑃 𝑌 = 𝑦 = ෍ 𝑓(𝑥, 𝑦)
𝑓𝑜𝑟 𝑎𝑙𝑙 𝑥

Then the mean and variance are :


μ𝑋 = 𝐸 𝑋 = σ𝑥 𝑥𝑓𝑋 𝑥 and 𝜎𝑋 2 = 𝐸 𝑋 2 − μ𝑋 2
μ𝑌 = 𝐸 𝑌 = σ𝑦 𝑦𝑓𝑌 𝑦 and 𝜎𝑌 2 = 𝐸 𝑌 2 − μ𝑌 2

Spring 2024 DR. MAHA A. HASSANEIN


Example 1 :
The Marginal mass functions 𝑓𝑋 𝑥 and 𝑓𝑌 𝑦 :

Y/X 0 1 2 3 𝑓𝑌 𝑦

0
1/120 15/120 30/120 10/120 56/120

1
6/120 30/120 20/120 0 56/120

2
3/120 5/120 0 0 8/120

𝑓𝑋 𝑥
10/120 50/120 50/120 10/120 1

Spring 2024 DR. MAHA A. HASSANEIN


Example 1 . Cntd.
In the previous example , compute 𝑃 𝑋 < 2, 𝑌 ≥ 1
𝑃 𝑋 < 2, 𝑌 ≥ 1 = 𝑓 0, 1 + 𝑓 1,1 + 𝑓 0, 2 + 𝑓 1,2 =
44
120

Y/X 0 1 2 3 𝑓𝑌 𝑦

0 1/120 15/120 30/120 10/120 56/120


1 6/120 30/120 20/120 0 56/120
2 3/120 5/120 0 0 8/120
𝑓𝑋 𝑥 10/120 50/120 50/120 10/120 1

Spring 2024 DR. MAHA A. HASSANEIN


Example 1 cntd.
Compute the mean and Variance of X and Y .
The marginal pmfs :
X 0 1 2 3
μ𝑋 = σ𝑥 𝑥𝑓(𝑥) = 1.5 𝑓𝑋 (𝑥) 10/120 50/120 50/120 10/120
𝐸 𝑋 2 = σ𝑥 𝑥 2 𝑓𝑋 𝑥 = 2.83
Y 0 1 2
2
𝜎𝑋 = 0.58 𝑓𝑌 (𝑦) 56/120 56/120 8/120
μ𝑌 = σ𝑦 𝑦𝑓(𝑦) = 0.6
𝐸 𝑌 2 = σ𝑥 𝑦 2 𝑓𝑦 𝑦 = 0.73
𝜎𝑌 2 = 0.37

Spring 2024 DR. MAHA A. HASSANEIN


Joint Probability Density Function
If X and Y are two continuous Random variables, we refer to 𝑓 𝑥, 𝑦 as
the joint probability density of X and Y satisfies the following :

𝑓 𝑥, 𝑦 ≥ 0
and
∞ ∞
‫׬‬−∞ ‫׬‬−∞ 𝑓 𝑥, 𝑦 𝑑𝑥𝑑𝑦 = 1

For any region R in the xy-plane

𝑃 𝑋, 𝑌 ∈ 𝑅 = න න 𝑓 𝑥, 𝑦 𝑑𝑥𝑑𝑦
𝑅
Spring 2024 DR. MAHA A. HASSANEIN
Joint Cumulative Distribution
function
The joint cumulative distribution function of two random
variables X and Y are

𝐹 𝑎, 𝑏 = 𝑃 𝑋 ≤ 𝑎, 𝑌 ≤ 𝑏

In case X and Y are defined on rectangular domains, we


have
𝑏 𝑎

𝐹 𝑎, 𝑏 = න න 𝑓 𝑥, 𝑦 𝑑𝑥𝑑𝑦
−∞ −∞

Spring 2024 DR. MAHA A. HASSANEIN


Marginal Density Functions
The marginal density function of the random variable X and
Y are given by


𝑓𝑋 𝑥 = න 𝑓 𝑥, 𝑦 𝑑𝑦
−∞
and

𝑓𝑌 𝑦 = න 𝑓 𝑥, 𝑦 𝑑𝑥
−∞
Note: Integrating the joint function for y we obtain 𝑓𝑋 𝑥
and Integrating the joint function for x we obtain 𝑓𝑌 𝑦

Spring 2024 DR. MAHA A. HASSANEIN


Mean and Variance from joint
density function
If X and Y are CRVs with marginal probability density
function𝑓𝑋 𝑥 and 𝑓𝑌 𝑦
then

μ𝑋 = 𝐸 𝑋 = ‫׬‬−∞ 𝑥𝑓𝑋 𝑥 𝑑𝑥 and 𝜎𝑋 2 = 𝐸 𝑋 2 − μ𝑋 2


μ𝑌 = 𝐸 𝑌 = ‫׬‬−∞ 𝑦𝑓𝑌 𝑦 𝑑𝑦 and 𝜎𝑌 2 = 𝐸 𝑌 2 − μ𝑌 2

Spring 2024 DR. MAHA A. HASSANEIN


Example 3 cntd.
d) Check whether the two random variables X and Y are
independent in
𝑓 𝑥, 𝑦 = 6𝑒 −2𝑥−3𝑦 , 0 < 𝑥 < ∞, 0 < 𝑦 < ∞

𝑓𝑋 𝑥 = 2𝑒 −2𝑥 and 𝑓𝑌 𝑦 = 3𝑒 −3𝑦 ,

𝑓 𝑥, 𝑦 = 𝑓𝑋 𝑥 𝑓𝑌 𝑦 for all x and y

Thus , X and Y are independent

Spring 2024 DR. MAHA A. HASSANEIN


Example 2
In a production line , let X and Y be two random variables of
the proportion of material in a product with joint prob.
density function
2
𝑓 𝑥, 𝑦 = ቐ5 2𝑥 + 3𝑦 , 0 < 𝑥 < 1, 0 < 𝑦 < 1
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒

a) Verify it is a density function


1 1 1
b) Find the 𝑃 0 < 𝑋 < , < 𝑌 < {Ans.
13
}
2 4 2 160

Spring 2024 DR. MAHA A. HASSANEIN


Example 3
a)Find the cumulative distribution function of the two
random variables X and Y whose joint density function is
given by

6𝑒 −2𝑥−3𝑦 𝑓𝑜𝑟 𝑥 > 0, 𝑦 > 0


𝑓 𝑥, 𝑦 = ቊ
0 𝑒𝑙𝑠𝑒𝑤ℎ𝑒𝑟𝑒

b) Hence, use it to find the probability that both random


variables will take values less than one
Ans. 𝐹 𝑥, 𝑦 = 1 − 𝑒 −2𝑥 1 − 𝑒 −2𝑦 , 𝑥 > 0, 𝑦 > 0 & 𝐹 1,1 = 0.8216

Spring 2024 DR. MAHA A. HASSANEIN


Conditional Probability
Distribution
Recall : Conditional Probability of event A when B occured, is
given by
𝑃 𝐴∩𝐵
𝑃 𝐴𝐵 =
𝑃 𝐵
The conditional probability distribution of X given that 𝑌 = 𝑦
is defined as
𝑓(𝑥, 𝑦)
𝑓𝑋 𝑥|𝑦 =
𝑓𝑌 𝑦
for all x provided 𝑓𝑌 𝑦 ≠ 0.

Spring 2024 DR. MAHA A. HASSANEIN


Exercise 1
Given the probability density function of the two RVs X and Y by
𝑥
𝑓 𝑥, 𝑦 = 𝑘 , 0 < 𝑦 < < 1
2
Answer the following :
a) Find k

b) Find the marginal densities𝑓𝑋 𝑥 𝑎𝑛𝑑 𝑓𝑌 𝑦


c) Find the conditional probability distribution of Y given X=1/2.
1
Hence, find the probability 𝑃 0.1 ≤ 𝑌 ≤ 0.7 𝑋 = )
2

Spring 2024 DR. MAHA A. HASSANEIN


Independent Random
Variables
Two RVs X and Y are said to be independent if and only if
𝑓 𝑥, 𝑦 = 𝑓𝑋 𝑥 𝑓𝑌 𝑦 for all x and y

A random sample consists of n independent random


variables 𝑋1 , 𝑋2 , … , 𝑋𝑛 from pdf 𝑓(𝑥)

𝑓 𝑥1 , 𝑥2 , … , 𝑥𝑛 = ෑ 𝑓(𝑥𝑖 )
𝑖=1

Spring 2024 DR. MAHA A. HASSANEIN


Example 1 cntd.
The joint probability of X and Y given in table.
Check whether X and Y are independent R.V.s or not ?
1
𝑠𝑖𝑛𝑐𝑒 𝑓𝑋𝑌 0,0 =
120 Y/X 0 1 2 3 𝑓𝑌 𝑦
10 56
𝑓𝑋 0 𝑓𝑌 0 = . 0
120 120 1/120 15/120 30/120 10/120 56/120
𝑓𝑋𝑌 0,0 ≠ 𝑓𝑋 0 𝑓𝑌 0 1 6/120 30/120 20/120 0 56/120
for at least one value 2 3/120 5/120 0 0 8/120
X and Y are dependent 𝑓𝑋 𝑥 10/120 50/120 50/120 10/120 1

Spring 2024 DR. MAHA A. HASSANEIN


Exercise 2
Let X and Y be two CRVs with joint probability density
function
𝑓 𝑥, 𝑦 = 𝑐𝑥𝑦 , 0 < 𝑥 < 𝑦 < 1,
a) Find c
b) Marginal density functions
c) P(X<1/4 , Y>1/2 )
d) Mean and variance
e) Is X and Y independent or not ? Why?
ANS. c=8 ,

Spring 2024 DR. MAHA A. HASSANEIN


Spring 2024 DR. MAHA A. HASSANEIN
Spring 2024 DR. MAHA A. HASSANEIN
Spring 2024 DR. MAHA A. HASSANEIN
Spring 2024 DR. MAHA A. HASSANEIN
Covariance of X and Y
Measures the direction of the linear relationship between two
features X and Y .

Covariance of X and Y is defined by

COV X, Y = 𝐸 𝑋 − 𝜇𝑋 𝑌 − 𝜇𝑌
or simply
𝜎𝑋𝑌 = 𝐸 𝑋𝑌 − 𝜇𝑋 𝜇𝑌

Spring 2024 DR. MAHA A. HASSANEIN


Covariance of X and Y
COV X, Y = 𝐸 𝑋𝑌 − 𝜇𝑋 𝜇𝑌
where
𝐸 𝑋𝑌 = σ𝑥 σ𝑦 𝑥𝑦𝑓 𝑥, 𝑦 for DRV

∞ ∞
𝐸 𝑋𝑌 = ‫׬‬−∞ ‫׬‬−∞ 𝑥𝑦 𝑓 𝑥, 𝑦 𝑑𝑥𝑑𝑦 for CRV

Spring 2024 DR. MAHA A. HASSANEIN


Correlation Coefficient 𝜌𝑋𝑌
Measure the strength of the linear relationship between
two features X and Y
𝐶𝑜𝑣 𝑋, 𝑌 𝜎𝑋𝑌
𝜌𝑋𝑌 = =
𝑉𝑎𝑟(𝑋) 𝑉𝑎𝑟(𝑌) 𝜎𝑋 𝜎𝑌

−1 ≤ 𝜌𝑋𝑌 ≤ 1
𝜎𝑋 ,𝜎𝑌 are the standard deviations
➢It scales the covariance by the standard deviation
No units ( dimensionless)

Spring 2024 DR. MAHA A. HASSANEIN


Spring 2024 DR. MAHA A. HASSANEIN
Spring 2024 DR. MAHA A. HASSANEIN
Independent Random Variables
For independent RVs X and Y where 𝑓 𝑥, 𝑦 = 𝑓𝑋 (𝑥)𝑓𝑌 (𝑦)
The
𝐶𝑂𝑉 𝑋, 𝑌 = 𝐸 𝑋 − 𝜇𝑋 𝑌 − 𝜇𝑌 = 0
or
𝜎𝑋𝑌 = 0

Spring 2024 DR. MAHA A. HASSANEIN


Properties
If X and Y are any random variables then

𝐸 𝑎𝑋 + 𝑏𝑌 = 𝑎𝐸 𝑋 + 𝑏𝐸 𝑌
Prove.
A random sample consists of n random variables 𝑋𝑖 with
mean 𝜇𝑖
𝑛

𝐸 𝑎1 𝑥1 + 𝑎2 𝑥2 + ⋯ + 𝑎𝑛 𝑥𝑛 = ෍ 𝑎𝑖 𝜇𝑖
𝑖=1
Note: This result holds if the two random variables are not
independent
Spring 2024 DR. MAHA A. HASSANEIN
Variance of Linear combination of
two random variables
If X and Y are any two RVs

𝑉𝑎𝑟 𝑎𝑋 + 𝑏𝑌 = 𝑎2 𝑉𝑎𝑟 𝑋 + 𝑏 2 𝑉𝑎𝑟 𝑌 + 2𝑎𝑏𝐶𝑂𝑉(𝑋, 𝑌)

If X and Y are independent so

𝑉𝑎𝑟 𝑎𝑋 + 𝑏𝑌 = 𝑎2 𝑉𝑎𝑟 𝑋 + 𝑏 2 𝑉𝑎𝑟 𝑌

Proof. On Board

Spring 2024 DR. MAHA A. HASSANEIN


Example 4
Find the Variances of X-Y and X+Y when X and Y are
independent
Let X have mean 𝜇𝑋 and variance 𝜎𝑋 and let Y have mean 𝜇𝑌
and variance 𝜎𝑌
a) 𝑋 − 𝑌 b) 𝑋 + 𝑌

Spring 2024 DR. MAHA A. HASSANEIN


Example 5
If X has mean 4 and variance 9 while Y has mean -2 and
variance 5 , and the two are independent , find
a) 𝐸 2𝑋 + 𝑌 − 5
b) 𝑉𝑎𝑟 2𝑋 + 𝑌 − 5

Spring 2024 DR. MAHA A. HASSANEIN


Example 6
A random sample consists of n independent random
variables 𝑋1 , 𝑋2 , … , 𝑋𝑛 all have same mean 𝜇 and
variance 𝜎 2 .
Find
a) The sample mean , denoted by 𝑋ത
b) Mean of 𝑋ത ;
c) Variance of 𝑋ത

Note : for 𝑖 = 1,2, … , 𝑘. The sample mean is the usual average of n


𝑋 +𝑋 +⋯+𝑋𝑘
numbers𝑋ത = 1 2 has
𝑛

Spring 2024 DR. MAHA A. HASSANEIN


Example 4
Given the joint distribution of two RVs X and Y in table

y\x 1 2 3 𝑓𝑌 (𝑦)
1 0.1 0 0.2 0.3
2 0.2 0 0.1 0.3
3 0 0.1 0.3 0.4
𝑓𝑋 (𝑥) 0.3 0.1 0.6 1

Compute :𝐸 𝑋𝑌 , 𝜎𝑋𝑌 , 𝜌𝑋𝑌


0.17
Ans : 𝐸 𝑋𝑌 = 5 , 𝜎𝑋𝑌 = 0.17 ; 𝜌𝑋𝑌 = = 0.23
0.81 0.69

Spring 2024 DR. MAHA A. HASSANEIN


Example 5
If X and Y are two continuous random variables with joint
density function
2
𝑓 𝑥, 𝑦 = 𝑥 + 2𝑦 , 0 < 𝑥, 𝑦 < 1
3
Compute 𝐸 𝑋𝑌 , 𝜎𝑋𝑌 𝑎𝑛𝑑 𝜌𝑋𝑌

1
Ans.𝐸 𝑋𝑌 = , 𝜎 = -0.006, 𝜌𝑋𝑌 = −0.08
3 𝑋𝑌

Spring 2024 DR. MAHA A. HASSANEIN


Example 6
𝑓 𝑥, 𝑦 = 𝑘𝑦, 0 < 𝑦 < 2𝑥 < 1
1.0

Find k
Compute 𝜌𝑋𝑌

k=12
0.5

Spring 2024 DR. MAHA A. HASSANEIN


Sum of Independent Normal
R.V.s
Two normal R.V.s : X have mean 𝜇𝑋 and variance 𝜎𝑋 and Y have
mean 𝜇𝑌 and variance 𝜎𝑌 , the sum
Z= 𝑋+𝑌
Is a normal random variable that has mean
𝜇𝑋 + 𝜇𝑌
And variance
𝜎𝑋2 + 𝜎𝑌2
In general , the sum of n independent
2
normal random variables all
have same mean 𝜇 and variance 𝜎
Z = 𝑋1 + 𝑋2 + … + 𝑋𝑛
Is a normal R.V. with mean n𝜇 and Variance 𝑛𝜎 2
Proof. Using convolution theorem or moment generating function.

Spring 2024 DR. MAHA A. HASSANEIN


Example
An engineer analyzes the maximum number of people who
can occupy a lift. He estimates that the weight of a
randomly chosen person has normal distribution with mean
75 kg and a standard deviation 6.75 kg. the maximum load
for the lift is 600 kg.
a. Find the probability that the weight of 8 persons will
exceed the maximum load.
b. How many people would have a total weight that
exceeds the maximum load in 1% of the cases or less?

Spring 2024 DR. MAHA A. HASSANEIN


Text book

Chapter 5 . Section 5.10

References

Spring 2024 DR. MAHA A. HASSANEIN

You might also like