Skip to content
Back to exploration
Applied mathematics / English

Deriving the least squares estimators of the slope and intercept (simple linear regression)

jbstatistics · YouTube · 12:13

Open original
READ & KEEP

The explanation, unpacked.

Reviewed learning material · Video analysis · English
Read the full overview

Derive simple linear regression’s least-squares slope and intercept from the normal equations.

Use the learning inspector for key ideas and moments, or open the reading tabs for the complete notes.

Chapters

1:30Minimize squared residuals6:00Use the mean relationship10:30The centered slope formula

Learning script

Generated from the video's visuals and explanation; not verbatim speech.

A residual is observed y minus the line’s predicted value. The least-squares objective sums the squared residuals over all observations and depends on slope and intercept.

Setting the intercept derivative to zero gives intercept=mean(y)−slope·mean(x). Hence a fitted line with an intercept passes through the point of sample means.

The slope is Σ[(xᵢ−x̄)(yᵢ−ȳ)] divided by Σ(xᵢ−x̄)², provided the denominator is positive. If all x values are identical, the usual unique slope formula is unavailable.

Knowledge cards

01

Minimize squared residuals

A residual is observed y minus the line’s predicted value. The least-squares objective sums the squared residuals over all observations and depends on slope and intercept.

02

Use the mean relationship

Setting the intercept derivative to zero gives intercept=mean(y)−slope·mean(x). Hence a fitted line with an intercept passes through the point of sample means.

03

The centered slope formula

The slope is Σ[(xᵢ−x̄)(yᵢ−ȳ)] divided by Σ(xᵢ−x̄)², provided the denominator is positive. If all x values are identical, the usual unique slope formula is unavailable.

Explore the knowledge in this video

Open video knowledge graph →

  • Least squares ProofAt 1:30
    Why this connection?

    A residual is observed y minus the line’s predicted value. The least-squares objective sums the squared residuals over all observations and depends on slope and intercept. Setting the intercept derivative to zero gives intercept=mean(y)−slope·mean(x). Hence a fitted line with an intercept passes through the point of sample means. The slope is Σ[(xᵢ−x̄)(yᵢ−ȳ)] divided by Σ(xᵢ−x̄)², provided the denominator is positive. If all x values are identical, the usual unique slope formula is unavailable.

Questions this video answers

Meet the concept

↗
Find a method

↗
Meet the concept

↗
Know when to use it

↗