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.
Where Simple Regression Is Used
Coursework
Get every regression output in one place.
Lab data
Test whether a trend is significant.
Forecasting
Predict with an interval.
Checking assumptions
Inspect residuals.
Common Simple Regression Mistakes to Avoid
- Plot the data first.
- Never extrapolate far.
- Check residuals for patterns.
Simple Regression Terms and Definitions
- Residual
- Observed y minus predicted y.
Simple Regression FAQs
What is simple regression?
A method to model y as a straight-line function of one predictor x.
How do I test the slope?
Divide the slope by its standard error and compare with a t distribution with n − 2 degrees of freedom.
What does R² mean?
The proportion of the variation in y that the line explains.
Prediction interval or confidence interval?
The prediction interval covers a new single observation and is wider than the interval for the mean response.