Manipulate[Module[{x, y},
mysoln = Solve[{x, y}.Inverse[( {
{a[[1]] a[[1]], ρ a[[1]] a[[2]]},
{ ρ a[[1]] a[[2]], a[[2]] a[[2]]}
} )].{x, y} == 1, x, Reals] // Quiet;
Show[{
ParametricPlot3D[{{x /. mysoln[[1]], y, -.2}, {x /. mysoln[[2]],
y, -.2}}, {y, -5, 5},
PlotRange -> {{-5, 5}, {-5, 5}, {-.2, .3}},
ImageSize -> 700,
PlotStyle -> {{Thick, Green}, {Thick, Green}},
Ticks -> {{{xx,
Text[Style[
"\!\(\*OverscriptBox[SubscriptBox[\(x\), \(1\)], \
\(^\)]\)", 18, Italic, Red]]}}, None, None},
TicksStyle -> { Red, None, None},
BoxRatios -> {1, 1, 1},
AxesLabel -> {Text[
Style["\!\(\*SubscriptBox[\(x\), \(1\)]\)", Italic, 14]],
Text[Style["\!\(\*SubscriptBox[\(x\), \(2\)]\)", Italic, 14]],
Text[Style["p(x)", Italic, 16]]}],
Plot3D[PDF[MultinormalDistribution[{0, 0}, ( {
{a[[1]] a[[1]], ρ a[[1]] a[[2]]},
{ ρ a[[1]] a[[2]], a[[2]] a[[2]]}
} )], {x, y}], {x, -5, 5}, {y, -5, 5},
PlotStyle -> Opacity[0.7],
PlotPoints -> 20,
PlotRange -> {{-5, 5}, {-5, 5}, {-.2, .3}}, Mesh -> {{0}},
MeshFunctions -> {#1 - xx &}, MeshStyle -> {Thick, Red},
ImageSize -> 700,
Ticks -> {{{xx,
Text[Style[
"\!\(\*OverscriptBox[SubscriptBox[\(x\), \(1\)], \
\(^\)]\)", 18, Italic, Red]]}}, None, None},
TicksStyle -> { Red, None, None}, BoxRatios -> {1, 1, 1},
AxesLabel -> {Text[
Style["\!\(\*SubscriptBox[\(x\), \(1\)]\)", Italic, 14]],
Text[Style["\!\(\*SubscriptBox[\(x\), \(2\)]\)", Italic, 14]],
Text[Style["p(x)", Italic, 16]]}],
Graphics3D[{Opacity[0.5],
Polygon[{{xx, -5, 0}, {xx, -5, .3}, {xx, 5, .3}, {xx, 5,
0}, {xx, -5, 0}}]},
PlotRange -> {{-5, 5}, {-5, 5}, {-.2, .3}},
Ticks -> {{{xx,
Text[Style[
"\!\(\*OverscriptBox[SubscriptBox[\(x\), \(1\)], \
\(^\)]\)", 18, Italic, Red]]}}, None, None},
TicksStyle -> { Red, None, None}, BoxRatios -> {1, 1, 1},
AxesLabel -> {Text[
Style["\!\(\*SubscriptBox[\(x\), \(1\)]\)", Italic, 14]],
Text[Style["\!\(\*SubscriptBox[\(x\), \(2\)]\)", Italic, 14]],
Text[Style["p(x)", Italic, 16]]}],
ParametricPlot3D[{-5, y,
PDF[NormalDistribution[ρ xx a[[2]]/a[[1]],
a[[2]] Sqrt[1 - ρ^2]], y]}, {y, -5, 5},
PlotRange -> {{-5, 5}, {-5, 5}, {-.2, .3}},
PlotStyle -> {Thick, Red},
Ticks -> {{{xx,
Text[Style[
"\!\(\*OverscriptBox[SubscriptBox[\(x\), \(1\)], \
\(^\)]\)", 18, Italic, Red]]}}, None, None},
ImageSize -> 700, TicksStyle -> { Red, None, None},
BoxRatios -> {1, 1, 1},
AxesLabel -> {Text[
Style["\!\(\*SubscriptBox[\(x\), \(1\)]\)", Italic, 14]],
Text[Style["\!\(\*SubscriptBox[\(x\), \(2\)]\)", Italic, 14]],
Text[Style["p(x)", Italic, 16]]}]
}]],
{{a, {1, 1},
"\!\(\*SubscriptBox[\(σ\), \(1\)]\) , \!\(\*SubscriptBox[\(\
σ\), \(2\)]\)"}, {1, 1}, {2, 2}}, {{ρ,
0}, -.85, .85, .05}, {{xx, 0,
Text[Style[
"\!\(\*OverscriptBox[SubscriptBox[\(x\), \(1\)], \(^\)]\)", 14,
Italic, Red]]}, -5, 5, .2},
AutoAction -> False]