Student's t-test
Slope of a regression line

Suppose one is fitting the model

where x is known, α and β are unknown, ε is a normally distributed random variable with mean 0 and unknown variance σ, and Y is the outcome of interest. We want to test the null hypothesis that the slope β is equal to some specified value β (often taken to be 0, in which case the null hypothesis is that x and y are uncorrelated).

Let

Then

has a t -distribution with n − 2 degrees of freedom if the null hypothesis is true. The standard error of the slope coefficient:

can be written in terms of the residuals. Let

Then t is given by

Another way to determine the t is

where r is the Pearson correlation coefficient.

The t can be determined from the t:

where s is the sample variance.
combination:two_responses