Wednesday, November 18, 2026
Data from SEC filings, checked daily
My DeskFree
Public filings, plainly told
Simple linear regression
Summarize with AIChatGPTClaudePerplexityGoogle AIGrokCopilot
CFA® Level I · Quantitative Methods · Lesson 10 of 11

Simple linear regression

Fitting a line, interpreting the slope, goodness of fit and prediction intervals.

Written by Sepehr Parsa10 min read

The model

Regression measures how a dependent variable Y changes with an independent variable X:

Yi = b0 + b1 × Xi + εi
  • b0, the intercept: predicted Y when X = 0.
  • b1, the slope: change in Y for a one-unit change in X.
  • ε, the error: what the line does not explain.

Ordinary least squares (OLS) picks the line that minimizes the sum of squared errors.

Estimating the coefficients

b1 = Cov(X, Y) / Var(X)
b0 = Ȳ − b1 × X̄

Example. Regress a stock’s monthly returns on the market’s. Cov = 0.0012, Var(market) = 0.0016, mean stock return 1.0%, mean market return 0.8%.

  • b1 = 0.0012 / 0.0016 = 0.75 (the stock’s beta).
  • b0 = 1.0% − 0.75 × 0.8% = 0.4%.
  • Predicted return when the market returns 2%: 0.4% + 0.75 × 2% = 1.9%.

Assumptions

  1. Linearity: the true relationship is linear.
  2. Homoskedasticity: the variance of the errors is the same for all X.
  3. Independence: the errors are uncorrelated with each other (no serial correlation, a common problem with time series).
  4. Normality: the errors are normally distributed (needed for hypothesis tests in small samples).

Plots of the residuals against X are the usual way to spot violations: a funnel shape suggests heteroskedasticity; a pattern over time suggests the errors are not independent.

Measuring fit

Variation in Y splits into explained and unexplained parts:

SST (total) = SSR (explained by the regression) + SSE (errors)
Measure Formula Meaning
R² SSR / SST Share of Y’s variation explained by X. In simple regression, R² = r²
Standard error of estimate √[SSE / (n − 2)] Typical size of a prediction error
F-statistic MSR / MSE = (SSR / 1) / [SSE / (n − 2)] Tests whether the model explains anything

With SST = 200 and SSE = 50: R² = 150 / 200 = 0.75.

Testing the slope

To test whether X explains Y (H0: b1 = 0):

t = (b1 − 0) / s(b1)       with n − 2 degrees of freedom

Reject H0 if |t| exceeds the critical value. You can test against other values too: to test whether a stock’s beta equals 1, use (b1 − 1) / s(b1). In simple regression, the F-test of the whole model is equivalent to this t-test (F = t²).

Prediction intervals

A forecast of Y for a given X is uncertain for two reasons: the error term and the uncertainty in the estimated coefficients. A prediction interval is:

Ŷ ± t(critical) × sf

where sf, the standard error of the forecast, grows the further X is from its mean. Forecasts far outside the data are least reliable.

Functional forms

When the relationship is not linear, transform the variables:

Model Form Use
Log-lin ln Y = b0 + b1X Y grows at a constant rate
Lin-log Y = b0 + b1 ln X Y responds to percentage changes in X
Log-log ln Y = b0 + b1 ln X b1 is an elasticity

Exam focus

Expect to compute a slope and intercept, make a prediction, calculate R² from an ANOVA table, test a slope coefficient, and identify a violated assumption from a description.

Check yourself

Tap an answer. You get the explanation straight away.

  1. The covariance between a stock's returns and the market's returns is 0.0012, and the variance of market returns is 0.0016. The estimated slope (beta) is:

  2. A regression has a total sum of squares of 200 and a sum of squared errors of 50. Its R² is:

  3. If the variance of a regression's errors grows as X increases, the assumption that is violated is:

Questions people ask

What does R² measure in a simple regression?

The share of the variation in the dependent variable explained by the independent variable. In simple linear regression it equals the squared correlation between X and Y.

What is the difference between a confidence interval and a prediction interval?

A confidence interval is for a coefficient. A prediction interval is for a single new value of Y, and it is wider because it includes the random error of that one observation.

Does a significant slope prove that X causes Y?

No. Regression shows association. A third variable, reverse causation or chance can produce a significant slope.

Unlimited practiceGenerate more Quantitative Methods questionsFresh questions with worked solutions every time, in the Level I style.
Progress is saved in this browser.
Next lesson · 11 of 11Introduction to big data and machine learningWhat the methods do and when an analyst would use them.

CFA Institute does not endorse, promote or warrant the accuracy or quality of WallStPal. CFA® and Chartered Financial Analyst® are registered trademarks owned by CFA Institute.

Exam format, timing and topic weights are from CFA Institute's Level I, II and III exam pages, checked November 15, 2026. Check CFA Institute for the year you sit. Lessons and practice questions are WallStPal's own and are not CFA Institute material.

Report an error

Tell us what looks wrong on this page. We check every report against the original filing and fix mistakes on our corrections page.

Share this trade
XTelegram
My Desk · free

Sign in to follow

Follow stocks, members of Congress, famous investors and funds, and see what's new each time you come back.