# Conditional expectation of dependent variable provided relationship

Suppose I have two random variables, $$X$$ with PDF $$f_X$$, and $$Y$$. Moreover, I know that $$Y = h(X)$$, and I do know the $$h(x)$$. Now I want to calculate the conditional expectation of $$Y$$ given $$X$$: $$E[Y|X] = E[h(X)|X = x] = E[h(X)] = \int_{-\infty}^{\infty} h(x) f_X(x)dx$$

Is that correct, that despite not knowing the joint PDF of $$X$$ and $$Y$$, I can still calculate the conditional expectation of random variable $$Y$$?

• It seems to me things are much simpler than that, if $h(X)$ represents a deterministic function. In that case, $E[Y|X=x]=h(x)$. Thus, it seems you mean that $h(X)$ is a one-parameter distribution: is it correct? Commented Dec 2, 2022 at 13:12
• You are right, it was much simpler than that. For example, I could have had X ~ N(0, 1) and Y = sin(X). Commented Dec 2, 2022 at 13:38
• Then I would say that your formula is correct. However, I don't understand why you say that you don't know the joint PDF of $X$ and $Y$: you know the conditional one for any value of $X$ and the marginal one of $X$, thus I'd say you can derive it. Commented Dec 2, 2022 at 13:44
• Your first equality is just wrong. In general $E[Y|X] \neq E[Y|X = x]$, because $E[Y|X]$ is a random variable (more specifically, a function of $X$, say $g(X)$ -- but it is still a random variable), while $E[Y|X = x]$ is a fixed real value (more specifically, it equals to $g(x)$, i.e., the value of $g(X)$ evaluated at the set $\{\omega: X(\omega) = x\}$, which happens to be $g(x)$). Commented Dec 2, 2022 at 13:56
• If you know $Y = h(X)$, then $E[Y|X] = E[h(X)|X] = h(X)$, by the very basic property of conditional expectation ("take out what is known"). There is no need to bring pdf $f_X$ into the discussion. Commented Dec 2, 2022 at 13:59

Since $$Y$$ is a function of $$h(X)$$ then in your case you have some 'knowledge' on $$Y$$, hence it would not be extraordinary to be able to calculate the conditional expectation of $$Y$$, because it is equivalent to calculating the conditional expectation of a function of $$X$$, in your case $$h(X)$$