0% found this document useful (0 votes)
64 views16 pages

Stat215 HW 6

The document discusses joint and conditional probability distributions for random variables. It includes examples of finding the probability of events for discrete and continuous random variables from their joint distributions and determining if variables are independent. It also covers determining marginal distributions from joint distributions and conditional distributions from joint distributions.

Uploaded by

Aguta Dan
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)
64 views16 pages

Stat215 HW 6

The document discusses joint and conditional probability distributions for random variables. It includes examples of finding the probability of events for discrete and continuous random variables from their joint distributions and determining if variables are independent. It also covers determining marginal distributions from joint distributions and conditional distributions from joint distributions.

Uploaded by

Aguta Dan
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/ 16

Stat215

Exercises 6

Q1) The joint probability function of two discrete random variables X and Y is given by

f(x,y) = cxy for x = 1, 2, 3 and y = 1, 2, 3 and equals zero otherwise. Find:

a) The constant c.

∑3𝑖=1 ∑3𝑗=1 𝑓(𝑥𝑖 , 𝑦𝑗 ) = 1 1 2 3 𝑓𝑌 (𝑦)


x
c+2c+3c+2c+4c+6c+3c+6c+4c = 1 ➔ c = 1/36 y
1 1c 2c 3c 6c
6c+12c+18c = 1 ➔ c = 1/36
2 2c 4c 6c 12c
b) P(X = 2 ,Y = 3)
= f(2,3) = 6c = 6/36 = 1/6 3 3c 6c 9c 18c
c) P(1 ≤ 𝑋 ≤ 2, 𝑌 ≤ 2)
𝑓𝑋 (𝑥) 6c 12c 18c 1=
x = 1,2 ; y = 1,2
total
P(1 ≤ 𝑋 ≤ 2, 𝑌 ≤ 2) = P(X = 1,Y = 1)+P(X = 1,Y = 2)+P(X = 2,Y = 1)+P(X = 2,Y = 2)

= f(1,1) + f(1,2) + f(2,1) + f(2,2) = 1c+2c+2c+4c = 9c = 9/36

d) (𝑋 ≥ 2)
x = 2,3

(𝑋 ≥ 2) = P(X = 2) + P(X = 3) = 𝑓𝑋 (2)+ 𝑓𝑋 (3) =12c+18c = 30c = 30/36

e) P(Y<2)
y=1

P(Y<2) = P(Y = 1) = 𝑓𝑌 (1) = 6c = 6/36 = 1/6

f) P(X = 1)
= 𝑓𝑋 (1) = 6c = 6/36 = 1/6
g) P(Y = 3)
= 𝑓𝑌 (3) = 18c = 18/36

Q2)For the random variables of Problem 1, find the marginal probability function of X and Y.

Determine ether X and Y are independent.

Marginal dis.of X:

X X1=1 X2 =2 X3= 3 Total


Fx(x) 6/36 12/36 18/36 1
=P(X=x)
Marginal dis.of Y:

Y Y1=1 Y2 =2 Y3= 3 Total


Fy(y) 6/36 12/36 18/36 1
=P(Y=x)

Remark:

Are X and Y independent?

If f(x,y) = fx(x) fy(y)

For all x=1,2,3 y=1,2,3 ,Then x and y are independent.

But if there some values of x and y which make that If f(x,y) ≠ fx(x) fy(y)

then x and y are not independent.

In this example we have:

f(1,1) = fx(1)fy(1)

f(1,2) = fx(1)fy(2)

f(3,3) = fx(3)fy(3)

So as If f(x,y) = fx(x) fy(y) for all x and y , then x and y are independent.

Q3) f(x,y) = c(𝒙𝟐 , 𝒚𝟐 ) , 0 ≤ x ≤ 1 , 0 ≤ y ≤ 1


𝟏 1
𝟏 1
a)∫ ∫ 𝒄(𝒙 , 𝒚 )𝒅𝒙 𝒅𝒚 =1 ➔c∫ [∫0 (𝑥 2 , 𝑦 2 )𝑑𝑥] 𝑑𝑦 =1
𝟐 𝟐
𝟎
𝟎 0
1 1
𝑥3 1
➔ 𝑐∫ [ 3
+ 𝑥𝑦 2 ]10 𝑑𝑦 = 1➔𝑐 ∫ ( 3 + 𝑦 2 ) 𝑑𝑦 =1
0 0
1 𝑦3 1 1 1 3
➔c [3𝑦 + ]
3 0
= 1 ➔ c [ + ] =1 ➔ c = 2
3 3

