Evaluation of Means for small samples - The t-test


Basics of Excel™

Basic Statistics

Linear Regression

Data Evaluation & Comparison




t-test table

1- and 2-Tailed Tests



In the previous example, we set up a hypothesis to test whether a sample mean was close to a population mean or desired value for some soil samples containing arsenic. On this page, we establish the statistical test to determine whether the difference between the sample mean and the population mean is significant. It is called the t-test, and it is used when comparing sample means, when only the sample standard deviation is known.

The t-test, and any statistical test of this sort, consists of three steps.

  1. Define the null and alternate hyptheses,
  2. Calculate the t-statistic for the data,
  3. Compare tcalc to the tabulated t-value, for the appropriate significance level and degree of freedom. If tcalc > ttab, we reject the null hypothesis and accept the alternate hypothesis. Otherwise, we accept the null hypothesis.

The t-test can be used to compare a sample mean to an accepted value (a population mean), or it can be used to compare the means of two sample sets.

t-test to Compare One Sample Mean to an Accepted Value

In the example, the mean of arsenic concentration measurements was m=4 ppm, for n=7 and, with sample standard deviation s=0.9 ppm. We established suitable null and alternative hypostheses:

where μ0 = 2 ppm is the allowable limit and μ is the population mean of the measured soil (refresher on the difference between sample and population means).

We have already seen how to do the first step, and have null and alternate hypotheses. The second step involves the calculation of the t-statistic for one mean, using the formula:

where s is the standard deviation of the sample, not the population standard deviation. In our case,

For the third step, we need a table of tabulated t-values for significance level and degrees of freedom, such as the one found in your lab manual or most statistics textbooks. Referring to a table for a 95% confidence limit for a 1-tailed test, we find tν=6,95% = 1.94. (The difference between 1- and 2-tailed distributions was covered in a previous section.)

We are now ready to accept or reject the null hypothesis. If the tcalc > ttab, we reject the null hypothesis. In our case, tcalc=5.88 > ttab=2.45, so we reject the null hypothesis, and say that our sample mean is indeed larger than the accepted limit, and not due to random chance, so we can say that the soil is indeed contaminated.

t-test to Compare Two Sample Means

The method for comparing two sample means is very similar. The only two differences are the equation used to compute the t-statistic, and the degrees of freedom for choosing the tabulate t-value. The formula is given by

In this case, we require two separate sample means, standard deviations and sample sizes. The number of degrees of freedom is computed using the formula

and the result is rounded to the nearest whole number. Once these quantities are determined, the same three steps for determining the validity of a hypothesis are used for two sample means. The next page, which describes the difference between one- and two-tailed tests, also provides an example of how to perform two sample mean t-tests.

© Dr. David Stone (dstone at chem.utoronto.ca) & Jon Ellis (jon.ellis at utoronto.ca) , August 2006