40.8k views
4 votes
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).

User Iakovl
by
5.2k points

1 Answer

4 votes

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


\begin{array}cX\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}

(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


\mathrm{Cov}(X,Y)=E((X-E(X))(Y-E(Y)))=E(XY)-E(X)E(Y)=0.5096

which follows from


E(XY)=\displaystyle\sum_(x,y)xy\,P(X=x,Y=y)=6.66


E(X)=\displaystyle\sum_(x,y)x\,P(X=x,Y=y)=2.48


E(Y)=\displaystyle\sum_(x,y)y\,P(X=x,Y=y)=2.48

The correlation is


\mathrm{Corr}(X,Y)=\frac{\mathrm{Cov}(X,Y)}{√(E(X-E(X))^2E(Y-E(Y))^2)}\approx0.5150

since


E(X-E(X))^2=E(X^2)-E(X)^2=0.9896


E(Y-E(Y))^2=E(Y^2)-E(Y)^2=0.9896

because


E(X^2)=\displaystyle\sum_(x,y)x^2\,P(X=x,Y=y)=7.14


E(Y^2)=\displaystyle\sum_(x,y)y^2\,P(X=x,Y=y)=7.14

Next, recall that


P(Y=y\mid X=x)=(P(X=x,Y=y))/(P(X=x))

where


P(X=x)=\displaystyle\sum_yP(X=x,Y=y)

Then we have, for instance,


P(X=1)=\displaystyle\sum_yP(X=1,Y=y)=0.19

so that


P(Y=y\mid X=1)=(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}

and so


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

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


P(X=2)=0.32\implies E(Y\mid X=2)=2.125


P(X=3)=0.31\implies E(Y\mid X=3)\approx2.8387


P(X=4)=0.18\implies E(Y\mid X=4)\approx3.2222

User Aaron Cook
by
5.1k points