𝟏 𝟏
b) P(X < 𝟐 , 𝒀 > 𝟐
)
1
1 1 1
3 3 𝑥3
= ∫
2 1
[∫02(𝑥 2 , 𝑦 2 )𝑑𝑥] 𝑑𝑦 = 2
∫ [ 3
+ 𝑥𝑦 2 ]20 𝑑𝑦
2 1
2
1
3 1 1 3 𝑦 𝑦3 3 1 1 1 1 1
= ∫ ( + 𝑦 2 ) 𝑑𝑦 = [ + ]11 = [(24 + 6) − ( 48 + 48)] = 4
2 1 24 2 2 24 6 2 2
2
𝟏 𝟑
c) P (𝟒 < 𝑿 < 𝟒)
1
3
3 4 2 2 39
= ∫ [∫1 (𝑥 , 𝑦 )𝑑𝑥] 𝑑𝑦 = 128
2
4
0

𝟏
d) P (Y<𝟐)
1 1
3 2 1 2 2 3 2 𝑥3
= 2
∫ [∫0 (𝑥 , 𝑦 )𝑑𝑥] 𝑑𝑦 = 2
∫[ 3 + 𝑥𝑦 2 ]10 𝑑𝑦
0 0
1
1
3 2 1 2 3 1 𝑦3 2 1 1 1 5
= ∫( + 𝑦 )𝑑𝑦 = [ 𝑦 + ] = [ 2 + 23 ] = 16
2 3 2 3 3 0 2
0

e) Whether X and Y are independent


f(x,y) ≠ g(x) h(y)
X and Y are not independent

Q4)For the random variables of Problem 3, find the marginal probability function of X and Y

Marginal dis. of X:

1
fx(x) = ∫0 𝑓(𝑥, 𝑦) 𝑑𝑦

1 𝑦3
= 3/2∫0 (𝑥 2 , 𝑦 2 ) 𝑑𝑦 = 3/2 [x2y + 3 ]01

= 3/2 [x2+ 1/3] = 3/2x2 + 1/2


then

fx(x) = 3/2 x2 + 1/2 , 0<x<1

Marginal dis. of Y:
1
fy(y) = ∫0 𝑓(𝑥, 𝑦) 𝑑𝑥

1 𝑥3
= 3/2 ∫0 (𝑥 2 , 𝑦 2 ) 𝑑𝑥 = 3/2 [y2x + 3 ]01

= 3/2 [y2+ 1/3] = 3/2 y2 + 1/2


then

fy(y) = 3/2 y2 + 1/2 , 0<y<1


Q5) For the distribution of problem 1, find the conditional probability function of X given Y,
Y given X .
Q6) Let 𝑓(𝑥, 𝑦) = { 𝑥 + 𝑦 0 ≤ 𝑥 ≤ 1,0 ≤ 𝑦 ≤ 1 Find the conditional probability function of X
given Y, Y given X.

𝑓(𝑥, 𝑦) = 𝑥 + 𝑦

Marginal of x,y
1
𝑦2 1
𝑓(𝑥) = ∫ (𝑥 + 𝑦)𝑑𝑦 = 𝑥𝑦 + =𝑥+
0 2 2

1
𝑓(𝑦) = 𝑦 +
2
Conditional

𝑓(𝑥, 𝑦) 𝑥 + 𝑦 2(𝑥 + 𝑦)
𝑓(𝑥/𝑦) = = =
𝑓(𝑦) 1 2𝑦 + 1
𝑦+
2
𝑓(𝑥, 𝑦) 𝑥 + 𝑦 2(𝑥 + 𝑦)
𝑓(𝑦/𝑥) = = =
𝑓(𝑥) 1 2𝑥 + 1
𝑥+2

Q7) For the distribution of Problem 3, find the conditional probability function of X given Y,
Y given X.

