Skip to content
← All questions

What is the least-squares objective function for simple linear regression?

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

Conditions

  • The model is simple linear regression.
  • Residuals are defined as observed y minus predicted y.

Reasoning, step by step

  1. Define the residual for each observation as the difference between the observed value and the model's prediction.
  2. Square each residual to penalize larger errors more heavily.
  3. Sum these squared residuals across all observations to form the objective function.

Example

The script states: '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.'

Common misconceptions

  • Thinking the objective sums absolute residuals instead of squared residuals.
  • Believing the objective depends only on the slope and not the intercept.

Watch the explanation

Connected concepts

Explore next

Related questions

Understand why

↗
Find a method

↗
Meet the concept

↗
Understand why

↗

Answers are generated from source material and independently checked. Consult the original video or creator if something is unclear.