You are on page 1of 5

Ex: the probability distribution of the discrete random variable X is

𝑥
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:

𝐸(𝑋) = (4000)(0.3) + (−1000)(0.7) = 500$

Ex: A continuous random variable X has the density function


𝑒 −𝑥 , 𝑥 > 0
𝑓(𝑥) = {
0, 𝑒𝑙𝑠𝑒𝑤ℎ𝑒𝑟𝑒
Find the expected value of g(X)=e2X/3.

Sol:
∞ ∞
𝐸[𝑔(𝑋)] = 𝐸[𝑒 2𝑋/3 ] = ∫ 𝑒 2𝑥/3 𝑒 −𝑥 𝑑𝑥 = ∫ 𝑒 −𝑥/3 𝑑𝑥 = 3
0 0

HW. Let X be a random variable with the following probability distribution

X -2 3 5
f(X) 0.3 0.2 0.5
Find the standard deviation of X

EX For the following function


2
𝑓 (𝑥, 𝑦) = {5 (2𝑥 + 3𝑦) , 0 ≤ 𝑥 ≤ 1,0 ≤ 𝑦 ≤ 1
0 𝑒𝑙𝑠𝑒𝑤ℎ𝑒𝑟𝑒
Check whether it is a distribution function or not

Then find P(0<x<1/2, 1/4<y<1/2)

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 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
𝑥 𝑦

And since all values of 𝑓(𝑥, 𝑦) ≥ 0

Then f(x,y) is a distribution function

Ex: find P(Y=2|X=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

𝜇𝑥 = (0)(0.2) + (1)(0.5) + (2)(0.3) = 1.1


𝜇𝑦 = (0)(0.3) + (1)(0.4) + (2)(0.3) = 1

Method #1

𝜎𝑥𝑦 = ∑ ∑(𝑥 − 𝜇𝑥 )(𝑦 − 𝜇𝑦 )𝑓(𝑥, 𝑦)


𝑥 𝑦

x Y x-ux y-uy f(x,y)


0 0 -1.1 -1 0.05 0.055
0 1 -1.1 0 0.1 0
0 2 -1.1 1 0.05 -0.055
1 0 -0.1 -1 0.2 0.02
1 1 -0.1 0 0.2 0
1 2 -0.1 1 0.1 -0.01
2 0 0.9 -1 0.05 -0.045
2 1 0.9 0 0.1 0
2 2 0.9 1 0.15 0.135
1 0.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

You might also like