#P08 · Probability, Statistics & AI · Lv.3View in 3D Mind-Map

Pearson Correlation & Linear Regression (OLS)

Francis Galton, Karl Pearson & Carl Friedrich Gauss · 1895 CE

rXY=Cov⁡(X,Y)σXσY,β^1=Cov⁡(X,Y)Var⁡(X)=rXYσYσXr_{XY} = \frac{\operatorname{Cov}(X,Y)}{\sigma_X \sigma_Y}, \quad \hat{\beta}_1 = \frac{\operatorname{Cov}(X,Y)}{\operatorname{Var}(X)} = r_{XY}\frac{\sigma_Y}{\sigma_X}
y^=β^1x+β^0,β^0=yˉ−β^1xˉ\hat{y} = \hat{\beta}_1 x + \hat{\beta}_0, \quad \hat{\beta}_0 = \bar{y} - \hat{\beta}_1 \bar{x}

Quantifies linear association between two variables via Pearson correlation r ∈ [-1,1] and fits the optimal predictive line by minimizing squared residuals.

🧮 Live Formula Calculator & Plotter
Covariance Cov(X,Y)
Std Dev σ_X
Std Dev σ_Y
r=185×4.5=0.800,β^1=0.720r = \frac{18}{5\times 4.5} = 0.800, \quad \hat{\beta}_1 = 0.720
피어슨 상관계수 r
0.8000
결정계수 R² (설명력)
64.0%
회귀 기울기 β̂₁
0.7200

Prerequisite Path (20 STEP)

Full Path Analyzer

Click steps in order to follow the 3D neon path from basics to target.

STEP 1#G03Pi, Radian Measure & Circular Sector
STEP 2#G01Pythagorean Theorem
STEP 3#P01Permutations & Combinations
STEP 4#A02Polynomial Expansion & Factoring
STEP 5#A03Laws of Exponents & Radicals
STEP 6#L01Vector Operations, L1/L2 Norms & Normalization
STEP 7#A01Linear Equation & Balance Axiom
STEP 8#A06Logarithm Laws & Change of Base
STEP 9#G04Unit Circle Trigonometry & Identities
STEP 10#G022D/3D Euclidean Distance Formula
STEP 11#C01Limits, Continuity & Euler's Number e
STEP 12#G05Law of Sines & Law of Cosines
STEP 13#P02Conditional Probability & Chain Rule
STEP 14#A08Binomial Theorem & Pascal's Triangle
STEP 15#C02Derivative Definition & Instantaneous Rate
STEP 16#L02Dot Product & Cosine Similarity
STEP 17#P04Expected Value & Variance
STEP 18#C03Product Rule & Chain Rule (Backpropagation Core)
STEP 19#C08Partial Derivatives & Gradient Vector (∇f)
STEP 20#P08Pearson Correlation & Linear Regression (OLS)

Geometric & Intuitive Insight

중심화한 데이터 벡터의 내적(코사인 유사도)이 곧 피어슨 상관계수 r이며, 잔차 제곱합을 미분해 0으로 두면 회귀 기울기가 유도됩니다.

Step-by-Step Derivation

  1. Step 1.손실함수 L(β₀, β₁) = ∑(y_i - (β₁x_i + β₀))²을 β₀, β₁에 대해 각각 편미분하여 0으로 둡니다.
  2. Step 2.∂L/∂β₀ = 0에서 회귀직선이 반드시 무게중심 (x̄, ȳ)를 지남을 얻습니다: β₀ = ȳ - β₁x̄.
  3. Step 3.∂L/∂β₁ = 0을 정리하면 β₁ = Cov(X,Y) / Var(X) = r (σ_Y / σ_X)가 도출됩니다.

AI & Coding Real-World Use

Foundation of supervised machine learning linear predictors, quant finance portfolio Beta (β), and feature correlation analysis.

#Linear Regression#Supervised ML#Quant Finance Beta#Feature Engineering
const slope = covXY / varX; const intercept = meanY - slope * meanX; const r = covXY / Math.sqrt(varX * varY);

Probability, Statistics & AI — Related Formulas in This Cluster