A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Simple Linear Regression: Theory and Estimation

College Depth 106 in the knowledge graph ☐ I know this ☆ Set as goal
2topics build on this
552prerequisites beneath it
See this on the map →
Covariance and Correlation CoefficientsLinear Regression Basics+1 more→→Hypothesis Tests and Inference in RegressionModeration and Interaction Effects in Conditional Relationships
linear-regression

Core Idea

Fit Y=β₀+β₁X+ε by minimizing Σε². Least squares: β₁=Cov(X,Y)/Var(X)=r(s_Y/s_X), β₀=Ȳ−β₁X̄. Under normality, LS is MLE. R²=correlation² is proportion of Y variance explained. Residuals ê_i=y_i−ŷ_i should be random.

Explainer

You already know that covariance and correlation measure how two variables move together. Simple linear regression takes that relationship and converts it into a predictive machine: given X, what is our best guess for Y? The model posits a straight line Y = β₀ + β₁X + ε, where ε represents random noise. The question becomes: which line fits best?

Ordinary least squares (OLS) answers that by minimizing the sum of squared residuals — the vertical distances between each observed point and the proposed line. Squaring the errors penalizes large misses more than small ones, making the solution unique and analytically tractable. Taking derivatives and setting them to zero yields the formulas: β₁ = Cov(X,Y)/Var(X) and β₀ = Ȳ − β₁X̄. Notice the slope formula: it is covariance (how much X and Y move together) scaled by variance (how spread-out X is). If X and Y are unrelated, Cov = 0, so β₁ = 0 — a flat line that ignores X entirely.

The equivalent form β₁ = r(sY/sX) gives a second interpretation. The correlation r captures the direction and strength of the relationship; the ratio sY/sX rescales it from correlation units into the actual units of Y per unit of X. This is why two datasets can have the same correlation but very different slopes — the slopes also depend on the relative spread of the variables.

R² — the coefficient of determination — measures how much of Y's total variation the model explains. It equals r² = 1 − SSRes/SSTotal, ranging from 0 (the line explains nothing beyond the mean) to 1 (perfect fit). Since R² is the square of the correlation, all the intuition you built about correlation directly transfers. After fitting, always inspect the residuals ê_i = y_i − ŷ_i. If the model is correctly specified, residuals should look like random noise: no pattern, no fan shape, no curve. Any structure in the residuals signals a problem — the relationship may be nonlinear, or the variance may change with X — and points toward the regression diagnostics you will study next.

Practice Questions 5 questions

Prerequisite Chain

Understanding Zero → The Number Zero → Counting to Five → Counting to 10 → Counting to 20 → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Addition Within 10 → Number Bonds to 10 → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts (0s, 1s, 2s, 5s, 10s) → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Comparing and Ordering Integers → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Dividing Integers → Unit Rates → Proportions → Percent Concept → Converting Between Fractions, Decimals, and Percents → Operations with Rational Numbers → Two-Step Equations → Solving Multi-Step Equations → Equations with Variables on Both Sides → Angle Pairs: Complementary, Supplementary, and Vertical → Parallel Lines and Transversals → Corresponding Angles → Alternate Interior Angles → Triangle Angle Sum Theorem → Exterior Angle Theorem → Triangle Inequality Theorem → Similar Triangles: AA Similarity → Similar Triangles: SSS and SAS Similarity → Proportions in Similar Triangles → Right Triangle Trigonometry Introduction → Sine, Cosine, and Tangent Ratios → Trigonometric Ratios Review → Radian Measure → Converting Between Degrees and Radians → The Unit Circle → Graphing Sine and Cosine → Graphing Tangent and Reciprocal Trigonometric Functions → Derivatives of Trigonometric Functions → Antiderivatives → Indefinite Integrals → Basic Integration Rules → Riemann Sums → Definite Integral Definition → Probability Density Functions and Continuous Distributions → Cumulative Distribution Functions → Continuous Random Variables → Probability Density Functions → Expected Value → Weak Law of Large Numbers → Probability Axioms and Rules → Conditional Probability → Independence of Events → Sampling Distributions → Standard Error of Estimators → Hypothesis Testing: Framework and Logic → P-values and Statistical Significance → Effect Size and Practical Significance → Hypothesis Testing: Framework and Logic → Z-Tests and T-Tests for Means → One-Sample Z-Test for Means → One-Sample and Two-Sample T-Tests → Inference in Linear Regression → Prediction Intervals in Regression → Linear Regression Basics → Simple Linear Regression: Theory and Estimation

Longest path: 107 steps · 552 total prerequisite topics

Prerequisites (3)

Leads To (2)