# Conditional expectation (discrete + continuous)

1. Aug 29, 2006

### island-boy

I need help in solving the following problem:

Let X be uniformly distributed over [0,1]. And for some c in (0,1), define Y = 1 if X>= c and Y = 0 if X < c. Find E[X|Y].

My main problem is that I am having difficulty solving for f(X|Y) since X is continuous (uniform continuous over [0,1]) while Y is discrete (takes values of 0 or 1 only)

2. Aug 29, 2006

### HallsofIvy

Staff Emeritus
Actually, "E[X|Y]" does not make sense to me. That is the expected value of X given that Y is what? E[X|Y= 1] can be done and E[X|Y= 0].

Of course, if Y= 1, then X>= c so that is just E[X] where X is now uniformly distributed over [c, 1]. If Y= 0, then X is uniformly distributed over [0, c).

3. Aug 29, 2006

### island-boy

The problem is asking for the best predictor of X based on Y which is essentially E(X|Y)...I believe I should have different answers for different values of Y.

I got what you are saying though HallsofIvy. I'll try to work out the problem again. Thanks!

4. Aug 30, 2006

### island-boy

Hi, an additional question regarding the problem...

Given the question above, here's what I was able to get (that's suppose to be a chart below):

X: ..........................[c,1]...................................[0,c)
Y:.............................1........................................0
E[X|Y]:...................(1+c)/2 ................................c/2
X-E[X|Y]:..........[(c-1)/2, (1-c)/2]....................[-c/2, c/2 )

Solving, I got Var(X) = (c^2)/12

letting Z = X-E[X|Y]

How do I solve for Var(Z)

Last edited: Aug 30, 2006