JU Math Dept Introduction to Probability Theory Chapter - 5
Chapter - 5
5. Two - Dimensional Random Variables
5.1. Basic Concepts
Often, a single random variable cannot adequately provide all of the information needed about the
outcome of an experiment. For example, tomorrow’s weather is really best described by an array of
random variables that includes wind speed, wind direction, atmospheric pressure, relative humidity and
temperature. It would not be either easy or desirable to attempt to combine all of this information into a
single measurement. We would like to extend the notion of a random variable to deal with an experiment
that result in several observations each time the experiment is run. For example, let T be a random
variable representing tomorrow’s maximum temperature and let R be a random variable representing
tomorrow’s total rainfall. It would be reasonable to ask for the probability that tomorrow’s temperature is
greater than 40 degree centigrade and tomorrow’s total rainfall is less than 0.1 inch. In other words, we
wish to determine the probability of the event
𝐴 = {𝑇 > 40; 𝑅 < 0.1}
Another question that we might like to have answered is, “What is the probability that the temperature
will be greater than 400𝐶 regardless of the rainfall?” To answer this question, we would need to compute
the probability of the event
𝐵 = {𝑇 > 40}.
5.2 Joint distributions for discrete and continuous random variables
Definition: Let 𝑋 and 𝑌 be two random variables defined on the sample space 𝑆, then the function
(𝑋, 𝑌) that assigns a point in (𝑅2 = 𝑅 𝑥 𝑅), is called a two-dimensional random variable.
Let (𝑋, 𝑌) be a two-dimensional random variable, defined on the sample space S and 𝑠 ∈ 𝑆.
The value of (𝑋, 𝑌) at 𝑠 is given by the pair of real numbers {X(𝑠),Y(𝑠)}.
The notation {X≤ 𝑎, 𝑌 ≤ 𝑏} denotes the event of all elements 𝑠 ∈ 𝑆, such that X(𝑠)≤ 𝑎 and Y(𝑠)≤ 𝑏.
The probability of the event {X≤ 𝑎, 𝑌 ≤ 𝑏} will be denoted by 𝑃(𝑋 ≤ 𝑎, 𝑌 ≤ 𝑏).
Let 𝐴 = {𝑎 < 𝑋 ≤ 𝑏}, 𝐵 = {𝑐 < 𝑌 ≤ 𝑑 }, be two events.
Then the event {𝑎 < 𝑋 ≤ 𝑏, 𝑐 < 𝑌 ≤ 𝑑 } = {𝑎 < 𝑋 ≤ 𝑏} ∩ {𝑐 < 𝑌 ≤ 𝑑 } = 𝐴 ∩ 𝐵.
∴ 𝑃 {𝑎 < 𝑋 ≤ 𝑏, 𝑐 < 𝑌 ≤ 𝑑 } = 𝑃(𝐴 ∩ 𝐵).
Lecture Notes By: Reta H. Page 1
JU Math Dept Introduction to Probability Theory Chapter - 5
Notation:
✓ The joint probability function of a random variable 𝑋 𝒂𝒏𝒅 𝑌 takes on a value (𝑥𝑖 , 𝑦𝑗 ) is:
𝑃𝑋𝑌 (𝑥𝑖 , 𝑦𝑗 ) = 𝑃(𝑥𝑖 , 𝑦𝑗 ) = 𝑃(𝑋 = 𝑥𝑖 , 𝑌 = 𝑦𝑗 ) = 𝑃(𝑋 = 𝑥𝑖 ∩ 𝑌 = 𝑦𝑗 ) 𝑓𝑜𝑟 𝑑𝑖𝑠𝑐𝑟𝑒𝑡𝑒 𝑟. 𝑣
✓ 𝑎𝑛𝑑 𝑓𝑋𝑌 (𝑥, 𝑦) = 𝑓(𝑥, 𝑦) 𝑓𝑜𝑟 𝑐𝑜𝑛𝑡𝑖𝑛𝑜𝑢𝑠 𝑟. 𝑣.
5.2.1 Joint Probability Mass Function (Joint pmf)
Definition: If (𝑋, 𝑌) is a two-dimentional discrete random variable, then the joint probability
mass function (pmf) of (𝑋, 𝑌) is defined as:
𝑃𝑋𝑌 (𝑥𝑖 , 𝑦𝑗 ) = 𝑃(𝑥𝑖 , 𝑦𝑗 ) = 𝑃(𝑋 = 𝑥𝑖 , 𝑌 = 𝑦𝑗 ) = 𝑃(𝑋 = 𝑥𝑖 ∩ 𝑌 = 𝑦𝑗 ) for a value of (𝑥𝑖 , 𝑦𝑗 ) 𝑜𝑓 (X, Y).
and satisfying the following two conditions:
1). 0 ≤ 𝑃(𝑥𝑖 , 𝑦𝑗 ) ≤ 1 𝑓𝑜𝑟 𝑎𝑙𝑙 (𝑥, 𝑦) 2). ∑∞𝑖=1 ∑∞𝑗=1 𝑃(𝑥𝑖 , 𝑦𝑗 ) = 1.
Remarks: For any region A in the xy plane, 𝑃[(𝑋, 𝑌) ∈ 𝐴] = ∑ 𝐴 ∑ 𝑃(𝑥𝑖 , 𝑦𝑗 ).
✓ 𝑃(𝑥𝑖 , 𝑦𝑗 ) represents the probability distribution for the simultaneous occurrence of (X,
Y) in any pair of (𝑥𝑖 , 𝑦𝑗 ) within the range of random variables X and Y.
Example 1: X avier and Y vette are two real estate agents. Let X and Y denote the number of
houses that X avier and Y vette will sell next week, respectively. Suppose that there are only four
houses for sale next week. The joint probability mass function 𝑃(𝑥𝑖 , 𝑦𝑗 ) is given by:
Y X 0 1 2
0 .12 .42 .06
1 .21 .06 .03
2 .07 .02 .01
Find: 𝑎). 𝑃(𝑋 ≤ 1, 𝑌 = 2) 𝑏). 𝑃(𝑋 = 1) 𝑐). 𝑃(𝑌 = 2) 𝑑). 𝑃(𝑌 ≥ 1) 𝑒). 𝑃(𝑋 ≥ 1, 𝑌 ≥ 1).
Solution: 𝑎). 𝑃(𝑋 ≤ 1, 𝑌 = 2) = 𝑃(𝑋 = 0, 𝑌 = 2) + 𝑃(𝑋 = 1, 𝑌 = 2) = 0.07 + 0.02 = 0.09.
𝑏). 𝑃(𝑋 = 1) = 𝑃(𝑋 = 1, 𝑌 = 0) + 𝑃(𝑋 = 1, 𝑌 = 1) + 𝑃 (𝑋 = 1, 𝑌 = 2) = 0.42 + 0.06 + 0.02 = 0.5.
𝑐). 𝑃(𝑌 = 2) = 𝑃(𝑋 = 0, 𝑌 = 2) + 𝑃(𝑋 = 1, 𝑌 = 2) + 𝑃 (𝑋 = 2, 𝑌 = 2) = 0.07 + 0.02 + 0.01 = 0.1.
𝑑). 𝑃(𝑌 ≥ 1) = 𝑃(𝑌 = 1) + 𝑃(𝑌 = 2)
= {𝑃(𝑋 = 0, 𝑌 = 1) + 𝑃(𝑋 = 1, 𝑌 = 1) + 𝑃 (𝑋 = 2, 𝑌 = 1)} + 𝑃(𝑌 = 2)
= {0.21 + 0.06 + 0.03} + 0.1 = 0.3 + 0.1 = 0.4.
𝑒). 𝑃(𝑋 ≥ 1, 𝑌 ≥ 1) = 𝑃 (𝑋 = 1, 𝑌 ≥ 1) + 𝑃(𝑋 = 2, 𝑌 ≥ 1) = {0.06 + 0.02} + {0.03 + 0.01} = 0.12.
Exercise: Let the joint 𝑝𝑚𝑓 𝑜𝑓 𝑋 𝑎𝑛𝑑 𝑌 is give by:
𝑝(𝑥, 𝑦) = 𝑘 (𝑥 2 + 𝑦 2 ) ; 𝑖𝑓 (𝑥, 𝑦) = (1,1), (1,2), (2,3), (3,3).
(a) Find the value of the constant 𝑘.
(b) Calculate 𝑃(𝑋 > 𝑌); 𝑃(𝑋 + 𝑌 ≤ 4); 𝑎𝑛𝑑 𝑃(𝑌 ≥ 𝑋).
Ans: 𝑎). 𝑘 = 1/38. 𝑏). 𝑃 (𝑋 > 𝑌) = 0; 𝑃 (𝑋 + 𝑌 ≤ 4) = 7/38; 𝑃 (𝑌 ≥ 𝑋) = 1.
Lecture Notes By: Reta H. Page 2
JU Math Dept Introduction to Probability Theory Chapter - 5
5.2.2 Joint Probability Density Function (joint pdf)
Definition: Let 𝑋 𝑎𝑛𝑑 𝑌 be a continuous random variables. The order pair (𝑋, 𝑌) is called a two
dimensional continuous random variable. A function 𝑓𝑋𝑌 (𝑥, 𝑦) = 𝑓(𝑥, 𝑦) is the joint probability
density function (pdf) for (𝑋, 𝑌) if
∞ ∞
1. 𝑓 (𝑥, 𝑦) ≥ 0 𝑓𝑜𝑟 𝑎𝑙𝑙 (𝑥, 𝑦) ; 2. ∫−∞ ∫−∞ 𝑓 (𝑥, 𝑦) 𝑑𝑥 𝑑𝑦 = 1.
.
Remark: For any region A in the xy plane, 𝑃[(𝑋, 𝑌) ∈ 𝐴] = ∫𝐴 ∫ 𝑓(𝑥, 𝑦) 𝑑𝑥 𝑑𝑦.
✓ It is important to draw regions on which integrations are desired, so that the integration
limits can be determined.
Example 1: A candy company distributes boxes of chocolates with a mixture of creams, coffees,
and nuts coated in both light and dark chocolate. For a randomly selected box, let X and Y,
respectively, be the proportions of the light and dark chocolates that are creams and suppose that
the joint density function is given by:
𝑓 (𝑥, 𝑦) = (2/5) (2𝑥 + 3𝑦) ; 0 ≤ 𝑥 ≤ 1 , 0 ≤ 𝑦 ≤ 1.
a. Find 𝑃[(𝑋, 𝑌) ∈ 𝐴], 𝐴 is the region 𝐴 = {(𝑥, 𝑦)|0 < 𝑥 < ½, ¼ < 𝑦 < ½ }.
b. Find 𝑃[(𝑋, 𝑌) ∈ 𝐵], 𝐵 is the region 𝐵 = {(𝑥, 𝑦) | 0 < 𝑥 < 𝑦 < 1 }.
1 1 1
Solution: 𝑎. 𝑃[(𝑋, 𝑌) ∈ 𝐴] = 𝑃 (0 < 𝑋 < 2 , < 𝑌 < 2)
4
1/2 1/2
= ∫1/4 ∫0 (2/5) (2𝑥 + 3𝑦)𝑑𝑥𝑑𝑦 = 13/160.
. 1 1
𝑏. 𝑃[(𝑋, 𝑌) ∈ 𝐵] = ∫𝐵 ∫(2/5) (2𝑥 + 3𝑦)𝑑𝑥𝑑𝑦 = ∫0 [∫𝑥 (2/5) (2𝑥 + 3𝑦)𝑑𝑦] 𝑑𝑥 = 8/15.
. 1 y
Or 𝑃[(𝑋, 𝑌) ∈ 𝐵] = ∫𝐵 ∫(2/5) (2𝑥 + 3𝑦)𝑑𝑥𝑑𝑦 = ∫0 [∫0 (2/5) (2𝑥 + 3𝑦)𝑑𝑥] 𝑑𝑦 = 8/15.
Example 2: The joint pdf of random variables X and Y is given by:
𝑓(𝑥, 𝑦) = 2𝑒 −𝑥 𝑒 −2𝑦 ; 0 < 𝑥 < ∞, 0 < 𝑦 < ∞.
𝐶𝑜𝑚𝑝𝑢𝑡𝑒: (𝑎). 𝑃{𝑋 > 1, 𝑌 < 1} 𝑎𝑛𝑑 (𝑏 ). 𝑃{𝑋 < 𝑌}.
Solution: According to Fig. 1 which shows the area of integration with property of 𝑋 > 1 𝑎𝑛𝑑 𝑌 < 1
(the shaded portion), we have:
1 ∞ 1 ∞
𝑎). 𝑃(𝑋 > 1, 𝑌 < 1) = ∫0 [∫1 2𝑒 −𝑥 𝑒 −2𝑦 𝑑𝑥] 𝑑𝑦 = − 2 ∫0 𝑒 −2𝑦 (𝑒 −𝑥 | ) 𝑑𝑦
1
−1 1 −2𝑦
= 2𝑒 ∫0 𝑒 𝑑𝑦 = 𝑒 −1 (1 − 𝑒 −2 ).
Lecture Notes By: Reta H. Page 3
JU Math Dept Introduction to Probability Theory Chapter - 5
According to Fig. 2 which shows the area of integration with property of x < y (the shaded
portion), we have:
. ∞ y ∞
(𝑏). 𝑃 (𝑋 < 𝑌) = ∬𝑥<𝑦 2𝑒 −𝑥 𝑒 −2𝑦 𝑑𝑥 𝑑𝑦 = ∫0 [∫0 2𝑒 −𝑥 𝑒 −2𝑦 𝑑𝑥] 𝑑𝑦 = ∫0 2𝑒 −2𝑦 (1 − 𝑒 −𝑦 )𝑑𝑦 = 1/3.
. ∞ ∞ ∞
𝑂𝑟 𝑃 (𝑋 < 𝑌) = ∬𝑥<𝑦 2𝑒 −𝑥 𝑒 −2𝑦 𝑑𝑥 𝑑𝑦 = ∫0 [∫𝑥 2𝑒 −𝑥 𝑒 −2𝑦 𝑑𝑦] 𝑑𝑥 = ∫0 𝑒 −3𝑥 𝑑𝑥 = 1/3.
Fig. 1 & 2 Shaded area with property 𝑋 > 1 𝑎𝑛𝑑 𝑌 < 1 for computing 𝑃(𝑋 > 1, 𝑌 < 1)
and with property 𝑋 < 𝑌 for computing 𝑃(𝑋 < 𝑌).
1
X >1 and Y<1
1 x x
Fig 1. Fig 2.
5.3. Marginal and conditional probability distributions (functions)
Let (𝑋, 𝑌) be a discrete two-dimensional 𝑟. 𝑣 which takes up countable number of values (𝑥𝑖 , 𝑦𝑗 ).
✓ Then the marginal probability mass function of X is determined as follows:
𝑃𝑋 (𝑥𝑖 ) = 𝑃(𝑋 = 𝑥𝑖 ) = 𝑃(𝑋 = 𝑥𝑖 , 𝑌 = 𝑦1 ) + 𝑃 (𝑋 = 𝑥𝑖 , 𝑌 = 𝑦1 ) + ⋯ + 𝑃(𝑋 = 𝑥𝑖 , 𝑌 = 𝑦𝑚 )
= ∑𝑚 𝑚
𝑗=1 𝑃(𝑥𝑖 , 𝑦𝑗 ) = ∑𝑗=1 𝑃(𝑋 = 𝑥𝑖 , 𝑌 = 𝑦𝑗 ).
✓ Similarly, the marginal probability mass function of Y is determined as follows:
𝑃𝑌 (𝑦𝑗 ) = 𝑃(𝑌 = 𝑦𝑗 ) = 𝑃(𝑋 = 𝑥1 , 𝑌 = 𝑦𝑗 ) + 𝑃(𝑋 = 𝑥2 , 𝑌 = 𝑦𝑗 ) + ⋯ + 𝑃(𝑋 = 𝑥𝑛 , 𝑌 = 𝑦𝑗 )
= ∑𝑛𝑖=1 𝑃(𝑥𝑖 , 𝑦𝑗 ) = ∑𝑛𝑖=1 𝑃(𝑋 = 𝑥𝑖 , 𝑌 = 𝑦𝑗 ).
✓ The marginal probability density function of X and Y for continuous case are given
respectively as follows:
∞ ∞
𝑓𝑋 (𝑥 ) = 𝑓(𝑥 ) = ∫−∞ 𝑓(𝑥, 𝑦)𝑑𝑦 𝑎𝑛𝑑 𝑓𝑌 (𝑦) = 𝑓(𝑦) = ∫−∞ 𝑓(𝑥, 𝑦)𝑑𝑥 .
Example 1: Suppose that a pair of random variables, X and Y have the same joint probability
density function given by:
𝑓 (𝑥, 𝑦) = 𝑥 (1 − 𝑦) ; 0 ≤ 𝑥 ≤ 2 , 0 ≤ 𝑦 ≤ 1.
Then find the marginal probability density functions for 𝑋 𝑎𝑛𝑑 𝑌.
1 1
Solution: 𝑓 (𝑥 ) = ∫0 𝑥 (1 − 𝑦)𝑑𝑦 = 𝑥 ((𝑦 − 𝑦 2 /2) | ) = 𝑥/2 ; 0≤𝑥≤2
0
2 2
𝑓 (𝑦) = ∫0 𝑥 (1 − 𝑦)𝑑𝑥 = (1 − 𝑦) ((𝑥 2 /2 | ) = 2(1 − 𝑦) ; 0 ≤ 𝑦 ≤ 1.
0
Lecture Notes By: Reta H. Page 4
JU Math Dept Introduction to Probability Theory Chapter - 5
Example 2: Quality audit records are kept on numbers of major and minor failures of circuit packs
during-in of large electronic switching devices. They indicate that for a device of this type, the random
variables X (the number of major failures) and Y (the number of minor failures) can be described at least
approximately by the accompanying joint distribution.
X Y 0 1 2 3 Total (Marginal pmf of X)
0 0.15 0.1 0.1 0.1 0.45
1 0.05 0.1 0.14 0.13 0.42
2 0.01 0.04 0.04 0.04 0.13
Total(Marginal pmf of Y) 0.21 0.24 0.28 0.27 1
Find the marginal probability mass functions for X and Y.
Solution: 𝑃(𝑋 = 0) = ∑4𝑗=1 𝑃(𝑋 = 0, 𝑌 = 𝑦𝑗 ) = 𝑃 (𝑋 = 0 ; 𝑌 = 0) + 𝑃(𝑋 = 0 ; 𝑌 = 1) +
𝑃(𝑋 = 0 ; 𝑌 = 2) + 𝑃 (𝑋 = 0 ; 𝑌 = 3) = 0.45.
Similarly; 𝑃(𝑋 = 1) = 0.42 ; and 𝑃(𝑋 = 2) = 0.13.
Thus the marginal distribution of X is:
𝑽𝒂𝒍𝒖𝒆𝒔 𝒐𝒇 𝑿, 𝒙 0 1 2
𝑷(𝑿 = 𝒙) 0.45 0.42 0.13
𝑃(𝑌 = 0) = ∑3𝑖=1 𝑃(𝑋 = 𝑥𝑖 , 𝑌 = 0) = 𝑃(𝑋 = 0 ; 𝑌 = 0) + 𝑃 (𝑋 = 1 ; 𝑌 = 0) + 𝑃 (𝑋 = 2 ; 𝑌 = 0) = 0.21.
Similarly; 𝑃(𝑌 = 1) = 0.24 ; 𝑃(𝑌 = 2) = 0.28 ; and 𝑃(𝑌 = 3) = 0.27.
Thus the marginal distribution of Y is:
𝑽𝒂𝒍𝒖𝒆𝒔 𝒐𝒇 𝒀, 𝒚 0 1 2 3
𝑷(𝒀 = 𝒚) 0.21 0.24 0.28 0.27
Exercise 1: A two dimensional r.v. (X,Y) have a joint pmf given by:
𝑥 2 +𝑦
𝑃(𝑋 = 𝑥, 𝑌 = 𝑦) = ; 𝑓𝑜𝑟 𝑥 = 0, 1, 2, 3 𝑎𝑛𝑑 𝑦 = 0, 1.
32
Find the marginal distribution of X and Y.
Ans: The marginal distribution of X is: The marginal distribution of Y is:
𝑽𝒂𝒍𝒖𝒆𝒔 𝒐𝒇 𝑿, 𝒙 0 1 2 3 𝑽𝒂𝒍𝒖𝒆𝒔 𝒐𝒇 𝒀, 𝒚 0 1
𝑷(𝑿 = 𝒙) 1/32 3/32 9/32 19/32 𝑷(𝒀 = 𝒚) 14/32 18/32
Exercise 2: The joint pdf of X and Y is given by 𝑓 (𝑥, 𝑦) = 𝑘𝑥𝑦 2 ; 0 ≤ 𝑥 ≤ 𝑦 ≤ 1.
(a) Find the value of the constant k.
(b) Find the marginal pdfs of X and Y.
(c) Calculate 𝑃(𝑋 + 𝑌 < 1), 𝑃(2𝑋 < 𝑌), 𝑎𝑛𝑑 𝑃(𝑋 = 𝑌).
Solution: Some points to note: Finding the constant k and probabilities are matters of double integration,
✓ It is important to draw regions on which integrations are desired, so that the integration
limits can be easily determined.
Lecture Notes By: Reta H. Page 5
JU Math Dept Introduction to Probability Theory Chapter - 5
1 𝑦 1 𝑥2 𝑦 𝑘 1 k k
𝑎). ∫0 [∫0 𝑘𝑥𝑦 2 𝑑𝑥]𝑑𝑦 = 1 => ∫0 𝑘𝑦 2 ( 2 | ) 𝑑𝑦 = 2 ∫0 𝑦 4 𝑑𝑦 = 10 => = 1 => 𝑘 = 10 .
0 10
1 1
Or ∫0 [∫𝑥 𝑘𝑥𝑦 2 𝑑𝑦]𝑑𝑥 = 1 => 𝑘 = 10
b). The marginal pdfs of 𝑋 𝑎𝑛𝑑 𝑌 are:
∞ 1 10
✓ 𝑓 (𝑥) = ∫−∞ 𝑓(𝑥, 𝑦) 𝑑𝑦 = ∫𝑥 10𝑥𝑦 2 𝑑𝑦 = 3
𝑥 (1 − 𝑥 3 ) ; 0 ≤ 𝑥 ≤ 1.
∞ 𝑦
✓ 𝑓 (𝑦) = ∫−∞ 𝑓(𝑥, 𝑦) 𝑑𝑥 = ∫0 10𝑥𝑦 2 𝑑𝑥 = 5𝑦 4 ; 0 ≤ 𝑦 ≤ 1.
0.5 1−𝑥 10 0.5
c). 𝑃(𝑋 + 𝑌 < 1) = ∫0 ∫𝑥 10𝑥𝑦 2 𝑑𝑦 𝑑𝑥 = 3
∫0 𝑥 [(1 − 𝑥)3 − 𝑥 3 ]𝑑𝑥
10 0.5
= 3
∫0 (𝑥 − 3𝑥 2 + 3𝑥 3 − 2𝑥 4 ]𝑑𝑥 = 0.1146.
0.5 𝑦 1 1−𝑦
Or 𝑃(𝑋 + 𝑌 < 1) = ∫0 ∫0 10𝑥𝑦 2 𝑑𝑥 𝑑𝑦 + ∫0.5 ∫0 10𝑥𝑦 2 𝑑𝑥 𝑑𝑦 = 0.03125 + 0.0833 = 0.11455.
0.5 1 10 0.5
𝑃 (2𝑋 < 𝑌) = ∫0 [∫2𝑥 10𝑥𝑦2 𝑑𝑦 ]𝑑𝑥 = 3
∫0 𝑥 (1 − 8𝑥 3 ) 𝑑𝑥 = 1/4.
𝑦
1
Or 𝑃(2𝑋 < 𝑌) = ∫0 [∫02 10𝑥𝑦2 𝑑𝑥] 𝑑𝑦 = 1/4.
Conditional Probability functions
Definition: Let X and Y be two random variables, discrete or continuous. Then the conditional
probability mass function of 𝑿, 𝑔𝑖𝑣𝑒𝑛 𝑌 = 𝑦, denoted by
𝑃𝑋/𝑌 (𝑥/𝑦) = 𝑃(𝑋 = 𝑥/𝑌 = 𝑦) = 𝑃(𝑥/𝑦) is defined as:
𝑥 𝑃(𝑋=𝑥,𝑌=𝑦)
𝑃 (𝑦 ) = ; provided 𝑃(𝑌 = 𝑦) ≠ 0. and
𝑃(𝑌=𝑦)
The conditional probability mass function of 𝒀, 𝑔𝑖𝑣𝑒𝑛 𝑋 = 𝑋, denoted by
𝑃𝑌/𝑋 (𝑦/𝑥) = 𝑃(𝑌 = 𝑦/𝑋 = 𝑥) = 𝑃(𝑦/𝑥) is defined as:
𝑦 𝑦 𝑃(𝑌=𝑦,𝑋=𝑥)
𝑃 (𝑌 = 𝑋 = 𝑥) = 𝑃 (𝑥 ) = ; provided 𝑃(𝑋 = 𝑥 ) ≠ 0.
𝑃(𝑋=𝑥)
Lecture Notes By: Reta H. Page 6
JU Math Dept Introduction to Probability Theory Chapter - 5
▪ Similarly, the conditional probability density function of 𝑿, 𝑔𝑖𝑣𝑒𝑛 𝑌 = 𝑦, denoted by
𝑓𝑋/𝑌 (𝑥/𝑦) = 𝑓(𝑥/𝑦) is defined as:
𝑥 𝑓(𝑥,𝑦)
𝑓( ) = ; provided 𝑓(𝑥 ) ≠ 0.
𝑦 𝑓(𝑥)
▪ And the conditional probability density function of 𝒀, 𝑔𝑖𝑣𝑒𝑛 𝑋 = 𝑥, denoted by
𝑓𝑌/𝑋 (𝑦/𝑥) = 𝑓(𝑦/𝑥) is defined as:
𝑦 𝑓(𝑥,𝑦)
𝑓 (𝑥 ) = ; provided 𝑓(y) ≠ 0.
𝑓(𝑦)
Example 1 : For the joint 𝑝𝑚𝑓 of two random variables 𝑋 𝑎𝑛𝑑 𝑌 are given below:
X Y 1 2 3 Total
1 3/12 4/12 2/12 9/12
2 1/12 2/12 0 3/12
Total 4/12 6/12 2/12 1
Find the conditional probability mass function of 𝑋 𝑔𝑖𝑣𝑒𝑛 𝑡ℎ𝑒 𝑣𝑎𝑙𝑢𝑒 𝑜𝑓 𝑌 = 1 and that of
𝑌 𝑔𝑖𝑣𝑒𝑛 𝑡ℎ𝑒 𝑣𝑎𝑙𝑢𝑒 𝑜𝑓 𝑋 = 2.
Solution: The conditional probability function of 𝑋 𝑔𝑖𝑣𝑒𝑛 𝑌 is defined as follows:
𝑃(𝑋=𝑥,𝑌=𝑦)
𝑃(𝑋 = 𝑥/𝑌 = 𝑦) = 𝑃(𝑥/𝑦) =
𝑃(𝑌=𝑦)
𝑃(𝑋=1,𝑌=1) 3/12 3
∴ 𝑃(𝑋 = 1/𝑌 = 1) = = =
𝑃(𝑌=1) 4/12 4
𝑃(𝑋=2,𝑌=1) 1/12 1
𝑃(𝑋 = 2/𝑌 = 1) = = =
𝑃(𝑌=1) 4/12 4
Hence the conditional distribution of 𝑋 𝑔𝑖𝑣𝑒𝑛 𝑌 = 1 is: Similarly, the conditional distribution of 𝑌 𝑔𝑖𝑣𝑒𝑛 𝑋 = 2 is:
𝑽𝒂𝒍𝒖𝒆𝒔 𝒐𝒇 𝑿, 𝒙 1 2 𝑽𝒂𝒍𝒖𝒆𝒔 𝒐𝒇 𝒀, 𝒚 1 2 3
𝑷(𝑿 = 𝒙/𝒀 = 𝟏) 3/4 1/4 𝑷(𝒀 = 𝒚/𝑿 = 𝟐) 1/3 2/3 0
Example 2: Let the joint 𝑝𝑑𝑓 𝑜𝑓 𝑋 𝑎𝑛𝑑 𝑌 is given by:
12
𝑓(𝑥, 𝑦) = 𝑥 (2 − 𝑥 − 𝑦 ) ; 0 ≤ 𝑥 ≤ 1 , 0 ≤ 𝑦 ≤ 1.
5
(a) Compute the conditional 𝑝𝑑𝑓 𝑜𝑓 𝑋 𝑔𝑖𝑣𝑒𝑛 𝑌 = 𝑦.
(b) Compute the conditional 𝑝𝑑𝑓 𝑜𝑓 𝑋 𝑔𝑖𝑣𝑒𝑛 𝑌 = 1/2.
(c) Calculate 𝑃(𝑋 > 1/3 | 𝑌 = 1/2).
𝑓(𝑥,𝑦) 𝑓(𝑥,𝑦) 𝑥(2−𝑥−𝑦) 6𝑥(2−𝑥−𝑦)
Solution: 𝑎). 𝑓 (x/y) = = 1 = 1 = ; 0 ≤ 𝑥 ≤ 1 , 0 ≤ 𝑦 ≤ 1.
𝑓(𝑦) ∫0 𝑓(𝑥,𝑦)𝑑𝑥 ∫0 𝑥(2−𝑥−𝑦)𝑑𝑥 4−3y
6𝑥(2−𝑥−1/2) 6𝑥(3−2𝑥)
b). 𝑓(𝑋 = 𝑥/ 𝑌 = 0.5) = = ; 0 ≤ 𝑥 ≤ 1.
4−3/2 5
1 1 12 1 3
1 1 𝑃(𝑋> , 𝑌=0.5) ∫1/3 5 𝑥(2−𝑥−1/2) ∫1/3 𝑥(2−𝑥) 1 6
3
𝑐). 𝑃 (𝑋 > /𝑌 = 2) = = 12 (4−3/2) = = ∫1/3 5 𝑥(3 − 2𝑥)𝑑𝑥 = 0.83.
3 𝑓(𝑌=0.5) 5/12
5 6
Lecture Notes By: Reta H. Page 7
JU Math Dept Introduction to Probability Theory Chapter - 5
5.4 Independent random variables
Two 𝑟. 𝑣. ′𝑠 𝑋 𝑎𝑛𝑑 𝑌 with joint pdf (pmf) 𝑓 (𝑥, 𝑦) and marginal pdf's (pmf's) 𝑓(𝑥 ) 𝑎𝑛𝑑 𝑓(𝑦)
respectively are said to be stochasticaly (statistically) independent if and only if
𝑓(𝑥, 𝑦) = 𝑓(𝑥 ) 𝑓(𝑦).
𝑥𝑦
Example: Let the joint pdf of X and Y is given by 𝑓(𝑥, 𝑦) = 16 ; 1 ≤ 𝑥 ≤ 3 , 1 ≤ 𝑦 ≤ 3.
a) Show that the random variable X and Y are independent.
b) Compute the 𝑃(𝑋 ≥ 𝑌 + 1/2).
3 𝑥𝑦 𝑥 3
Solotion: a) 𝑓 (𝑥 ) = ∫1 𝑑𝑦 = 32 (𝑦 2 | ) = 𝑥/4. ; 1 ≤ 𝑥 ≤ 3.
16 1
3 𝑥𝑦 𝑦 3
𝑓(𝑦) = ∫1 𝑑𝑥 = (𝑥 2 | ) = 𝑦/4. ; 1 ≤ 𝑦 ≤ 3.
16 32 1
𝑆𝑖𝑛𝑐𝑒 𝑓 (𝑥, 𝑦) = 𝑓 (𝑥 ) 𝑓(𝑦) , 𝑋 𝑎𝑛𝑑 𝑌 𝑎𝑟𝑒 𝑖𝑛𝑑𝑒𝑝𝑒𝑛𝑑𝑒𝑛𝑡.
b) To find 𝑃(𝑋 ≥ 𝑌 + 1/2), one needs to integrate 𝑓 (𝑥, 𝑦) on a region defined by the conditions:
1≤𝑥≤3 , 1≤𝑦≤3 𝑎𝑛𝑑 𝑋 ≥ 𝑌 + 1/2.
1 . 𝑥𝑦 3 x−1/2 𝑥𝑦 1 3 𝑥 − 1/2
𝑃 (𝑋 ≥ 𝑌 + ) = ∬𝑥≥𝑦+1/2 𝑑𝑥 𝑑𝑦 = ∫3/2 [∫1 𝑑𝑦] 𝑑𝑥 = ∫3/2
𝑥 (𝑦 2 | ) 𝑑𝑥
2 16 16 32 1
1 3 3
= 32 ∫3/2(𝑥 3 − 𝑥 2 − 4 𝑥)𝑑𝑥 = 0.27.
1 5/2 3 𝑥𝑦
Or 𝑃 (𝑋 ≥ 𝑌 + 2) = ∫1 [∫𝑦+1/2 𝑑𝑥] 𝑑𝑦 = 0.26796 = 0.27.
16
5.5 Distributions of functions of a Random Variable
(Transformation of Two-dimensional Random Variable)
Among the most important functions of 𝑋 𝑎𝑛𝑑 𝑌 which we wish to consider are:
The sum 𝑆 = 𝑋 + 𝑌, the product 𝑈 = 𝑋𝑌, and the quotient 𝑍 = 𝑋/ 𝑌.
If (𝑋, 𝑌) is a continuous two-dimensional random variable and if 𝑈 = 𝑈(𝑋, 𝑌) is a continuous function
of (𝑋, 𝑌), then 𝑈 will be a continuous (one-dimensional) random variable and the problem of finding
its 𝑝𝑑𝑓 is somewhat more involved. In order to solve this problem we shall need a theorem which we
state and discuss below. Before doing this, let us briefly outline the basic idea.
Lecture Notes By: Reta H. Page 8
JU Math Dept Introduction to Probability Theory Chapter - 5
In finding the 𝑝𝑑𝑓 𝑜𝑓 𝑈 = 𝑈(𝑋, 𝑌) it is often simplest to introduce a second random variable,
say 𝑉 = 𝑉(𝑋, 𝑌) and first obtain the joint 𝑝𝑑𝑓 𝑜𝑓 𝑈 𝑎𝑛𝑑 𝑉, 𝑠𝑎𝑦 𝑓𝑈𝑉 (𝑢, 𝑣) = 𝑓(𝑢, 𝑣). From a
knowledge of 𝑓(𝑢, 𝑣) we can then obtain the desired 𝑝𝑑𝑓 𝑜𝑓 𝑈, 𝑠𝑎𝑦 𝑓𝑈 (𝑢) = 𝑓(𝑢), by simply
integrating 𝑓(𝑢, 𝑣) with respect to 𝑣. That is,
∞
𝑓𝑈 (𝑢) = 𝑓(𝑢) = ∫−∞ 𝑓(𝑢, 𝑣) 𝑑𝑣
The remaining problems are (1) how to find the joint 𝑝𝑑𝑓 𝑜𝑓 𝑈 𝑎𝑛𝑑 𝑉, and (2) how to choose the
appropriate random variable 𝑉 = 𝑉(𝑋, 𝑌). To resolve the latter problem, let us simply state that
we usually make the simplest possible choice for 𝑉. In the present context, 𝑉 plays only an
intermediate role, and we are not really interested in it for its own sake. In order to find the joint
𝑝𝑑𝑓 𝑜𝑓 𝑈 𝑎𝑛𝑑 𝑉 we need the following Theorem.
Theorem : Suppose that (𝑋, 𝑌) is a two-dimensional continuous random variable with joint
𝑝𝑑𝑓 𝑓(𝑥, 𝑦) . Let 𝑈 = 𝑈(𝑋, 𝑌) 𝑎𝑛𝑑 𝑉 = 𝑉 (𝑋, 𝑌), and assume that the functions
𝑈(𝑋, 𝑌) 𝑎𝑛𝑑 𝑉(𝑋, 𝑌) satisfy the following conditions:
a) The equations 𝑢 = 𝑢(𝑥, 𝑦) 𝑎𝑛𝑑 𝑣 = 𝑣 (𝑥, 𝑦) may be uniquely solved for 𝑥 𝑎𝑛𝑑 𝑦 in
terms of 𝑢 𝑎𝑛𝑑 𝑣, say 𝑥 = 𝑥(𝑢, 𝑣) and 𝑦 = 𝑦(𝑢, 𝑣).
b) The partial derivatives 𝜕𝑥⁄𝜕𝑢 , 𝜕𝑥⁄𝜕𝑣 , 𝜕𝑦⁄𝜕𝑢 , 𝑎𝑛𝑑 𝜕𝑦⁄𝜕𝑣 exist and are continuous.
Then the joint 𝑝𝑑𝑓 𝑜𝑓 (𝑈, 𝑉 ), 𝑠𝑎𝑦 𝑓(𝑢, 𝑣), is given by the following expression:
𝑓𝑈𝑉 (𝑢, 𝑣) = 𝑓 (𝑢, 𝑣) = 𝑓𝑋𝑌 (𝑥(𝑢, 𝑣), 𝑦(𝑢, 𝑣)) |𝐽|.
𝑂𝑟 𝑓𝑈𝑉 (𝑢, 𝑣) = 𝑓(𝑢, 𝑣) = 𝑓𝑋𝑌 (𝑥, 𝑦) |𝐽|.
Where 𝑥 𝑎𝑛𝑑 𝑦 is expressed in terms of 𝑢 𝑎𝑛𝑑 𝑣.
Where 𝐽 = 𝐽(𝑢, 𝑣) is the following 2 𝑥 2 determinant:
𝜕𝑥 𝜕𝑦 𝜕𝑥 𝜕𝑥 𝜕𝑢 𝜕𝑣 𝜕𝑢 𝜕𝑢
𝜕(𝑥,𝑦) 1 𝜕(𝑢,𝑣) 𝜕𝑥 𝜕𝑥 𝜕𝑥 𝜕𝑦
𝐽 = 𝜕(𝑢,𝑣) = |𝜕𝑢
𝜕𝑥
𝜕𝑢
𝜕𝑦
| = |𝜕𝑢
𝜕𝑦
𝜕𝑣
𝜕𝑦
|. NOTE: = 𝜕(𝑥,𝑦) = |𝜕𝑢 𝜕𝑣 | = |𝜕𝑣 𝜕𝑣
|.
𝐽
𝜕𝑣 𝜕𝑣 𝜕𝑢 𝜕𝑣 𝜕𝑦 𝜕𝑦 𝜕𝑥 𝜕𝑦
This determinant is called the Jacobian of the transformation (𝑥, 𝑦) → (𝑢, 𝑣).
1
Example: Given the joint density function of 𝑋 𝑎𝑛𝑑 𝑌 as 𝑓(𝑥, 𝑦) = 2 𝑥 𝑒 −𝑦 ; 0 ≤ 𝑥 ≤ 2 , 𝑦 > 0.
Find the distribution (𝑝𝑑𝑓) of 𝑈 = 𝑋 + 𝑌.
Solution: Let us make the transformation : 𝑢 = 𝑥 + 𝑦 𝑎𝑛𝑑 𝑣 = 𝑦 => 𝑥 = 𝑢 − 𝑣 , 𝑦 = 𝑣.
𝜕𝑥 𝜕𝑦 𝜕𝑥 𝜕𝑥
𝜕(𝑥,𝑦) 1 0 1 −1
The Jacobian of transformation : 𝐽 = 𝜕(𝑢,𝑣) = |𝜕𝑢
𝜕𝑥
𝜕𝑢
𝜕𝑦
| = |𝜕𝑢
𝜕𝑦
𝜕𝑣
𝜕𝑦
| =| |=| | = 1.
−1 1 0 1
𝜕𝑣 𝜕𝑣 𝜕𝑢 𝜕𝑣
Lecture Notes By: Reta H. Page 9
JU Math Dept Introduction to Probability Theory Chapter - 5
and the region 0 < 𝑥 < 2 and 𝑦 > 0 transforms to 0 < 𝑢 − 𝑣 < 2 and 𝑣 > 0 as shown in the adjoining figure.
The joint density function of 𝑈 𝑎𝑛𝑑 𝑉 is given by
1
𝑓(𝑢, 𝑣) = 2 (𝑢 − 𝑣) 𝑒 −𝑣 ; 0 < 𝑣 < 𝑢, 𝑢 > 0.
To find the density of 𝑈 = 𝑋 + 𝑌, we 𝑠𝑝𝑙𝑖𝑡 𝑡ℎ𝑒 𝑟𝑎𝑛𝑔𝑒 𝑜𝑓 𝑈 into two parts,
(𝑖 ). 0 < 𝑢 < 2 (𝑟𝑒𝑔𝑖𝑜𝑛 𝐼 ), 𝑎𝑛𝑑 (𝑖𝑖 ). 𝑢 > 2 (𝑟𝑒𝑔𝑖𝑜𝑛 𝐼𝐼) (which is suggested by the diagram).
✓ 𝐹𝑜𝑟 0 < 𝑢 < 2, (𝑅𝑒𝑔𝑖𝑜𝑛 𝐼) ∶
𝑢 1 𝑢 1
𝑓 (𝑢) = ∫0 𝑓 (𝑢, 𝑣) 𝑑𝑣 = 2 ∫0 (𝑢 − 𝑣) 𝑒 −𝑣 𝑑𝑣 = 2 [(−𝑒 −𝑣 (𝑢 − 𝑣) + 𝑒 −𝑣 )| 𝑣=𝑢
𝑣=0
] (Integration by parts)
1
= (𝑒 −𝑢 + 𝑢 − 1).
2
✓ 𝐹𝑜𝑟 2 < 𝑢 < ∞, (𝑅𝑒𝑔𝑖𝑜𝑛 𝐼𝐼) ∶
𝑢 1 𝑢 1 𝑣=𝑢
𝑓(𝑢) = ∫𝑢−2 𝑓 (𝑢, 𝑣) 𝑑𝑣 = 2 ∫𝑢−2(𝑢 − 𝑣) 𝑒 −𝑣 𝑑𝑣 = 2 [(−𝑒 −𝑣 (𝑢 − 𝑣) + 𝑒 −𝑣 )| 𝑣=𝑢−2
1
= 2 𝑒 −𝑢 (1 + 𝑒 2 ).
1
(𝑒 −𝑢 + 𝑢 − 1) ; 0 < 𝑢 ≤ 2.
2
Hence: 𝑓 (𝑢 ) = { 1
𝑒 −𝑢 (1 + 𝑒 2 ) ; 2 < 𝑢 ≤ ∞.
2
Exercise 1: Let (𝑋, 𝑌) be a two-dimensional non-negative continuous r. v. having the joint density :
2+𝑦 2)
𝑓 (𝑥, 𝑦) = 4𝑥𝑦 𝑒 −(𝑥 ; 𝑥≥0 , 𝑦 ≥ 0.
2
Prove that the density function of 𝑈 = √𝑋 2 + 𝑌 2 𝑖𝑠: 𝑓(𝑢) = 2𝑢3 𝑒 −𝑢 ; 0 ≤ 𝑢 < ∞.
Exercise 2: Let the probability density function of the random variable (𝑋, 𝑌) be:
1
𝑓(𝑥, 𝑦) = 2 𝑒 −(𝑥+𝑦)/2 ; 𝑥 ≥ 0 , 𝑦 ≥ 0.
1
Then find the distribution (𝑝𝑑𝑓) of 𝑈 = 2 (𝑋 − 𝑌).
1
𝑒𝑢 ; 𝑢 < 0.
2
Ans: 𝑓 (𝑢 ) = { 1 −𝑢
𝑒 ; 𝑢 ≥ 0.
2
1
Or 𝑓 (𝑢 ) = 𝑒 −|𝑢| ; −∞ < 𝑢 < ∞.
2
Lecture Notes By: Reta H. Page 10