Lec8 Tut
Lec8 Tut
Lec8 Tut
𝑥
3 1 1 3−𝑥
𝑓(𝑥) = ( ) ( ) ( ) , 𝑥 = 0,1,2,3
𝑥 4 4
Find the mean of X
Sol:
3
27 27 9 1
𝐸(𝑋) = ∑ 𝑥𝑓 (𝑥) = (0) ( ) + (1) ( ) + (2) ( ) + (3) ( ) = 3/4
64 64 64 64
𝑥=0
Ex: By investing in a particular stock, a person can make a profit in one year of 4000$ with probability 0.3
or take a loss of 1000$ with probability 0.7. what is this person’s expected gain?
Sol:
Sol:
∞ ∞
𝐸[𝑔(𝑋)] = 𝐸[𝑒 2𝑋/3 ] = ∫ 𝑒 2𝑥/3 𝑒 −𝑥 𝑑𝑥 = ∫ 𝑒 −𝑥/3 𝑑𝑥 = 3
0 0
X -2 3 5
f(X) 0.3 0.2 0.5
Find the standard deviation of X
Sol:
∞ ∞
∫ ∫ 𝑓 (𝑥, 𝑦)𝑑𝑥𝑑𝑦
−∞ −∞
1 1
2
=∫ ∫ (2𝑥 + 3𝑦)𝑑𝑥𝑑𝑦
0 0 5
1 𝑥=1
2𝑥 2 6𝑥𝑦
=∫ + | 𝑑𝑦
0 5 5 𝑥=0
1
2 6𝑦
= ∫ ( + ) 𝑑𝑦
0 5 5
1
2𝑦 3𝑦 2
=( + )|
5 5 0
2 3
= + =1
5 5
b)P(0<x<1/2, 1/4<y<1/2)
∞ ∞
∫ ∫ 𝑓 (𝑥, 𝑦)𝑑𝑥𝑑𝑦
−∞ −∞
1 1
2 22
= ∫1 ∫ (2𝑥 + 3𝑦)𝑑𝑥𝑑𝑦
0 5
4
1 1
𝑥=
2 2𝑥 2 6𝑥𝑦 2
= ∫1 + | 𝑑𝑦
5 5 𝑥=0
4
1 1 1
2×
2 6× 𝑦
=∫ ( 4 + 2 ) 𝑑𝑦
1 5 5
4
1
2 1 3𝑦
=∫ ( + ) 𝑑𝑦
1 10 5
4
1
𝑦 3𝑦 2 2
= + |
10 10 1
4
1 1 3 1 3
= [( + ) − ( + )]
10 2 4 4 16
1 8 + 12 − 4 − 3 13
= ( )=
10 16 160
H.W.
Find
1- g(x)
2- h(y)
Ex: For the following table, check whether f(X,y) is a distribution function or not ?
y/x 0 1 2
0 0.05 0.2 0.05
1 0.1 0.2 0.1
2 0.05 0.1 0.15
Sol
∑ ∑ 𝑓 (𝑥, 𝑦) = 0.05 + 0.1 + 0.05 + 0.2 + 0.2 + 0.1 + 0.5 + 0.1 + 0.015 = 1
𝑥 𝑦
Sol:
𝑓(𝑋 = 1, 𝑌 = 2) 0.1 0.1 0.1
𝑃(𝑌 = 2|𝑋 = 1) = = = = = 0.2
𝑔(𝑋 = 1) ∑𝑦 𝑓(1, 𝑦) 0.2 + 0.2 + 0.1 0.5
Ex find P(x=1|Y)
Sol:
𝑓(𝑋 = 1, 𝑌) ∑𝑦 𝑓(𝑋 = 1, 𝑦)
𝑃 (𝑋 = 1|𝑌) = = = 0.2 + 0.2 + 0.1 = 0.5
ℎ(𝑌) 1
Ex find 𝜎𝑥𝑦
Sol
y/x 0 1 2 h(y)
0 0.05 0.2 0.05 0.3
1 0.1 0.2 0.1 0.4
2 0.05 0.1 0.15 0.3
g(x) 0.2 0.5 0.3
Method #1
Method #2
𝜎𝑥𝑦 = 𝐸 (𝑋𝑌) − 𝜇𝑥 𝜇𝑦
X y f(x,y)
0 0 0.05 0
0 1 0.1 0
0 2 0.05 0
1 0 0.2 0
1 1 0.2 0.2
1 2 0.1 0.2
2 0 0.05 0
2 1 0.1 0.2
2 2 0.15 0.6
1.2
𝐸(𝑋𝑌) = 1.2
𝜎𝑥𝑦 = 𝐸 (𝑋𝑌) − 𝜇𝑥 𝜇𝑦 = 1.2 − (1.1 ∗ 1) = 0.1
𝜎 2 = 𝐸(𝑋 2 ) − 𝜇𝑋2