12. Let $(X, Y)$ be a Gaussian system, where $Y$ is a random variable in $\mathbb{R}$, and $X$ is a random vector in $\mathbb{R}^{d}$. Determine the structure of the conditional expectations $\mathrm{E}\left(Y^{n} \mid X=x\right), n \geqslant 1$.
Solution. We will assume that $\mathrm{E} X=0$ (otherwise, we subtract $\mathrm{E} X$ from $X$). Due to problem II.13.9, the quantity $Z=Y-\mathrm{E} Y X^{*} \cdot(\mathrm{D} X)^{+} X$ is independent of the vector $X$. Therefore,

$$
\begin{aligned}
& \mathrm{E}\left(Y^{n} \mid X=x\right)=\mathrm{E}\left(Z+\mathrm{E} Y X^{*} \cdot(\mathrm{D} X)^{+} x\right)^{n}= \\
&=\sum_{k=0}^{n} C_{n}^{k}\left(\mathrm{E} Z+\mathrm{E} Y X^{*} \cdot(\mathrm{D} X)^{+} x\right)^{n-k} \mathrm{E}(Z-\mathrm{E} Z)^{k}
\end{aligned}
$$

or

$$
\mathrm{E}\left(Y^{n} \mid X=x\right)=\sum_{k \leqslant n / 2} C_{n}^{2 k}\left(\mathrm{E} Z+\mathrm{E} Y X^{*} \cdot(\mathrm{D} X)^{+} x\right)^{n-2 k} \frac{(2 k)!}{2^{k} \cdot k!}(\mathrm{D} Z)^{k}
$$