# Conditional Variance equation

1. Jul 19, 2012

### waealu

I am working on studying for a probability exam and I just came across conditional variance, but I can't find anything in my materials for how to solve it.

If I want to find the conditional variance of Y given that X=x, or Var[Y|X=x], how would I solve it? I am given a continuous distribution function of:

f(x,y) = 2x, for 0<x<1, x<y<x+1
otherwise 0.

How do I set up this question?

Thanks!

2. Jul 19, 2012

### waealu

Sorry, I think I posted this in the wrong part of the forum. I re-posted it in the Homework help section.

3. Jul 19, 2012

### chiro

Hey waealu and welcome to the forums.

Given VAR[Y|X=x] = E[Y^2|X=x] - (E[Y|X=x])^2, what can you do to calculate the variance?

4. Jul 19, 2012

### waealu

I understand that's how you could get the conditional variance, but how do you get the conditional expectation.

Is it E[Y|X=x]=∫ y*f(y|x)*dy ?

Where f(y|x) = f(x,y) / f(x) ?

5. Jul 19, 2012

### chiro

You integrate out the y component and get an expectation in terms of some x. So usually for getting the expectation of a bi-variate distribution, you integrate across some two-dimensional region, but since it is conditional you are going to integrate with respect to dy and you will get a conditional expectation in terms of some parameter for X=x.

The easiest way to think of it is that for each value of x there is a 'slice' that is in the y-z axis that corresponds to a univariate distribution in terms of y for a fixed x. So if think of the individual slices corresponding to x-values, you have a different univariate distribution for every valid value of x and you are finding an expectation conditioned on a particular value of x. Because you don't specify the x-value it becomes a parameter.

So the conditional expectation assuming E[Y|X=x] is Integral(y-minimum,ymaximum)yf(x,y)dy.