So far, we always knew or pretended to know the standard deviation in the population. In fact, though, it usually must be estimated from the sample. When this is necessary ” when we use the same sample both to test the hypothesis and to estimate the standard deviation in the population ” we have to use the t distribution instead of the normal distribution. The t distribution is much like the normal distribution. It just shifts the area in the normal distribution to adjust for the fact that we do not know what the standard deviations really are. (When sample sizes are large, the t distribution looks very much like the normal distribution.)
As always, we compute the difference between the two means, find its standard error, and then calculate how improbable the observed difference is. However, the answer to our question of "significant" difference is dependent on the pooled variance estimate and the degrees of freedom. The degrees of freedom are based on the number of observations in each of the two groups.