My professor made a rather concise statement in class, which sums to this: E(Y|X=x(adsbygoogle = window.adsbygoogle || []).push({}); _{i}) = constant. E(Y|X )= variable. Could anyone help me understand how the expectation is calculated for the second case? I understand that for different values of x_{i}, we'll have different values for the expectation. This is where my thoughts are all muddled up:

E(Y|X)=[itex]\sum[/itex]_{i}y_{i}*P(Y=y_{i}|X) = [itex]\sum[/itex]_{i}y_{i}* P(X|Y=y_{i})*P(Y=y_{i})/P(X).

Could anyone explain the above computation, and how that is a variable? Also, it is my understanding that summing the probability P(Y=y_{i}|X) over all values of Y won't be 1. Is this true?

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Conditional Expectation of a random variable

**Physics Forums | Science Articles, Homework Help, Discussion**