I am interested in finding a conditional expectation of a multivariate Normal distribution. For example, let $X$ and $Y$ denote two random variables with a joint normal distribution.
Let $X \sim N(\mu_x, \sigma_x)$, $Y\sim N(\mu_y, \sigma_y)$ and $Cov(X,Y) = \sigma^{2}_{x}$
I want to compute for example $E(X|Y)$. While I know how to get this using paper and pencil, I want to learn how one would go about computing the general solution in Mathematica.
To this end I wrote the following code:
Expectation[
x \[Conditioned] y
,{x,y} \[Distributed] MultinormalDistribution[{Subscript[μ, x], Subscript[μ,y]}, {{Subscript[σ,x]^2,Subscript[σ,x]^2 }, {Subscript[σ,x]^2 ,Subscript[σ,x]^2+ Subscript[σ, y]^2}}]
]
Unfortunately, the only output I get it just what I wrote as the input. There is no solution. How can I compute the conditional expectations I want?
Subscript
while defining symbols (variables). We know they look nice, butSubscript[x, 1]
is not a symbol, but a composite expression whereSubscript
is an operator without built-in meaning. You expect to do $x_1=2$ but you are actually doingSet[Subscript[x, 1], 2]
which is to assign aDownValues
to the operatorSubscript
and not anOwnValues
to an indexedx
as you may intend. Read how to properly define indexed variables here $\endgroup$