- #1

- 1

- 0

_{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?