- #1

Scootertaj

- 97

- 0

**1. Consider the random variables X,Y where X~B(1,p) and**

f(y|x=0) = 1/2 0<y<2

f(y|x=1) = 1 0<y<1

Find cov(x,y)

f(y|x=0) = 1/2 0<y<2

f(y|x=1) = 1 0<y<1

Find cov(x,y)

## Homework Equations

Cov(x,y) = E(XY) - E(X)E(Y) = E[(x-E(x))(y-E(y))]

E(XY)=E[XE(Y|X)]

## The Attempt at a Solution

E(X) = p (known since it's Bernoulli, can also be proven

E(Y) = [itex]\int Y*1/2 dy[/itex] 0 to 2 + [itex]\int Y*1[/itex] 0 to 1 = 3/2

**I'm not sure E(Y) is right.**

If this is right, I still don't know how to solve E(XY).

**Could we do cov(x,y) =∫ ∫(x-p)(y-3/2)dxdy from 0 to 1, 0 to 2 ?**

Thoughts?