Math for Causal Inference
All simulators

Bivariate Normal in 3D

Drag to rotate the joint density; change the correlation and see the contours and the regression line.

Day 5: Joint Distributions, Covariance & Correlation
XY-202-3-2-10123X (standardised)Y (standardised)
simulated drawsdensity contoursE[Y | X] = ρx
ρ (true)
0.50
sample r
0.52
Var(Y | X)
0.75
1 − ρ²

Left: the joint density surface (drag to rotate). Right: its contour ellipses, 400 draws, and the conditional-mean line E[Y | X = x] = ρx (standardised variables).