# Conditional expectation of normal distribution conditioned on mean

Given random variables $X \sim N(0, \sigma^2_x)$ and $Y \sim N(X, \sigma^2_y)$, solve $\mathbb{E}[Y|X]$.

My attempt:

$\mathbb{E}[Y|X] = \int_{-\infty}^{\infty} y \; P_{Y|X} (Y|X) \; dy$

But I do not have the expression for $P_{Y|X} (Y | X)$, just the normal distributions for the $x$ and $y$.

Is the expectation of a normally distributed variable conditioned on its mean equals to the expectation of the variable? That is:

$\mathbb{E}[Y|X] = \mathbb{E}[Y] = X$

I don't see how conditioning on the mean (not its value) would change the expectation of $Y$.

I also tried expressing $Y$ in terms of $X$ by substituting the normal distribution into $\mathbb{E}[Y|X]$, but I think that is not mathematically correct.

• One cannot write sums to deal with continuous random variables. Even more fundamentally, you avoided carefully to answer this query about your previous question, query which seems quite appropriate about the present one as well: "Re the content of your post, it is so far from a mathematically competent approach that one can only ask: how was the notion of conditional expectation defined to you?" – Did Mar 12 '18 at 19:05
• I thought that was a rhetorical qns. My understanding of conditional expectation is the expected value of a random variable given the conditioned set. So in this case, given the evidence X=x, what is the expected value of Y. What confuses me is that the qns did not specify the value x. So in this case, $E[Y|X] = h(X)$, that is, the conditional expectation is a random variable which is function of the random variable X. How to solve $h(X)$, that I do not know. – Kevin Mar 12 '18 at 19:20
• I think what you mean is $Y\mid X=x\sim N(x,\sigma_y^2)$, right? So you know $f_{Y\mid X}(Y\mid X=x)$ and you can finish the calculation. Some notes: you set $P_{Y\mid X}(Y\mid X=x)$ instead of the conditional density. Moreover it would be nice to be consistent in writing $y$ and $Y$, small and capital letter. – Shashi Mar 12 '18 at 19:32
• Sorry, I actually meant $f_{Y\mid X}(y|x)$, bad from me that I was (ironically) not consistent with the capital and small letters. Okay you know $f_{Y|X}(y\mid x)$ (that is the normal distr. density with $\mu=x$). Then one defines $E[Y\mid X=x]$ for continuous r.v. as $$E[Y\mid X=x]=\int_\mathbb{R}yf_{Y|X}(y\mid x)\,dy$$ which is .....? You actually have the right answer in your post, but how you derived it is a lil bit messy.. – Shashi Mar 12 '18 at 19:43
• $\int_{-\infty}^{\infty}\frac{y}{\sqrt{2\pi\sigma_y^2}}e^{-\frac{(y-x)^2}{2\sigma_y^2}}dy = \int_{-\infty}^{\infty}\frac{y-x+x}{\sqrt{2\pi\sigma_y^2}}e^{-\frac{(y-x)^2}{2\sigma_y^2}}dy = x.$ – Gordon Mar 12 '18 at 20:11