The two-sample t-test is used to compare two different sample means. Similar to the one-sample t-test, the hypothesis can
be either a one-sided or two-sided test. The t-distribution is required here because instead of population mean, two samples
are being compared. For the two-sample t-test, the degrees of freedom are the number of observations for sample 1 (n1) plus the number of observations for sample 2 (n2) minus two. The formula for the two-sample t-test is shown in the following equation:
in which mean1 and mean2 are the two means being compared, s1 and s2 are the standard deviation of each mean, and n1 and n2 are their respective sample sizes.
If the value of t* is greater than the tabled value from the t-distribution, the two sample means are statistically different. An example of
a two-sample t-test would be comparing the existing lot to a previous lot of material. Table 2 shows an example of a one-sided
two sample t-test for purity. The hypothesis is that the new lot is not less pure than the old lot (New ≥ Old). The mean of
the new lot is statistically less pure than the mean of the old lot (p = 0.003). The t* of 3.49 exceeds the tabled value for a 95% confidence level with 10 degrees of freedom of 1.812. Notice that the tabled value
of a one-sided 95% confidence level is the same as the two-sided 90% confidence level.
Table 2. An example of a one-sided two- sample t-test for purity. The hypothesis is that the new lot is not less pure than
the old lot (New ≥ Old).
The z-test is probably the most misused and misunderstood statistical test in biopharmaceutical organizations. The misconception
is that if the sample size is large enough (n > 30) then the z-test is appropriate. The z-test is restricted for only those
situations where the population variance is known. Because it is practically impossible to know the population variance and
computers can calculate the t-distribution for any sample size, it is preferred to use the t-test. If it is truly necessary
to use the z-test, the formula is:
in which X-mean is the sample mean, μ is the theoretical population mean, σ is the population standard deviation, and n
is the sample size used to estimate the mean.
Notice that the formula for the z-test is similar to the formula for the one-sample t-test. The only difference between the
two equations is the estimation of the standard deviation (square root of the variance). The t-test uses the sample standard
deviation and the z-test uses the population standard deviation. The normal distribution values do not require a sample size
because the standard deviation is known and, therefore, the tabled value is the same regardless of sample size. Table 3 shows
a comparison of the z-values to the t-values for sample sizes of 30, 60, and 120. The t-distribution, though close to the
normal distribution, does not converge to normal distribution until the sample size exceeds 120.
Table 3. A comparison of the z-values to the t-values for sample sizes of 30, 60, and 120.