The z-test is useful when the standard deviation of the population is known. However, in most real-world cases, this is an unknown quantity. For these cases, we turn to the t-test of significance.
For the t-test, given that the standard deviation of the population is unknown, we replace it with the standard deviation, s, of the sample. The standard error of the mean is now as follows:
The standard deviation of the sample, s, is calculated as follows:
The denominator is N-1 and not N. This value is known as the number of degrees of freedom. We will now state (without an explanation) that, by the CLT, the t-distribution approximates the normal, Guassian, or z-distribution as N, and so N-1 increases—that is, with increasing degrees of freedom (df). When df = ∞, the t-distribution is identical to the normal or z-distribution. This is intuitive since, as df increases, the sample size increases and s approaches , which is the true standard deviation of the population. There are an infinite number of t-distributions, each corresponding to a different value of df.
This can be seen in the following diagram: