Calculator inputs
Use summary statistics to test any fitted coefficient, or raw pairs to estimate a simple regression and compute slope and intercept p values.
Example data table
The table below shows a small raw dataset you can paste into the calculator to test the fitted slope and review regression significance.
| Observation | X | Y |
|---|---|---|
| 1 | 1 | 2.1 |
| 2 | 2 | 3.9 |
| 3 | 3 | 5.8 |
| 4 | 4 | 8.2 |
| 5 | 5 | 9.7 |
| 6 | 6 | 12.1 |
Formula used
For a tested regression coefficient, the test statistic is t = (b - b₀) / SE(b). Here, b is the estimated coefficient, b₀ is the null value, and SE(b) is the standard error.
For summary statistics mode, degrees of freedom are df = n - k - 1, where n is sample size and k is the number of predictors.
For raw pairs, the fitted simple regression line is ŷ = b₀ + b₁x, where:
- b₁ = Sxy / Sxx
- b₀ = ȳ - b₁x̄
- SSE = Σ(y - ŷ)²
- MSE = SSE / (n - 2)
- SE(b₁) = √(MSE / Sxx)
- R² = 1 - SSE / SST
Two sided p values are computed as 2 × [1 - F(|t|)], where F is the cumulative Student t distribution with the relevant degrees of freedom.
How to use this calculator
- Select Summary statistics if you already know the coefficient estimate and its standard error.
- Select Raw x and y pairs if you want the page to fit the line and compute the p value from scratch.
- Enter the significance level alpha and choose a two sided, greater, or less alternative hypothesis.
- For summary mode, provide the coefficient, standard error, sample size, predictor count, and null coefficient.
- For raw mode, paste equal length x and y lists with at least three observations.
- Press Calculate Regression P Value to show the result above the form, then export it as CSV or PDF if needed.
Frequently asked questions
1. What does the regression p value tell me?
It shows how compatible your coefficient estimate is with the null hypothesis. Smaller p values suggest the tested coefficient is unlikely under that null value.
2. What is the usual null hypothesis for regression slopes?
Most slope tests use a null value of zero, meaning no linear effect. This calculator also lets you test other null coefficient values.
3. Why do degrees of freedom matter?
They determine the correct Student t distribution for the test. Fewer degrees of freedom generally produce wider intervals and larger p values.
4. When should I use raw pair mode?
Use raw pair mode when you have original x and y data and want the calculator to fit the line, compute residuals, and test slope significance directly.
5. What is the difference between one sided and two sided tests?
A two sided test checks whether the coefficient differs from the null in either direction. One sided tests only evaluate a greater or less direction.
6. Does a significant p value guarantee a strong model?
No. A coefficient can be significant while practical effect size remains small. Review slope size, intervals, residual behavior, and R squared as well.
7. Why can a p value change with sample size?
Larger samples often reduce standard errors, which increases the t statistic magnitude. That can make modest effects appear more statistically significant.
8. Can I export the calculated results?
Yes. After calculation, use the CSV button for spreadsheet friendly output or the PDF button for a compact report you can save or share.