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

Simple (Bivariate) OLS Regression

College Depth 107 in the knowledge graph ☐ I know this ☆ Set as goal
189topics build on this
569prerequisites beneath it
See this on the map →
Correlation CoefficientLinear Regression and Least Squares Estimation+6 more→→Beta and Systematic RiskClassical OLS Assumptions (Gauss-Markov)+5 more
OLS regression estimation

Core Idea

Simple OLS regression fits the line ŷ = β₀ + β₁x that minimizes the sum of squared residuals between observed and predicted values of y. The slope estimator β̂₁ equals Cov(x,y)/Var(x), capturing how much y is predicted to change per unit increase in x. OLS is the default workhorse of empirical economics because it is computationally tractable and, under standard assumptions, produces unbiased and efficient estimates. The intercept β̂₀ gives the predicted value of y when x equals zero, though this is often not economically meaningful.

How It's Best Learned

Derive the OLS formulas by hand from the minimization problem before using software. Then replicate published regressions in a dataset like wage-education data to see how coefficient interpretation works in context.

Common Misconceptions

Explainer

Simple OLS regression answers a basic but important question: given data on two variables x and y, what is the best-fitting straight line through those points, and what does the slope of that line tell us? You have already worked with the correlation coefficient, which measures the strength and direction of a linear relationship. OLS regression goes further — it produces an actual line with a quantified slope that can be used to predict y from x and to estimate by how much y is expected to change for each unit increase in x.

The "best-fitting" line is defined precisely as the one that minimizes the sum of squared residuals — the sum of the squared vertical distances between each observed data point and the corresponding point on the line. This criterion is not arbitrary: summing raw (unsquared) residuals fails because positive and negative errors cancel, making it impossible to distinguish a good fit from a bad one. Squaring forces all residuals to contribute positively, and the unique line that minimizes this sum is the OLS line. Taking the derivative of the sum-of-squares expression with respect to the slope and intercept, setting both to zero, and solving yields closed-form formulas: β̂₁ = Cov(x, y) / Var(x) and β̂₀ = ȳ − β̂₁x̄. These are the OLS estimators.

The slope β̂₁ has a clean interpretation: it is the predicted change in y for a one-unit increase in x, holding everything else constant — though in a bivariate model there is no "everything else," so it simply captures the average linear relationship between the two variables. The intercept β̂₀ is the predicted value of y when x = 0, which is mathematically necessary but often economically meaningless (e.g., the predicted wage when education = 0 years). Notice that β̂₁ equals Cov(x,y)/Var(x): it is the covariance of x and y normalized by the variance of x. A larger covariance means a steeper slope; a larger variance in x (more spread in the predictor) means a flatter slope for the same covariance.

The most important limitation of OLS is that it estimates a conditional mean, not a causal effect. The regression line tells you that, on average in your data, a one-unit increase in x is associated with a β̂₁-unit change in y. It does not tell you that changing x causes y to change by that amount. If education and wages are positively correlated, OLS will give a positive slope — but that slope reflects the sum of every reason why educated people earn more, including unobserved factors like family background or ability that are correlated with both. Establishing causality requires additional assumptions or research designs (instrumental variables, natural experiments, randomized control) that you will study in later topics. For now, treat OLS as a tool for describing associations precisely — which is already enormously useful.

Practice Questions 3 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 → Residuals and Goodness of Fit (R²) → Simple (Bivariate) OLS Regression

Longest path: 108 steps · 569 total prerequisite topics

Prerequisites (8)

Leads To (7)