T Test Regression Calculator

Estimate slope, intercept, and model strength faster today. Enter paired values or sample data examples. See key statistics, graph trends, and export results easily.

Enter paired data

Provide one x,y pair per line. Commas, spaces, tabs, or semicolons are accepted.

Example data table

This sample uses study hours as x and exam scores as y.

Observation Study Hours (x) Exam Score (y)
1152
2257
3361
4466
5572
6676
7781
8887

Formula used

Slope: b₁ = Σ[(xᵢ − x̄)(yᵢ − ȳ)] / Σ[(xᵢ − x̄)²]

Intercept: b₀ = ȳ − b₁x̄

Residual standard error: s = √[SSE / (n − 2)]

Slope standard error: SE(b₁) = s / √Sxx

Intercept standard error: SE(b₀) = s √[(1/n) + (x̄²/Sxx)]

Slope t test: t = (b₁ − β₀) / SE(b₁)

Intercept t test: t = (b₀ − α₀) / SE(b₀)

Confidence interval: estimate ± tcritical × standard error

Model fit: R² = 1 − (SSE / SST)

The calculator uses Student’s t distribution with n − 2 degrees of freedom for simple linear regression tests and intervals.

How to use this calculator

1. Paste one x,y pair on each line.

2. Choose the confidence level and hypothesis direction.

3. Set the null slope or null intercept, if needed.

4. Add a prediction x value for interval estimates.

5. Click the calculate button to generate results.

6. Review the t statistics, p values, intervals, and charts.

7. Export the results as CSV or PDF.

Frequently asked questions

1. What does this calculator test?

It tests whether the regression slope or intercept differs from a chosen null value. It also reports fit quality, confidence intervals, residuals, and optional prediction ranges for one x value.

2. What p value is shown?

The p value comes from the Student’s t distribution using n − 2 degrees of freedom. Its meaning depends on the selected alternative hypothesis: two-sided, right-tailed, or left-tailed.

3. Why can slope and intercept both be tested?

Each coefficient has its own estimate and standard error. A separate t statistic can be built for either coefficient, so both parameters can be checked against user-defined null values.

4. What is the difference between confidence and prediction intervals?

A confidence interval estimates the mean response at one x value. A prediction interval is wider because it covers a single future observation, not just the average expected response.

5. Why do I need variation in x?

If all x values are the same, the slope cannot be estimated. Regression needs spread in the predictor to measure how changes in x relate to changes in y.

6. What does R² tell me?

R² shows the share of y variation explained by the fitted line. Higher values mean the model explains more variation, but they do not guarantee causation or perfect predictions.

7. Can I paste data with spaces or tabs?

Yes. The parser accepts commas, spaces, tabs, semicolons, and vertical bars. Each nonempty line should still contain two numeric values: one x and one y.

8. When should I inspect the residual plot?

Check the residual plot for curved patterns, changing spread, or strong outliers. Random scatter around zero usually supports the straight-line assumption better than structured patterns do.

Related Calculators

Linear Regression CalculatorMultiple Regression CalculatorLogistic Regression CalculatorSimple Regression CalculatorPower Regression CalculatorLogarithmic Regression CalculatorR Squared CalculatorAdjusted R SquaredSlope Intercept CalculatorCorrelation Coefficient Calculator

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.