What Is Simple Regression?
Simple regression models a response y as a straight-line function of one predictor x. The least squares line minimises the squared vertical distances to the points.
Paste paired x and y values to get the equation, correlation, R², standard error of the estimate, slope standard error, t statistic, p-value and a confidence interval for the slope. An ANOVA table, a residual plot and an optional prediction with confidence and prediction intervals are included.
The sections below give the formulas, a worked example and answers on testing the slope.
How to Use the Simple Regression Calculator
- Enter paired x and y values.
- Optionally enter an x to predict.
- Read the equation, r and R².
- Check the slope test, ANOVA table and residual plot.
Simple Regression Formula
Slope
Intercept
Slope t
Simple Regression Variables Explained
| Symbol | Meaning | Notes |
|---|---|---|
| b₁ | Slope | |
| b₀ | Intercept | |
| R² | Share of variation explained | |
| s_e | Standard error of the estimate |
Simple Regression Worked Example
For x = 1..10 and the y values above, the slope is about 2.0 and R² is above 0.99. The slope t statistic is large and the p-value is far below 0.05, so there is strong evidence of a linear relationship.
With the example values loaded in the calculator above, the steps are:
- Means: x̄ = 5.5, ȳ = 11.1. Sxx = 82.5, Sxy = 165.6, Syy = 333.12.
- Slope b₁ = Sxy ÷ Sxx = 2.0072727; intercept b₀ = ȳ − b₁x̄ = 0.06.
- R² = 0.997852; SSE = 0.71563636; standard error of the estimate = √(SSE ÷ 8) = 0.29909.
- Slope t = b₁ ÷ SE(b₁) = 60.9582 with 8 df, so p = 5.8291 × 10^-12.
- At x = 11: ŷ = 22.14, with a 95 % prediction interval of 21.3047 to 22.9753.
Result: Regression equation = y = 0.06 + 2.00727x; Slope b₁ = 2.0072727; Correlation r = 0.998925; Predicted y at x = 11 = 22.14.
How to Read a Simple Regression
The slope says how much y changes, on average, for a one-unit rise in x. R² says what share of the variation in y the line explains, so an R² above 0.99 means points sit very close to the line.
The slope test asks whether the true slope could be zero. A large t statistic and a p-value far below 0.05 give strong evidence of a linear relationship. A significant slope does not show that x causes y. The standard error of the estimate gives the typical miss in the units of y.
Where Simple Regression Is Used
Trend and prediction
Fit a line and predict y at a new x within the data range.
Testing a slope
Check whether the relationship is statistically significant.
Model fit
Read R² and the standard error of the estimate.
ANOVA table
See the regression sums of squares and the F test.
Common Simple Regression Mistakes to Avoid
- Check the scatter plot for curves and outliers before you trust the line.
- Do not predict far outside the range of x.
- A high R² does not prove causation.
- The tests assume residuals that are roughly normal with constant spread.
Simple Regression Terms and Definitions
- Residual
- Observed y minus predicted y.
Simple Regression FAQs
What is simple regression?
It is a line y = b₀ + b₁x fitted to data with one predictor. The coefficients minimise the sum of squared vertical errors.
How do I test the slope?
Divide the slope by its standard error to get a t statistic with n − 2 degrees of freedom, then read the p-value. A p-value below your α is evidence that the slope is not zero.
What does R² mean?
It is the proportion of the variation in y explained by the line. An R² of 0.80 means 80% of the variation is explained.
Prediction interval or confidence interval?
A confidence interval is for the average y at a given x. A prediction interval is for a single new y and is wider, because it includes the scatter of individual points.