In version 10.0.2 Mathematica is using an incorrect standardization rule
Statistics`Library`StandardizationRules[{x, y},
MultinormalDistribution[{0, 0}, {{2, 0.5}, {0.5, 1}}]]
{{x -> x/Sqrt[2], y -> y},
MultinormalDistribution[{0, 0}, {{1, 0.353553}, {0.353553, 1}}]}
This is incorrect as
Expectation[(x y)/Sqrt[2],
{x, y} \[Distributed] MultinormalDistribution[{0, 0}, {{1, 0.35355339059327373`}, {0.35355339059327373`, 1}}]]
0.25
shows.
The nonnumerical expectation
Expectation[x*y, {x, y} \[Distributed] MultinormalDistribution[{0, 0}, S]]
0.5
gives a correct result.
Using the option Method -> "MonteCarlo"
gives a correct approximation
NExpectation[x*y, {x, y} \[Distributed] MultinormalDistribution[{0, 0}, S],
Method -> "MonteCarlo"]
0.498123
Using NIntegrate
directly gives a correct result
NIntegrate[
x*y PDF[MultinormalDistribution[{0, 0}, S], {x, y}],
{x, -Infinity, Infinity}, {y, -Infinity, Infinity}]
0.5
Symbolic:
Statistics`Library`StandardizationRules[{x, y},
MultinormalDistribution[{0, 0}, {{s11, s12}, {s21, s22}}]]
{{x -> x/Sqrt[s11], y -> y/Sqrt[s22]},
MultinormalDistribution[{0, 0},
{{1, 1/2 (s12/(Sqrt[s11] Sqrt[s22]) + s21/(Sqrt[s11] Sqrt[s22]))},
{1/2 (s12/(Sqrt[s11] Sqrt[s22]) + s21/(Sqrt[s11] Sqrt[s22])), 1}}]}
Expectation[
x/Sqrt[s11]*y/Sqrt[s22],
{x, y} \[Distributed] MultinormalDistribution[{0, 0},
{{1, 1/2 (s12/(Sqrt[s11] Sqrt[s22]) + s21/(Sqrt[s11] Sqrt[s22]))},
{1/2 (s12/(Sqrt[s11] Sqrt[s22]) + s21/(Sqrt[s11] Sqrt[s22])), 1}}]]
(s12 + s21)/(2 s11 s22)
But
Expectation[
x*y,
{x, y} \[Distributed] MultinormalDistribution[{0, 0}, {{s11, s12}, {s21, s22}}]]
s21
0.5
and0.5
(Mathematica 10.0.0, Windows 8.1) DidS
accidentally get redefined before your second evaluation? $\endgroup$0.5
and0.25
using v10.0.2 on a Mac; however.Expectation
rather thanNExpectation
gives0.5
for both distributions. $\endgroup$