conditional dis of x∣y:

3 2 2
𝑓(𝑥, 𝑦) 𝑥 + 𝑦 2 (𝑥 + 𝑦 ) 𝑥 2 + 𝑦 2
𝑓𝑥∣𝑦=𝑦 (𝑥) = = = =
𝑓𝑦 (𝑦) 1 3 2 1 1
𝑦+2 2 𝑦 + 2 𝑦2 + 3

For 0<x<1 where 0<y<1 fixed value

conditional dis of y∣x:

3 2 2
𝑓(𝑥, 𝑦) 𝑥 + 𝑦 2 (𝑥 + 𝑦 ) 𝑥 2 + 𝑦 2
𝑓𝑦∣𝑥=𝑥 (𝑦) = = = =
𝑓𝑥 (𝑥) 1 3 2 1 1
𝑦+2 2 𝑥 + 2 𝑥2 + 3

For o<y<1 where 0<x<1 fixed value

8) Let 𝑓(𝑥, 𝑦) = { 𝑒 −(𝑥+𝑦) 𝑥 ≥ 0, 𝑦 ≥ 0 be the joint density function of X and Y. Find the
conditional probability function of X given Y, Y given X.

𝑓(𝑥, 𝑦) = 𝑒 −(𝑥,𝑦)

𝑓(𝑥) = ∫ 𝑒 −𝑥 𝑒 −𝑦 𝑑𝑦 = 𝑒 −𝑦 (−𝑒 −𝑦 ) = 𝑒 −𝑥 [1 − 0] = 𝑒 −𝑥
0


𝑓(𝑦) = ∫ 𝑒 −𝑥 𝑒 −𝑦 𝑑𝑥 = 𝑒 −𝑦
0

Conditional x∣y
𝑓(𝑥, 𝑦) 𝑒 −(𝑥+𝑦)
𝑓(𝑥/𝑦) = = = 𝑒 −𝑥
𝑓(𝑦) 𝑒 −𝑦

Conditional y∣x

𝑓(𝑥, 𝑦) 𝑒 (𝑥+𝑦)
𝑓(𝑦/𝑥) = = −𝑥 = 𝑒 −𝑦
𝑓(𝑥) 𝑒

Q9) Let X and Y be random variables having joint density function

f(𝑥, 𝑦) = 𝑐(2𝑥 + 𝑦) 0 < 𝑥 < 1,0 < 𝑦 < 2 Find:

a. The constant c.

b. 𝑃 (𝑋 > 1/ 2 , 𝑌 < 3 / 2 ).

c .The (marginal) density function of X.

d. The (marginal) density function of Y.


𝟐 𝟏
a. 𝒄 ∫𝟎 ∫𝟎 (𝟐𝒙 + 𝒚) 𝒅𝒙 𝒅𝒚 = 𝟏

2 2𝑥 3 2 2
𝑐 ∫0 [ + 𝑥𝑦] |10 𝑑𝑦 = 1 ➔ 𝑐 ∫0 [ + 𝑦] 𝑑𝑦 = 1
3 3

2 𝑦2 2 4 10 6
➔𝑐 [ 𝑦+ ]| = 1 ➔𝑐 [ + 2] = 1 ➔ 𝑐 =1➔𝑐 =
3 2 0 3 6 10

b. 𝒇𝑿 (𝒙)= 𝟔 𝟐
𝟏𝟎
∫𝟎 (𝟐𝒙+𝒚) 𝒅𝒚

𝟔 𝒚𝟐 𝟐 𝟔 𝟔 12 6
𝟏𝟎
(𝟐𝒙𝒚 + )|
𝟐 𝟎
= 𝟏𝟎 [𝟒𝒙 + 𝟐] = 𝟏𝟎 [𝟒𝒙 + 𝟐] = 5
𝑥 +5 0<𝑥<1

𝟏 𝟑
c. 𝒑(𝒙 > 𝟐 ، 𝒚 < 𝟐)

3
6 2 1 6 3/2 2𝑥 3 6 3/2 2 1 1
∫ ∫1 (2𝑥
10 0 2
+ 𝑦) 𝑑𝑥 𝑑𝑦 = 10 ∫0 [ 3 + 𝑥𝑦] |11 dy= 10 ∫0 [(3 + y) − (12 + 2 y)] dy
2

