Formula Used
The least-squares line estimates the expected response for each predictor value. It minimises the sum of squared vertical residuals. The fitted equation is written as y-hat equals intercept plus slope times x.
ŷ = b₀ + b₁x b₁ = Σ[(xᵢ − x̄)(yᵢ − ȳ)] / Σ[(xᵢ − x̄)²] b₀ = ȳ − b₁x̄ R² = 1 − SSE / SST
How to Use
Choose raw data or summary statistics. Enter paired observations and select the regression method. Add prediction values when forecasts are required.
Review the equation, fit statistics, and confidence intervals. Inspect residual plots and diagnostic flags carefully. Avoid relying on extrapolated predictions without supporting evidence.
Example Data
| x | y | Interpretation |
|---|---|---|
| 1 | 2.1 | First observed pair |
| 2 | 3.9 | Response increases |
| 3 | 6.2 | Near the fitted trend |
| 4 | 8.1 | Moderate positive pattern |
| 5 | 10.2 | Continued increase |
| 6 | 11.8 | Last observed pair |
Frequently Asked Questions
What is a least-squares regression line?
It is the straight line minimising squared vertical residuals. It summarises a linear relationship between two variables. It supports estimation within the observed data range.
What does the slope represent?
The slope measures expected response change per x unit. Positive slopes indicate increasing fitted responses. Negative slopes indicate decreasing fitted responses.
What does the intercept represent?
The intercept is the fitted response when x equals zero. It may lack practical meaning outside observed values. Interpret it within the study context.
What is the difference between r and R²?
Pearson r gives direction and linear association strength. R² gives the fitted variation proportion. Neither measurement proves a causal relationship.
When should regression pass through the origin?
Use it only when theory requires a zero intercept. Forcing zero can distort slopes and residuals. Compare assumptions before selecting this option.
What is weighted least squares?
Weighted regression gives observations different influence levels. Larger weights contribute more to estimation. Weights should reflect known precision or importance.
What is a residual?
A residual equals observed y minus predicted y. Residual patterns reveal possible model problems. Random scatter supports the linear model assumptions.
What is extrapolation?
Extrapolation predicts beyond the observed x range. Such estimates may be unreliable or misleading. Use subject knowledge before accepting extrapolated values.
Why are confidence and prediction intervals different?
Confidence intervals estimate the mean fitted response. Prediction intervals estimate individual future observations. Prediction intervals are usually wider than confidence intervals.