04 // Interactive Formula Compendium // STATISTICSr = Cov(X, Y) / (s_X · s_Y), β₁ = r · (s_Y / s_X)
Pearson Correlation & OLS Linear Regression Slope Formula
Pearson's correlation r = Cov(X,Y)/(s_X·s_Y) quantifies linear association on [−1, +1], while the Ordinary Least Squares slope β₁ = r·(s_Y/s_X) minimizes vertical squared residuals ∑(y_i − ŷ_i)².
Formula Reference
Main Formula
r = Cov(X, Y) / (s_X · s_Y), β₁ = r · (s_Y / s_X)
Rearranged Forms
β₀ = ȳ − β₁ · x̄
R² = 1 − (SS_res / SS_tot)
Variables & Units
| Symbol | Name | Unit |
|---|---|---|
| b1 | OLS Regression Slope β₁ | ΔY / ΔX |
| r | Pearson Correlation r | −1 to +1 |
| sy | Sample Std Dev s_Y | Y units |
| sx | Sample Std Dev s_X | X units |
Inputs & Parameters
[−1 to +1]
[Y units]
[X units]
Calculated Result (OLS Regression Slope β₁)
b1 =2.46ΔY / ΔX
Formula Notes & Background
- Setting partial derivatives ∂/∂β₀ and ∂/∂β₁ of S(β₀,β₁) = ∑(y_i − β₀ − β₁x_i)² to zero yields the normal equations: ȳ = β₀ + β₁x̄ and β₁ = S_xy / S_xx.
- In simple bivariate linear regression, the coefficient of determination R² equals the square of Pearson's r.
Step-by-Step Examples
#1: Study hours X (s_X = 6.0 hr) vs. exam score Y (s_Y = 18.0 pts) with observed correlation r = 0.82.
r = 0.82s_Y = 18.0s_X = 6.0
β₁ = 0.82 × (18.0 / 6.0) = 0.82 × 3.0; R² = 0.82²
→ Slope β₁ = +2.46 pts/hr; R² = 0.6724 (67.2% variance explained)
#2: Regression to the mean: if a student scores +2σ above mean on X with r = 0.60, what is expected Z_Y?
Z_X = +2.0r = 0.60
E[Z_Y | Z_X] = r · Z_X = 0.60 × 2.0
→ Z_Y = +1.20 standard deviations
Was this tool helpful?
Frequently Asked Questions
Does r = 0 prove two variables are independent?+
No — r = 0 only indicates zero linear correlation; symmetric nonlinear relationships like Y = X² on [−1, 1] have r = 0 despite exact deterministic dependence.
Does swapping X and Y change Pearson's r or slope β₁?+
Pearson's r is symmetric (r_XY = r_YX), whereas slope β₁ is asymmetric because it minimizes vertical errors in Y rather than horizontal errors in X.
Why is Pearson r sensitive to outliers?+
Because deviations from the mean are multiplied and squared; a single high-leverage outlier can swing r dramatically (use Spearman rank ρ for robustness).