# Regression Analysis

> Fitting a line through data. It shows how one thing changes when another does.

**Field:** General Knowledge  
**Category:** Math & Statistics  
**Also known as:** Statistical Regression, Line of Best Fit

## Think of it like

It is like drawing one straight line through a cloud of dots. The line stays close to all of them.

## Definition

Regression analysis finds the line or curve that best fits a set of data. It shows how one value tends to change when another one changes. The simplest kind fits a straight line through dots on a chart. The line's slope says how much the result moves for each step of the input. You can then use the line to guess new values.

## Example

An estate agent fits a line to 200 flat sales. It shows each extra square metre adds about 4,000 euros to the price. She uses it to price a new flat.

## Example code

```excel
=SLOPE(C2:C21, B2:B21)
0.5
```

Each extra step in column B goes with about half a step more in column C.

## Why it matters

Regression turns a cloud of dots into a rule you can use. Many forecasts and AI models are built on it.

## Common mistake

Using the line far beyond the data. A trend found on small flats may not hold for mansions.

## Three principles

- **Best fit.** The closest line to all the dots.
- **Slope is the effect.** The change in result per step.
- **A guess, not proof.** It shows a link, not a cause.

## Related terms

- [Correlation](https://learn.benibix.com/term/general/correlation)
- [Slope](https://learn.benibix.com/term/general/slope)
- [Causation](https://learn.benibix.com/term/general/causation)
- [Linear Regression](https://learn.benibix.com/term/ai/linear-regression)
- [Regression (Machine Learning)](https://learn.benibix.com/term/ai/regression)
- [R-Squared](https://learn.benibix.com/term/ai/r-squared)
- [Regression to the Mean](https://learn.benibix.com/term/general/regression-to-the-mean)

## Told apart from

- [Regression to the Mean vs Regression Analysis](https://learn.benibix.com/compare/regression-to-the-mean-vs-regression-analysis): People think regression to the mean is a step in regression analysis, and it is not. Regression analysis is a method. It fits a line to data to see how one thing moves with another. Regression to the mean is an effect. A very high or low score tends to be followed by one closer to normal, because the luck in it does not repeat. One is a tool. The other is a trap that a fair test helps you spot.

## Taught in

- [Correlation vs Causation](https://learn.benibix.com/learn/general-math/correlation-vs-causation): Statistics, 8/10

![A scatter of dots for flat size against price, climbing to the right. A straight line runs through the middle of them, labelled line of best fit. A short dashed line joins one dot to the line, labelled gap.](https://learn.benibix.com/diagrams/gen-regression.svg)

---

Source: https://learn.benibix.com/term/general/regression-analysis
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-20
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