6 3/2 2 1 1 6 3/2 1 7
= 10 ∫0 [3 + y − 12 − 2 y] 𝑑𝑦 = 10 ∫0 [2 y − 12] 𝑑𝑦

6 1 2 7 3/2 6 13 13
= [ 𝑦 − y ] |0 = [ ]=
10 4 12 10 48 80
𝟔 𝟏
d. 𝒇𝒚(𝒚) = 𝟏𝟎 ∫𝟎 (𝟐𝒙 + 𝒚) 𝒅𝒙

6 2 2 6
= [ + y] = + y 0<y<2
10 3 5 10
Q10(The joint probability function for the random variables X and Y is given in following
table, then find:

A(The marginal probability functions of X and Y.

f(x)= 0 1 2 f(x)
y
x
0 1/18 1/9 1/6 1/3

1 1/9 1/18 1/9 5/18

2 1/6 1/6 1/18 7/18

f(y) 1/3 1/3 1/3 1

X 0 1 2
f(x) 1/3 5/18 7/18

f(y)=

Y 0 1 2
f(y) 1/3 1/3 1/3

B(p(1≤ 𝒙 < 𝟑, 𝒚 ≥ 𝟏)

f(1.1)+f(1.2)+f(2.2)+f(2.1)=1/18+1/6+1/18+1/9=0.389

c(Determine whether X and Y are independent.

𝑓(1.1)=𝑓𝑥 (1)𝑓𝑦 (1)

1 1 5
= ×
18 3 18
1 5

18 54

X and y not independent


Q11) Let X and Y be random variables having joint density function

x + y 0 ≤ x ≤ 1,0 ≤ y ≤ 1
𝑓(𝑥, 𝑦) = {
0 otherwise

Find: a. Var(X). b. Var(Y). c. 𝜎𝑋. d. 𝜎𝑌. e. 𝜎𝑋𝑌. f. p

solution (11):

f(x,y)= x+y

1 𝑦2 1
f(x)= ∫0 𝑥 + 𝑦 dy = xy+( )|)|01= [x+ ], 0<x<1
2 2

and the same


1 1
f(y) )= ∫0 (𝑥 + 𝑦 ) dx = [y+2], 0<y<1

a,b
1 1 1 1 𝑥
E(x)=∫0 𝑥 . f(x)dx=∫0 𝑥 .(x+ )dx=∫0 𝑥 2 +( )dx
2 2

𝑥3 𝑥4 1 1 1 7
=( 3 )+( 4
)|0 =3+ 4 = 12

And the same


1 7
E(y) = ∫0 𝑦 . f(y) dy = 12

1 1 1 1 𝑥2
E(x2)= ∫0 𝑥 2 . f(x)dx=∫0 𝑥 2 (x+2)dx=∫0 𝑥 3 +( 2 )dx

𝑥4 𝑥3 1 1 1 10 5
=( 4 )+( 6
)|0 =4 + 16 = 24 = 12

And the same


1 5
E(y2) = ∫0 𝑦 2 . f(y) dy = 12

5 7 11
V(x) = E(x2) – [E(x)]2=12– (12)2 = 144

5 7 11
V(y) = E(y2) – [E(y)]2= – ( )2 =
12 12 144

11
C.σx = √𝑣𝑎𝑟(𝑥) = √144 = 0.2764

11
d.σy = √𝑣𝑎𝑟(𝑦) = √144 = 0.2764

e.cov(x,y) = E(XY) – E(X)E(Y)

E(XY)= ∫01∫01XY(x+y) dx dy = ∫01∫01x2y+ xy2 dx dy


𝑥3 𝑥2
= ∫01 ( 3 )y + ( 2 )y2 |01 dy

11 1 𝑦2 1 1 2 1
= ∫0 𝑦 + y dy = + y3/6|01 = + = =
3 2 6 6 6 6 3

1 7 7 1 49 −1
Cov(x,y) = E(X,Y) – E(X).E(Y) = 3– 12. 12= 3 – 144= 144

−1
144
f.= cov(x,y) / √𝑣𝑎𝑟(𝑥). 𝑣𝑎𝑟(𝑦) = 11 11
√ .
144 144

−1
144 −1
= 11 = 11 = -0.091
144

Relation weak negative

Q12)Work Problem 11 if the joint density function is f(𝑥,y) = 𝒆−(𝒙+𝒚) 𝑥≥0 , 𝑦≥0 Find:
a) Var(X).
b) Var(Y).
c) 𝜎𝑋.
d) 𝜎𝑌.
e) 𝜎𝑋𝑌.
f) 𝜌.


