Bivariate Normal Surface, Conditional Slices, and Regression Lines
In the bivariate normal distribution centered at $(\mu_1,\mu_2)=(0,0)$ with standard deviations $\sigma_1,\sigma_2>0$ and correlation $\rho\in(-1,1)$, the joint pdf is
\[f_{\sssig XY}(x,y)=\frac{1}{2\pi\sigma_1\sigma_2\sqrt{1-\rho^{2}}}\exp\!\left(-\frac{1}{2}Q(x,y)\right)\]where the quadratic form in the exponent is
\[Q(x,y)=\frac{1}{1-\rho^{2}}\left[\left(\frac{x}{\sigma_1}\right)^{2}-2\rho\left(\frac{x}{\sigma_1}\right)\left(\frac{y}{\sigma_2}\right)+\left(\frac{y}{\sigma_2}\right)^{2}\right]\]The side-wall marginal pdfs are $f_{\sssig X}(x)=\phi(x;0,\sigma_1)$ and $f_{\sssig Y}(y)=\phi(y;0,\sigma_2)$. Slicing the surface along $X=x_0$ and dividing by $f_{\sssig X}(x_0)$ produces a homoscedastic normal conditional pdf:
\[Y\mid(X=x_0)\sim\mathcal{N}\!\left(\rho\frac{\sigma_2}{\sigma_1}x_0,\ \sigma_2^{2}(1-\rho^{2})\right)\]Its mean traces the population linear regression equation $\mathbb{E}(Y\mid X=x)=\rho\frac{\sigma_2}{\sigma_1}x$. When $0<\lvert\rho\rvert<1$, this direct regression line is flatter than the major axis (geometric ridge) of the equal-density ellipses $Q(x,y)=c$. Along a fixed vertical cut $X=x_0$, the slice attains its peak at the ellipse whose tangent at $x_0$ is vertical ($\partial Q/\partial y=0$), whereas the major axis crosses the downhill flank of the slice at a larger $\lvert y\rvert$, producing Galton’s regression toward the mean.
Parameters and spotlight modes to explore below:
- Ridge vs. slice peak: Click Spot ridge vs. peak (or select Ellipse ridge in the
Focusbar) to dim secondary layers and contrast the crimson regression line (filled peak dot) directly against the teal dashed ellipse major axis (hollow flank dot) in 3D, 2D contours, and the 1D slice. - Correlation $\rho=0$: Click ρ = 0 (indep.) and sweep $x_0$. The 3D crimson conditional arch stays identical in height and width to the side-wall marginal $f_{\sssig Y}(y)$ at every slice.
3D joint pdf, side-wall marginals, and slice
Drag or use arrow keys to rotate. Side walls display marginal pdfs; the base plane (z = 0) displays the regression curves.
Equal-density contours and regression
Click or drag on the plane to move the active slice. The filled dot marks the conditional mean on the slice.
Slice renormalization vs. marginal pdf
Raw slice fXY (ochre), normalized conditional pdf (crimson), and fixed marginal pdf (dashed violet) on a shared scale.