# Homework Help: Conditional Expectation

1. Sep 17, 2012

### Scootertaj

1. Let the joint pdf be f(x,y) = 2 ; 0<x<y<1 ; 0<y<1
Find E(Y|x) and E(X|y)

2. Relevant equations

E(Y|x) = $\int Y*f(y|x)dy$
f(y|x) = f(x,y) / f(x)

3. The attempt at a solution
f(x) = $\int 2dy$ from 0 to y = 2y
f(y|x) = f(x,y)/f(x) = 1/2y
E(Y|x) = $\int Y/2Y dy$ from x to 1 = $\int 1/2 dy$ from x to 1
= -(x-1)/2
= (1-x)/2

The answer is supposed to be (1+x)/2

2. Sep 17, 2012

### jbunniii

Your expression for f(x) is wrong. It should be a function of x, not of y. Try drawing a picture of the region where f(x,y) is nonzero. Then answer this question: for a fixed value of x, what values of y will give you a nonzero f(x,y)?

3. Sep 17, 2012

### Scootertaj

The only other way I can think of doing f(x) would be to integrate from 0 to 1 instead. f(x) is defined as the integral of the joint pdf in terms of y.

So, we could get integral(2dy) from x to 1?

4. Sep 17, 2012

### jbunniii

Correct, from x to 1 (not as 0 to 1 as you wrote in the previous paragraph). Also be sure to state which values of x this is valid for.

5. Sep 17, 2012

### Scootertaj

That will give us 2(1-x) so f(y|x) = 1/(1-x)

I'm confused how this will give (1+x)/2 for E(y|x)

6. Sep 17, 2012

### Scootertaj

Just kidding I worked it out, thanks.

7. Sep 17, 2012

### jbunniii

That's the answer I got. What integral are you calculating for E(y|x)?

 Cool, I see you got it.