What Is A T-Test
What Is A T-Test
A t-test (also known as Student's t-test) is a tool for evaluating the means of one or two
populations using hypothesis testing. A t-test may be used to evaluate whether a single group
differs from a known value (a one-sample t-test), whether two groups differ from each other (an
independent two-sample t-test), or whether there is a significant difference in paired
measurements (a paired, or dependent samples t-test).
t-Test assumptions
While t-tests are relatively robust to deviations from assumptions, t-tests do assume that:
The data are continuous.
The sample data have been randomly sampled from a population.
There is homogeneity of variance (i.e., the variability of the data in each group is similar).
The distribution is approximately normal.
For two-sample t-tests, we must have independent samples. If the samples are not
independent, then a paired t-test may be appropriate.
Types of t-tests
There are three t-tests to compare means: a one-sample t-test, a two-sample t-test and a paired
t-test. The table below summarizes the characteristics of each and provides guidance on how to
choose the correct test. Visit the individual pages for each type of t-test for examples along with
details on assumptions and calculations.
Example: Mean heart rate of a Mean heart rates for Mean difference in
test if... group of people is two groups of people heart rate for a group of
equal to 65 or not are the same or not people before and after
exercise is zero or not
The table above shows only the t-tests for population means. Another common t-test is for
correlation coefficients. You use this t-test to decide if the correlation coefficient is significantly
different from zero.
Here, we have a two-tailed test. We will use the data to see if the sample average differs
sufficiently from 20 – either higher or lower – to conclude that the unknown population mean is
different from 20.
Suppose instead that we want to know whether the advertising on the label is correct. Does the
data support the idea that the unknown population mean is at least 20? Or not? In this situation,
our hypotheses are:
Here, we have a one-tailed test. We will use the data to see if the sample average is sufficiently
less than 20 to reject the hypothesis that the unknown population mean is 20 or higher.
See the "tails for hypotheses tests" section on the t-distribution page for images that illustrate
the concepts for one-tailed and two-tailed tests.
The t-distribution describes the standardized distances of sample means to the population mean
when the population standard deviation is not known, and the observations come from a
normally distributed population.
For a one-tailed test, you look at only one tail of the distribution. For example, Figure 4 below
shows the decision process for a one-tailed test. The curve is again a t-distribution with 21
degrees of freedom. For a one-tailed test, the value from the t-distribution with α = 0.05 is 1.721.
You reject the null hypothesis if the test statistic is larger than the reference value. If the test
statistic is below the reference line, then you fail to reject the null hypothesis.
Figure 4: Decision process for a one-tailed test