Statistics
Chapter 05 – Joint Probability Distribution
Joint PMF Discrete
2
Joint PDF Continuous
3
𝑋 time of connection
Joint PDF 𝑌 time of authorization
Let the RV 𝑋 “denote the time until a computer server connects to
your machine” (in msec) and let 𝑌 “denote the time until the server
authorizes you as a valid user” (in msec). Each of these RVs measures
the wait from a common starting time and 𝑋 < 𝑌. Assume that the joint
PDF for 𝑋 and 𝑌 is:
→ 𝑓𝑋𝑌 𝑥, 𝑦 = 6 × 10−6 exp(−0.001𝑥 − 0.002𝑦) for 𝑥 < 𝑦
① Find 𝑃 0 ≤ 𝑥 ≤ ∞, 𝑥 ≤ 𝑦 ≤ ∞
② Find 𝑃 0 ≤ 𝑥 ≤ 1000, 𝑥 ≤ 𝑦 ≤ 2000
4
Joint PDF Cont’d. 1
∞ ∞ ∞ ∞
න න 𝑓𝑋𝑌 (𝑥, 𝑦)𝑑𝑦𝑑𝑥 = න න 6 × 10−6 𝑒 −0.001𝑥−0.002𝑦 𝑑𝑦 𝑑𝑥
−∞ −∞ 0 𝑥
∞ ∞
= 6 × 10−6 න න 𝑒 −0.002𝑦 𝑑𝑦 𝑒 −0.001𝑥 𝑑𝑥
0 𝑥
∞ ∞
𝑒 −0.002𝑥 −0.001𝑥
= 6 × 10−6 න 𝑒 𝑑𝑥 = 0.003 න 𝑒 −0.003𝑥 𝑑𝑥
0 0.002 0
1
= 0.003 =1
0.003
5
Joint PDF Cont’d. 2
1000 2000
𝑃(𝑋 ≤ 1000, 𝑌 ≤ 2000) = ∫0 ∫𝑥 𝑓𝑋𝑌 (𝑥, 𝑦)𝑑𝑦𝑑𝑥 =
−6 1000 2000 −0.002𝑦
6 × 10 ∫0 ∫𝑥 𝑒 𝑑𝑦 𝑒 −0.001𝑥 𝑑𝑥
𝑒 −0.002𝑥 − 𝑒 −4
−6 1000
= 6 × 10 ∫0 𝑒 −0.001𝑥 𝑑𝑥 =
0.002
1000 −0.003𝑥
0.003∫0 𝑒 − 𝑒 −4 𝑒 −0.001𝑥 𝑑𝑥
1 − 𝑒 −3 1 − 𝑒 21
= 0.003 − 𝑒 −4 =
0.003 0.001
0.003(316.738 − 11.578) = 0.915
6
Marginal Probability
Distributions (MPD)
→ The response time is the speed of page downloads. Let 𝑋 denote the
number of bars of service and let 𝑌 denote the response time for a
particular user and site.
7
MPD Cont’d. Discrete
The MPD for 𝑋 is found by summing the probabilities in each column
whereas the MPD for 𝑌 is found by summing the probabilities in each
row.
𝑓𝑋 (3) = 𝑃(𝑋 = 3) = 𝑃(𝑋 = 3, 𝑌 = 1) + 𝑃(𝑋 = 3, 𝑌 = 2) +
𝑃(𝑋 = 3, 𝑌 = 3) + 𝑃(𝑋 = 3, 𝑌 = 4)
= 0.25 + 0.2 + 0.05 + 0.05 = 0.55
8
MPD Cont’d.
𝑓𝑌 (4)
𝑓𝑌 (3)
𝑓𝑌 (2)
𝑓𝑌 (1)
𝑓𝑋 (1) 𝑓𝑋 (2) 𝑓𝑋 (3)
9
MPD Cont’d. Continuous
10
MPD Cont’d.
Let 𝑋 and 𝑌 be two jointly CRV with joint PDF:
3 2
𝑓𝑋𝑌 (𝑥, 𝑦) = ቐ𝑥 + 2 𝑦 0 ≤ 𝑥 ≤ 1, 0≤𝑦≤1
0 otherwise
○ Find 𝑓𝑋 (𝑥) for 𝑃 0 ≤ 𝑥 ≤ 1
○ Find 𝑓𝑌 (𝑦) for 𝑃 0 ≤ 𝑦 ≤ 1
11
MPD Cont’d.
∞
𝑓𝑋 (𝑥) = න 𝑓𝑋𝑌 (𝑥, 𝑦)𝑑𝑦 1
−∞
1
𝑓𝑋 (𝑥) = ቐ𝑥 + 2 0≤𝑥≤1
3 2 0 otherwise
=න 𝑥 + 𝑦 𝑑𝑦
0 2
1
1 3
= 𝑥𝑦 + 𝑦
2 0
1
=𝑥+
2
12
MPD Cont’d.
∞
𝑓𝑌 (𝑦) = න 𝑓𝑋𝑌 (𝑥, 𝑦)𝑑𝑥 3 2 1
−∞ 𝑓𝑌 (𝑦) = ቐ2 𝑦 + 2 0≤𝑦≤1
1
3 2 0 otherwise
=න 𝑥 + 𝑦 𝑑𝑥
0 2
1
1 2 3 2
= 𝑥 + 𝑦 𝑥
2 2 0
3 2 1
= 𝑦 +
2 2
13
Conditional Probability Distributions (CPD)
𝑌 𝑋 𝑋 𝑌
𝑓𝑌∣𝑋 (𝑌) 𝑓𝑋∣𝑌 (𝑋)
14
CPD Cont’d.
Let 𝑋 and 𝑌 be two jointly CRV with joint PDF:
𝑥 2 𝑦 2 𝑥𝑦
𝑓𝑋𝑌 (𝑥, 𝑦) = ቐ 4 + 4 + 6 0 ≤ 𝑥 ≤ 1, 0≤𝑦≤2
0 otherwise
○ Find, the CPD of 𝑋 given 𝑌 = 𝑦;
1
‒ 𝑃 𝑋< ∣𝑌=𝑦
2
15
CPD Cont’d.
Let’s find the marginal PDF of Y. we have:
1 2
𝑥 𝑦 2 𝑥𝑦
𝑓𝑌 (𝑦) = න + + 𝑑𝑥
0 4 4 6
3𝑦 2 + 𝑦 + 1
= , for 0 ≤ 𝑦 ≤ 2
12
Thus, for 0 ≤ 𝑦 ≤ 2, we obtain:
𝑓𝑋𝑌 𝑥, 𝑦 3𝑥 2 + 3𝑦 2 + 2𝑥𝑦
𝑓𝑋∣𝑌 (𝑥 ∣ 𝑦) = = 2
, for 0 ≤ 𝑥 ≤ 1
𝑓𝑌 𝑦 3𝑦 + 𝑦 + 1
16
CPD Cont’d.
Thus, for 0 ≤ 𝑦 ≤ 2, we obtain:
3𝑥 2 + 3𝑦 2 + 2𝑥𝑦
𝑓𝑋∣𝑌 (𝑥 ∣ 𝑦) = ൞ 3𝑦 2 + 𝑦 + 1 0≤𝑥≤1
0 otherwise
1
1 3𝑥 2 + 3𝑦 2 + 2𝑥𝑦
2
𝑃 𝑋< ∣𝑌=𝑦 =න 2
𝑑𝑥
2 0 3𝑦 + 𝑦 + 1
1
1 2
= 2 𝑥 3 + 𝑦𝑥 2 + 3𝑦 2 𝑥 0
3𝑦 + 𝑦 + 1
3 2 𝑦 1
𝑦 + +
=2 2 4 8
3𝑦 + 𝑦 + 1 17
CPD Cont’d.
→ 𝑋 and 𝑌 denote the number of bars of signal strength and response
time, respectively. Then:
𝑃 𝑋 = 3, 𝑌 = 1
𝑃 𝑌=1 𝑋=3 = =
𝑃 𝑋=3
𝑓𝑋𝑌 (3,1)/𝑓𝑋 (3) = 0.25/0.55 = 0.454
𝑃 𝑋 = 3, 𝑌 = 2
𝑃 𝑌=2 𝑋=3 = =
𝑃 𝑋=3
𝑓𝑋𝑌 (3,2)/𝑓𝑋 (3) = 0.2/0.55 = 0.364
18
CPD Cont’d.
Conditional Probability Distributions
19
CPD Cont’d.
20
CPD Cont’d.
The conditional mean is interpreted as the expected response time
given that one bar of signal is present. The conditional variance of 𝑌
given 𝑋 = 1 is 𝑓1∣1 (𝑌 ∣ 𝑋) 𝑓2∣1 (𝑌 ∣ 𝑋) 𝑓3∣1 (𝑌 ∣ 𝑋) 𝑓4∣1 (𝑌 ∣ 𝑋)
𝐸(𝑌 ∣ 1) = 𝜇𝑌∣1 = 1(0.05) + 2(0.1) + 3(0.1) + 4(0.75) = 3.55
𝑉 𝑌 1 = (1 − 3.55)2 0.05 + (2 − 3.55)2 0.1 +
(3 − 3.55)2 0.1 + (4 − 3.55)2 0.75 = 0.748
21
Independent Random Variables
22
CPD Cont’d.
Suppose 𝑓𝑋𝑌 (𝑥, 𝑦) = 2 × 10−6 exp(−0.001𝑥 − 0.002𝑦) for 𝑥 ≥ 0
and 𝑦 ≥ 0. Show that 𝑋 and 𝑌 are independent.
∞
𝑓𝑋 (𝑥) = න 2 × 10−6 𝑒 −0.001𝑥−0.002𝑦 𝑑𝑦 = 0.001𝑒 −0.001𝑥 for 𝑥 > 0
0
∞
𝑓𝑌 (𝑦) = න 2 × 10−6 𝑒 −0.001𝑥−0.002𝑦 𝑑𝑥 = 0.002𝑒 −0.002𝑦 for 𝑦 > 0
0
Therefore, 𝑓𝑋𝑌 𝑥, 𝑦 = 𝑓𝑋 𝑥 𝑓𝑌 (𝑦) for all 𝑥 and 𝑦, and 𝑋 and 𝑌 are
independent.
23
Covariance and Correlation
24
Covariance and Correlation
The result is obtained by multiplying {𝑋 − 𝜇𝑋 } times {𝑌 − 𝜇𝑌 }, times
𝑓𝑋𝑌 (𝑥, 𝑦) for each point in the range (𝑋, 𝑌).
25
Covariance and Correlation
→ 𝑋 and 𝑌 denote the number of bars of signal strength and response time,
respectively. Then: 𝑓𝑋 (1) 𝑓𝑋 (2) 𝑓𝑋 (3)
𝐸(𝑋) = 1(0.2) + 2(0.25) + 3(0.55) = 3.25
𝐸(𝑌) = 1(0.28) + 2(0.25) + 3(0.17) + 4(0.3) = 2.49
𝐸 𝑋 − 𝜇𝑋 𝑌 − 𝜇𝑌 = 1 − 3.25 1 − 2.49 0.01 + 2 − 3.25 1 − 2.49 0.02 +
3 − 3.25 1 − 2.49 0.25
+ 1 − 3.25 2 − 2.49 0.02 + 2 − 3.25 2 − 2.49 0.03 +
3 − 3.25 2 − 2.49 0.2
+ 1 − 3.25 3 − 2.49 0.02 + 2 − 3.25 3 − 2.49 0.1 +
3 − 3.25 3 − 2.49 0.05
+ 1 − 3.25 4 − 2.49 0.15 + 2 − 3.25 4 − 2.49 0.1 +
3 − 2.35 4 − 2.49 0.05 = −0.5815
26
Covariance and Correlation
27
Covariance and Correlation
𝐸 𝑋𝑌 = 0 × 0 × 0.2 + 1 × 1 × 0.1 +
1 × 2 × 0.1 + 2 × 1 × 0.1 +
2 × 2 × 0.1 + 3 × 3 × 0.4 = 4.5
Joint Distribution for DRV 𝑋 and 𝑌
28
Covariance and Correlation
𝐸(𝑋) = 0 × 0.2 + 1 × 0.2 + 2 × 0.2 + 3 × 0.4 = 1.8
𝑉(𝑋) = 0(0 − 1.8)2 × 0.2 + (1 − 1.8)2 × 0.2 +
(2 − 1.8)2 × 0.2 + (3 − 1.8)2 × 0.4 = 1.36
→ Because the MPD of 𝑌 is the same as for 𝑋, 𝐸(𝑌) = 1.8 and 𝑉 𝑌 =
1.36. Consequently,
𝜎𝑋𝑌 = 𝐸(𝑋𝑌) − 𝐸(𝑋)𝐸(𝑌) = 4.5 − (1.8)(1.8) = 1.26
→ Furthermore:
𝜎𝑋𝑌 1.26
𝜌𝑋𝑌 = = = 0.926
𝜎𝑋 𝜎𝑌 1.36 1.36
29