Linear Regression Intercept Calculator Formula
Understand the math behind the linear regression intercept calculator. Each variable explained with a worked example.
Formulas Used
Intercept (b0)
intercept = y_mean - slope * x_meany at x=0
equation_check = y_mean - slope * x_meany at x = x_mean
y_at_mean_x = y_meanVariables
| Variable | Description | Default |
|---|---|---|
y_mean | Mean of y | 30 |
x_mean | Mean of x | 15 |
slope | Slope (b1) | 2 |
How It Works
How to Calculate the Regression Intercept
Formula
b0 = y_mean - b1 * x_mean
The y-intercept is the predicted value of Y when X = 0. The regression line always passes through the point (x_mean, y_mean). Once you have the slope b1, computing b0 is straightforward. The full regression equation is: Y = b0 + b1*X.
Worked Example
Mean of y = 30, mean of x = 15, slope = 2.
y_mean = 30x_mean = 15slope = 2
- 01b0 = y_mean - b1 * x_mean
- 02b0 = 30 - 2 * 15
- 03b0 = 30 - 30 = 0
- 04Regression equation: Y = 0 + 2*X = 2X
Ready to run the numbers?
Open Linear Regression Intercept Calculator