𝑓 X( 𝒙) = ∫𝟎 𝒆−(𝒙+𝒚) 𝒅𝒚 = −𝒆−(𝒙+𝒚) |∞
𝟎=𝒆
−𝒙


𝑓 y( 𝒚) = ∫𝟎 𝒆−(𝒙+𝒚) 𝒅𝒙 = −𝒆−(𝒙+𝒚) |∞
𝟎=𝒆
−𝒚

∞ 𝒙𝒆−𝒙 𝒅𝒙
a) 𝑬(𝑿) = ∫𝟎

u=x dv=𝑒 −𝑥

du=dx v= -𝑒 −𝑥

𝐼 = −𝑥𝑒 −𝑥 |∞
0 + ∫0 𝑒
−𝑥
𝑑𝑥 = −𝑒 −(𝑥) |∞
0 =1


E( x2 )=∫0 𝑥 2 𝑒 −𝑥 dx

u=𝑥 2 dv=𝑒 −𝑥

du= 2x dx v= -𝑒 −𝑥

𝐼 = −𝑥 2 𝑒 −𝑥 |∞
0 + 2 ∫ x𝑒
−𝑥
𝑑𝑥 = 2(1) = 2
0

V(x) = E(𝑥 2 ) – (E(x))2 = 2-(1)2 = 1



b) E(y) = ∫𝟎 𝒚 𝒆−𝒚 dy = 1 (was solved)


E(y2) =∫0 𝑦 2 𝑒 −𝑦 = 2 (was solved)

V(y) = E(𝑦 2 ) – (E(y))2 = 2-(1)2 = 1

c) 𝜎𝑋 = √𝑽(𝒙) = 1
d) 𝜎𝑌 = √𝑽(𝒚) = 1
e) Con (x,y) = E (xy) –E (x) E (y)
∞ ∞ ∞ ∞
E (xy) = ∫0 ∫0 𝑥𝑦 𝑒 −(𝑥+𝑦) 𝑑𝑥 𝑑𝑦 = ∫0 𝑦[∫0 𝑥 𝑒 −(𝑥+𝑦) 𝑑𝑥] 𝑑𝑦
u=x dv=𝑒 −(𝑥+𝑦)
du=dx v= -𝑒 −(𝑥+𝑦)
∞ ∞

𝐼 = ∫ 𝑦[ − 𝑥𝑒 −(𝑥+𝑦) |∞
0 +∫ 𝑒
−(𝑥+𝑦)
𝑑𝑥]𝑑𝑦 = ∫ 𝑦 𝑒 −(𝑦) 𝑑𝑦
0
0 0

u=𝑦 dv=𝑒 −𝑦

du= dx v= -𝑒 −𝑦

= −𝑦𝑒 −(𝑦) |∞
0 + ∫0 𝑒
−(𝑦)
𝑑𝑦 = 1

Con (x,y) = E (xy) –E (x) E (y) = 1 – (1)(1) = 0


Con (x,y) 0
𝜌= = =0
√𝑉(𝑥)𝑉(𝑦) √(1)(1)

Q13) Find a. The covariance. b. The correlation coefficient of two random variables X and Y.
If

E(x)=2 , E(y)=3 ,E(xy)=10 ,E (x 2 ) = 10, E (y 2 ) = 16


solution (13):

a.Var(x)= E (x 2 ) − [E (x)]2

= 10-22 = 10

Var(x)= E (y 2 ) − [E (y)]2

