Given two discrete random variables (X and Y) with
P(1,1)=.10P(2,1)=.05 P(3,1)=.02) P(4,1)=.02 P(2,1)=.05 P(2,2)=.20
P(3,2)=.05P(4,2)=.02 P(3,1)=.02 P(3,2)=.05 P(3,3)=.20 P(3,4)=.04
P(4,1)=.02P(4,2)=.02 P(4,3)=.04 P(4,4)=.10
Find covariance and correlation of X and Y.
Find E(Y|X=x) for x=1,2,3,4. Find the probablity massfunction
of the random variable E(Y|X).

Respuesta :

Note that there are some duplicate events in the given distribution. I'm guessing you meant to describe the table below:

[tex]\begin{array}{c|c|c|c|c}X\backslash Y&1&2&3&4\\1&0.1&0.05&0.02&0.02\\2&0.05&0.2&0.05&0.02\\3&0.02&0.05&0.2&0.04\\4&0.02&0.02&0.04&0.1\end{array}[/tex]

(imagine there are horizontal lines separating the rows in the table; for whatever reason, the command for making these lines doesn't work on this site)

The covariance is

[tex]\mathrm{Cov}(X,Y)=E((X-E(X))(Y-E(Y)))=E(XY)-E(X)E(Y)=0.5096[/tex]

which follows from

[tex]E(XY)=\displaystyle\sum_{x,y}xy\,P(X=x,Y=y)=6.66[/tex]

[tex]E(X)=\displaystyle\sum_{x,y}x\,P(X=x,Y=y)=2.48[/tex]

[tex]E(Y)=\displaystyle\sum_{x,y}y\,P(X=x,Y=y)=2.48[/tex]

The correlation is

[tex]\mathrm{Corr}(X,Y)=\dfrac{\mathrm{Cov}(X,Y)}{\sqrt{E(X-E(X))^2E(Y-E(Y))^2}}\approx0.5150[/tex]

since

[tex]E(X-E(X))^2=E(X^2)-E(X)^2=0.9896[/tex]

[tex]E(Y-E(Y))^2=E(Y^2)-E(Y)^2=0.9896[/tex]

because

[tex]E(X^2)=\displaystyle\sum_{x,y}x^2\,P(X=x,Y=y)=7.14[/tex]

[tex]E(Y^2)=\displaystyle\sum_{x,y}y^2\,P(X=x,Y=y)=7.14[/tex]

Next, recall that

[tex]P(Y=y\mid X=x)=\dfrac{P(X=x,Y=y)}{P(X=x)}[/tex]

where

[tex]P(X=x)=\displaystyle\sum_yP(X=x,Y=y)[/tex]

Then we have, for instance,

[tex]P(X=1)=\displaystyle\sum_yP(X=1,Y=y)=0.19[/tex]

so that

[tex]P(Y=y\mid X=1)=\dfrac{P(X=1,Y=y)}{P(X=1)}=\begin{cases}0.5263&\text{for }y=1\\0.2632&\text{for }y=2\\0.1053&\text{for }y=3\\0.1053&\text{for }y=4\\0&\text{otherwise}\end{cases}[/tex]

and so

[tex]E(Y\mid X=1)=\displaystyle\sum_yy\,P(Y=y\mid X=1)\approx1.7895[/tex]

You can similarly compute each conditional probability to find the the remaining conditional expectations.

[tex]P(X=2)=0.32\implies E(Y\mid X=2)=2.125[/tex]

[tex]P(X=3)=0.31\implies E(Y\mid X=3)\approx2.8387[/tex]

[tex]P(X=4)=0.18\implies E(Y\mid X=4)\approx3.2222[/tex]