Data points OLS fit line Covariance ellipse (1σ / 2σ)

Pearson Correlation & Covariance Ellipse Explorer (2D)

This simulator generates a synthetic bivariate dataset from a target population correlation ρ that you set, renders it as a flat 2D scatter plot, and computes the real sample statistics live: the Pearson correlation coefficient r, the covariance, the R² of a least-squares fit, and the slope of that fit line. It additionally decomposes the sample's 2×2 covariance matrix into its eigenvalues and eigenvectors and draws the resulting 1σ/2σ confidence ellipse — a genuinely 2D visualization of how "spread along a direction" relates to correlation that a rotating 3D point cloud cannot show as cleanly. Adjusting sample size shows how the measured r and the ellipse shape converge toward their population values as N grows, and adjusting spread demonstrates that r, the ellipse tilt, and its aspect ratio are all invariant to the scale of the data even though the cloud looks wider or narrower.