= 16-32 = 7
Cov(x,y) =E(xy) -E(x)E(y)
4= = 10-[2× 3]
Cov(x,y) 4 4
b. f= = = = 0.6172
√𝑣𝑎𝑟(𝑥)𝑣𝑎𝑟(𝑦) √6×7 √42
Q14) The correlation coefficient of two random variables X and Y is -1/4 while their
variances are 3 and 5. Find the covariance .

Answer:
1
Var(x)=3 Var(y)=5 𝜌𝑋,𝑌 =-4 𝐶𝑜𝑣(𝑋,𝑌)=??

𝐶𝑜𝑣(𝑋,𝑌)
𝜌𝑋,𝑌=
√𝑉(𝑋)𝑉(𝑌)

1 Cov(X,Y) 1
-4 = -4 √15 = 𝐶𝑜(𝑋,𝑌) 𝐶𝑜𝑣(𝑋,𝑌)=-0.9682
√3∗5

Q15) be the joint density function of X and Y. Find the conditional probability function of X
given Y, Y given X.
𝑥𝑦
x = 1,2,3 y = 1,2,3
f(x,y)= {36
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒

f(x,y) y
1 2 3
1 36/1 1/18 1/12
x 2 18/1 9/1 6/1
3 12/1 6/1 4/1

y 1 2 3
fy(y) 6/1 3/1 2/1

x 1 2 3
fx(x) 6/1 3/1 2/1

x given y:
𝑓(𝑥,𝑦) 𝑓(1,1) 1/36 1
fx|y (x|y)= f1|1 (1|1 )= 𝑓(𝑦) = 𝑓(1) = 1/6 =6

𝑓(𝑥,𝑦) 𝑓(2,1) 1/18 1


fx|y (x|y)= f2|1 (2|1 )= 𝑓(𝑦) = 𝑓(1) = 1/6 =3

𝑓(𝑥,𝑦) 𝑓(3,1) 1/12 1


fx|y (x|y)= f3|1 (3|1 )= 𝑓(𝑦) = 𝑓(1) = 1/6 =2
𝑓(𝑥,𝑦) 𝑓(1,2) 1/18 1
fx|y (x|y)= f1|2 (1|2 )= 𝑓(𝑦) = 𝑓(2) = 1/3 =6

𝑓(𝑥,𝑦) 𝑓(2,2) 1/9 1


fx|y (x|y)= f2|2 (2|2 )= 𝑓(𝑦) = 𝑓(2) =1/3=3

𝑓(𝑥,𝑦) 𝑓(3,2) 1/6 1


fx|y (x|y)= f3|2 (3|2 )= 𝑓(𝑦) = 𝑓(2) =1/3=2

𝑓(𝑥,𝑦) 𝑓(1,3) 1/12 1


fx|y (x|y)= f1|3 (1|3 )= 𝑓(𝑦) = 𝑓(3) = 1/2 =6

𝑓(𝑥,𝑦) 𝑓(2,3) 1/6 1


fx|y (x|y)= f2|3 (2|3 )= 𝑓(𝑦) = 𝑓(3) =1/2=3

𝑓(𝑥,𝑦) 𝑓(3,3) 1/4 1


fx|y (x|y)= f3|3 (3|3 )= 𝑓(𝑦) = 𝑓(3) =1/2=2

x 1 2 3
fx|2(x|2) 6/1 3/1 2/1
fx|y(x|y) y
1 2 3
1 6/1 1/6 1/6
x 2 3/1 3/1 3/1
3 2/1 2/1 2/1

x 1 2 3
fx|1(x|1) 6/1 3/1 2/1

X 1 2 3
fx|3(x|3) 6/1 3/1 2/1

y given x:
𝑓(𝑥,𝑦) 𝑓(1,1) 1/36 1
- fy|x (y|x)= f1|1 (1|1 )= 𝑓(𝑥)
= 𝑓(1) = 1/6 =6
𝑓(𝑥,𝑦) 𝑓(2,1) 1/18 1
- fy|x (y|x)= f2|1 (2|1 )= 𝑓(𝑥) = 𝑓(1) = 1/6 =3
𝑓(𝑥,𝑦) 𝑓(3,1) 1/12 1
- fy|x (y|x)= f3|1 (3|1 )= 𝑓(𝑥)
= 𝑓(1) = 1/6 =2
𝑓(𝑥,𝑦) 𝑓(1,2) 1/18 1
- fy|x (y|x)= f1|2 (1|2 )= 𝑓(𝑥) = 𝑓(2) = 1/3 =6
𝑓(𝑥,𝑦) 𝑓(2,2) 1/9 1
- fy| x(y|x)= f2|2 (2|2 )= = = =
𝑓(𝑥) 𝑓(2) 1/3 3
𝑓(𝑥,𝑦) 𝑓(3,2) 1/6 1
- fy|x (y|x)= f3|2 (3|2 )= 𝑓(𝑥) = 𝑓(2) =1/3=2
𝑓(𝑥,𝑦) 𝑓(1,3) 1/12 1
- fy|x (y|x)= f1|3 (1|3 )= 𝑓(𝑥) = 𝑓(3) = 1/2 =6
𝑓(𝑥,𝑦) 𝑓(2,3) 1/6 1
- fy|x (y|x)= f2|3 (2|3 )= = = =
𝑓(𝑥) 𝑓(3) 1/2 3
𝑓(𝑥,𝑦) 𝑓(3,3) 1/4 1
- fy|x (y|x)= f3|3 (3|3 )= 𝑓(𝑥) = 𝑓(3) =1/2=2

fy|x(x|y) y
1 2 3
1 6/1 1/3 2/1
x 2 6/1 3/1 2/1
3 6/1 3/1 2/1

Y 1 2 3
fy|1(y|1) 6/1 3/1 2/1

Y 1 2 3
fy|2(y|2) 6/1 3/1 2/1

Y 1 2 3
fy|3(y|3) 6/1 3/1 2/1

Q16) The joint probability function of two discrete random variables X and Y is given by (𝑥,
𝑦) = 𝑐(2𝑥 + 𝑦), where x and y can assume all integers such
that 0 ≤ 𝑥 ≤ 2 , 0 ≤ 𝑦 ≤ 3 and 𝑓(𝑥, 𝑦) = 0 otherwise. Find:
a. The value of the constant c.
b. (𝑋 = 2, 𝑌 = 1).
c. (𝑋 ≥ 1, 𝑌 ≤ 2)

