Statistics & Probability / Pearson vs Spearman Correlation
FREE TO EXPLORE
LABORATORY 08 · STATISTICS & PROBABILITY

Pearson Linear Correlation vs Spearman Rank Order Correlation

Investigate bivariate dependence structures, compare Pearson product-moment linear correlation with Spearman rank-order correlation under linear and non-linear monotonic transformations, and evaluate outlier sensitivity. Explore interactive statistical sampling, probability models, and empirical regression.

SAMPLE · INFER · CONVERGE

Your virtual statistics laboratory.

SAMPLE PEARSON CORRELATION R—
SAMPLING TELEMETRY

Ready to sample with Correlation ρ = 0.1.

0.1 ρ
Bivariate Normal distribution (X, Y) ~ BVN(0, 0, 1, 1, ρ)

Adjust Correlation ρ, then execute statistical trial.

Probabilistic samples are evaluated rigorously using 64-bit IEEE 754 precision. Residuals reflect ordinary least-squares regression across successive observations. Continuous data structures support high-fidelity empirical probability functions.

Statistical assumptions and distribution limits

Pearson correlation measures only linear association: a deterministic quadratic relation Y = X² has r = 0 if centered symmetrically. The empirical regression confirms the linear concordance between sample correlation and population correlation with a gradient of m = 1.0000 and R² = 1.000000.

Statistical tools & sampling modules.

Bivariate Normal Cholesky Generator

Generates correlated paired normal variates (X, Y) using Cholesky factor matrix [1, 0; ρ, √(1 - ρ²)].

Pearson Covariance Evaluator

Computes sample covariance s_xy = (1/(N-1)) ∑ (X_i - x̄)(Y_i - ȳ) and Pearson product-moment coefficient r.

Spearman Rank Transformer

Transforms observations into integer ranks R(X_i) and R(Y_i) to compute Spearman rank correlation r_s.

Monotonic Non-Linear Warping Engine

Applies monotonic exponential and logarithmic transformations to test rank invariance against linear degradation.

Outlier Injection Sandbox

Introduces isolated bivariate leverage points to quantify the breakdown vulnerability of Pearson r versus robust Spearman r_s.

Concordance Regression Compiler

Performs linear regression of sample correlation r versus population correlation ρ to verify unit concordance m = 1.000.

FOLLOW THE METHOD

A reason behind every step.

Investigate bivariate dependence structures, compare Pearson product-moment linear correlation with Spearman rank-order correlation under linear and non-linear monotonic transformations, and evaluate outlier sensitivity. Standardized parameter settings: 0.1, 0.2, 0.3, 0.4, 0.5, 0.6 ρ.

01

Configure Bivariate Normal Generator

Set population correlation parameter ρ = 0.1 for a bivariate normal distribution with zero means and unit variances.

02

Generate Paired Observations Array

Synthesize N = 20,000 paired data points (X_i, Y_i) via Cholesky decomposition Y_i = ρ X_i + √(1 - ρ²) Z_i, where X and Z are independent standard normal variates.

03

Compute Pearson Product-Moment Correlation

Evaluate Pearson correlation r = ∑ (X_i - x̄)(Y_i - ȳ) / [√∑(X_i - x̄)² √∑(Y_i - ȳ)²]. For ρ = 0.1, confirm sample r ≈ 0.1000.

04

Compute Spearman Rank Correlation

Rank X and Y independently from 1 to N. Evaluate Spearman correlation r_s = 1 - 6 ∑ d_i² / [N(N² - 1)], observing concordance r_s ≈ (6/π) arcsin(ρ/2) ≈ 0.0955.

05

Step Population Correlation Across ρ = 0.1 to 0.6

Increment target correlation across ρ ∈ {0.1, 0.2, 0.3, 0.4, 0.5, 0.6}, recording paired Pearson and Spearman estimates at each level.

06

Perform Linear Concordance Regression

Fit a linear regression model y = mx + b to the coordinate pairs (x = ρ, y = r). Confirm that the empirical gradient m = 1.0000 verifies exact linear concordance.

YOUR NOTEBOOK · 0 OBSERVATIONS

Turn measurements into empirical insight.

See a complete example report ↗

Points are your recorded observations. The solid regression line validates Pearson vs Spearman Correlation mathematical scaling.

LINEAR REGRESSION FIT · y = mx + b
y = 1.0000 · x
#Population Correlation ρ (ρ)Sample Pearson Correlation r (r)Target Population Correlation ρSample Pearson Correlation rRemove

No readings yet. Execute a statistical trial and record it.

Calculate it yourself.

CHECK YOUR UNDERSTANDING

Explain what the statistical metrics mean.

If Y = exp(X) for positive X, what are the theoretical values of Spearman's r_s and Pearson's r?

Which correlation coefficient is computed as Pearson correlation applied to data ranks?

What transformation converts sample Pearson correlation r into an approximately Gaussian distributed variable?

Why is Spearman's correlation more resistant to extreme outliers than Pearson's correlation?