Introduction to Regression
Learn how to find the best-fitting line through data points and make predictions using linear regression.
Definition
Linear regression is a statistical method used to find the straight line that best fits a set of data points. This line is called the line of best fit or regression line.
The equation of a regression line is:
where:
- is the slope (how steep the line is)
- is the y-intercept (where the line crosses the y-axis)
- is the input variable (independent variable)
- is the predicted output (dependent variable)
The goal of regression is to minimize the total distance between the data points and the line, allowing us to make predictions for new values of .
Try it now
What does the represent in the equation ?
Interactive Visual
Linear Function Explorer
y = 3x + 2
Slope (m)3
Y-Intercept (b)2
b
run
rise
| x | y |
|---|---|
| -2 | -4 |
| -1 | -1 |
| 0 | 2 |
| 1 | 5 |
| 2 | 8 |
Function graph
Plot these points:
- (2, 8)
- (5, 17)
Tap the grid to place a point. Tap a point again to remove it.Place at least 2 points to see the line through them.
Interactive Sandbox
Interactive Grapher
Tap or hover over the graph to read off values.
Try these examples:
y = 3x + 2
m=3, b=2
Expression Calculator
Try these:
History
No calculations yet
Practice Problems
16 problemsProblem 1 of 16
Easy
What does the represent in the equation ?
Glossary
- Linear regression
- A statistical method for finding the best-fitting straight line through data points
- Line of best fit
- The straight line that minimizes the distance between itself and all data points
- Slope
- The steepness of the line, representing the rate of change ( in )
- Y-intercept
- The point where the line crosses the y-axis ( in )
- Prediction
- Using the regression equation to estimate for a given value of
- Independent variable
- The input variable () that we use to make predictions
- Dependent variable
- The output variable () that we are trying to predict