solution (16):
f(x)=c(2x+y) 0 ≤X≤ 2 0 ≤y≤ 3
a. the value of the constant c
3 2

∑ ∑ 𝑐(2𝑋 + 𝑌) = 1
𝑦=0 𝑥=0

f(0,0)+f(0,1)+f(0,2)+f(0,3)+ f(1,0)+f(1,1)+f(1,2)+f(1,3)+
f(2,0)+f(2,1)+f(2,2)+f(2,3)=1
C+2C+3C+2C+3C+4C+5C+4C+5C+6C+7C=1
1
42C=1 C=42
1 5
b. p(X=2,Y=1)=f(2,1)= 42 (2(2) + 1) = 42

c. p(X ≥ 1,Y ≤ 2)
= f(1,0)+f(1,1)+f(1,2)+ f(2,0)+f(2,1)+f(2,2)
4
=7

Q17) For the Problem 16, find :

a. E(X) . b E(Y).

c. E(XY). d. E(X2 ).

e. E(Y2 ). f. Var(X).

g. Var(Y). h. Cov(X,Y). i. 𝜌.

Y \ x 0 1 2
0 0 1/21 2/21 1/7
1 1/12 1/14 5/42 3/14
2 1/21 2/21 1/7 2/7
3 1/14 5/42 1/6 5/14
1/7 1/3 11/21 1

x 0 1 2
f(x) 0.14285 0.33333 0.5238
Xf(x) 0 0.3333 1.04761 E(x)=1.38
X2f(x) 0 0.3333 2.09523 E(x2)= 2.428

Var(x)= E(x2)-[E(x)]2 = 2.428 –(1.38)2 =0.5236

Y 0 1 2 3
F(y) 0.14285 0.21428 0.285714 0.35714
y f(y) 0 0.21428 0.571428 1.0714
y2 f(y) 0 0.21428 1.142857 3.21428

E(y)= 1.857

E(y2)= 4.571412
Var(y) = 1.122968

