To give an example for a multiparametric distribution let us take a binormal distribution:
binormalDist = With[
{
μ = { 0, 0 },
σ = { 1, 1 },
ρ = 7/10
},
BinormalDistribution[ μ, σ, ρ ]
];
Calculating the conditional expectation in simple cases works out:
NExpectation[2 x + 3 \[Conditioned] x < 1., {x, y} \[Distributed] binormalDist ]
2.4248
and so does this too:
NExpectation[2 x + 3 \[Conditioned] y == 2., {x, y} \[Distributed] binormalDist ]
5.8
but
NExpectation[2 x + 3 \[Conditioned] (x < 1 && y == 2.), {x, y} \[Distributed] binormalDist ]
is returned unevaluated (as is Expectation
with identical args)
NExpectation[ 3+ 2 x [Conditioned] x < 1 && y == 2., {x, y} [Distributed] BinormalDistribution[{0, 0}, {1, 1}, 7/10]]
Why? And how can it be solved?