1 2 1 1 5 1 2 1 1 5
(1)(0) + (2)(0) + (1)(0) + (1)(1) + (1)(2) + (2)(0) + (2)(1) + (2)(2) + (3)(0) + (3)(1)
21 21 42 14 42 21 21 7 14 42
1 17
+ (2)(3)6 = E(x,y)= 7 = 2.428

Cov(x,y) = E(x,y) – E(x).E(y) = 2.428 – (1.38 X 1.857) = - 0.13466

𝐶𝑜𝑣(𝑥,𝑦) −0.13466
Pxi y= = = - 0.1756
√𝑣(𝑥).𝑣(𝑦) √1.122968 𝑋 0.5236

𝟖𝒙𝒚 𝟎 ≤ 𝒙 ≤ 𝟏 , 𝟎 ≤ 𝒚 ≤ 𝒙
Q18) The joint density function of X and Y is given by (𝑥, 𝑦) = {
𝟎 𝒐𝒕𝒉𝒆𝒓𝒘𝒊𝒔𝒆

Find:

a. The marginal density of X.

b. The marginal density of Y.

c. The conditional density of X.

d. The conditional density of Y.

a. Answer:
𝑥 𝑥
fx(x)=∫0 𝑓(𝑥, 𝑦)𝑑𝑦= 8x∫0 𝑦 𝑑𝑦

𝑦2 𝑥
=8x |
2 0
= 4x[x2]

=4x3 for 0<x<1

b. Answer:
1 1
fy(y)=∫𝑦 𝑓(𝑥, 𝑦)𝑑𝑥 = 8y∫𝑦 𝑥 𝑑𝑥

𝑥2 1
= 8y |
2 𝑦
=4y[1-y2]=4y-4y3

=4y(y-y3) for 0 < y < 1

c. Answer:
𝑓(𝑥,𝑦) 8𝑥𝑦 2𝑥𝑦 2𝑥
fx|y=y(x)= = = =
𝑓y(𝑦) 4(𝑦−𝑦 3 ) 𝑦(1−𝑦 2 ) 1−𝑦 2
for y < x < 1 where 0 < y < 1 fined value

d. Answer:
𝑓(𝑥,𝑦) 8𝑥𝑦 2𝑦
fy|x=x(y)= 𝑓x(𝑥)
= 4𝑥3 = 𝑥 2

for 0 < y < x where 0 < x < 1 fined value

Q19) Find the conditional expectation of X given Y and Y given X in Problem 18

1
1 2 1 2 𝑥3 2 1 2 (1−y2 )
𝐸(𝑋|𝑌 = 𝑦) = ∫𝑦 𝑥 𝑓𝑥|𝑦=𝑦 (𝑥) 𝑑𝑥 = ∫ 𝑥 2 𝑑𝑥
1−𝑦 2 𝑦
= 2
1−𝑦 3 𝑦
| =
3 1−y2
(1 − y3) =
3 (1−y2 )

𝑥
𝑦 2 𝑥 2 𝑦3 2 1 2
𝐸(𝑌|𝑋 = 𝑥) = ∫0 𝑦 𝑓𝑌|𝑋=𝑥 (𝑦) 𝑑𝑦 = 𝑥 2 ∫0 𝑦 2 𝑑𝑦 = 𝑥 2 3 0
| = 3 x2 (x 3 ) = 3 x

Q20) Find the conditional variance of Y given X for Problem 18.

𝑉𝑎𝑟(𝑌|𝑋) = 𝐸(𝑌 2 |𝑋) = 𝐸(𝑌|𝑋)2

𝑥 𝑥
2 |𝑋)
2 𝑥 2 𝑦4 2 1 4 1
𝐸(𝑌 = ∫ 𝑦 𝑓𝑌|𝑋=𝑥 (𝑦)𝑑𝑦 = 2 ∫ 𝑦 3 𝑑𝑦 = 2
2
| = 2
[𝑥 ] = 𝑥 2
0 𝑥 0 𝑥 4 0 4𝑥 2

1 2 2 1 22 1
𝑉𝑎𝑟(𝑌|𝑋) = 2 𝑥 2 − [3 𝑥] = [2 − 32 ] 𝑥 2 = 18 𝑥 2

You might also like