0% found this document useful (0 votes)
16 views

What Is A T-Test

A t-test is a statistical test used to evaluate means between groups. There are three types of t-tests: one-sample, two-sample, and paired. The document discusses the assumptions, calculations, and interpretations of each t-test type.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

What Is A T-Test

A t-test is a statistical test used to evaluate means between groups. There are three types of t-tests: one-sample, two-sample, and paired. The document discusses the assumptions, calculations, and interpretations of each t-test type.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

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).

How are t-tests used?


First, you define the hypothesis you are going to test and specify an acceptable risk of drawing
a faulty conclusion. For example, when comparing two populations, you might hypothesize that
their means are the same, and you decide on an acceptable probability of concluding that a
difference exists when that is not true. Next, you calculate a test statistic from your data and
compare it to a theoretical value from a t-distribution. Depending on the outcome, you either
reject or fail to reject your null hypothesis.

What if I have more than two groups?


You cannot use a t-test. Use a multiple comparison method. Examples are analysis of variance
(ANOVA), Tukey-Kramer pairwise comparison, Dunnett's comparison to a control, and analysis
of means (ANOM).

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.

One-sample t-test Two-sample t-test Paired t-test


Synonyms Student’s t-test ​ Independent ​ Paired groups
groups t-test t-test
​ Independent ​ Dependent
samples t-test samples t-test
​ Equal
variances
t-test
​ Pooled t-test
​ Unequal
variances
t-test

Number of One Two Two


variables

Type of ​ Continuous ​ Continuous ​ Continuous


variable measurement measurement measurement
​ Categorical or ​ Categorical or
Nominal to Nominal to
define groups define pairing
within group

Purpose of Decide if the Decide if the Decide if the difference


test population mean is population means for between paired
equal to a specific two different groups measurements for a
value or not are equal or not population is zero or
not

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

Estimate of Sample average Sample average for Sample average of the


population each group differences in paired
mean measurements

Population Unknown, use Unknown, use sample Unknown, use sample


standard sample standard standard deviations standard deviation of
deviation deviation for each group differences in paired
measurements
Degrees of Number of Sum of observations Number of paired
freedom observations in in each sample minus observations in sample
sample minus 1, or: 2, or: minus 1, or:
n–1 n1 + n2 – 2 n–1

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.

One-tailed vs. two-tailed tests


When you define the hypothesis, you also define whether you have a one-tailed or a two-tailed
test. You should make this decision before collecting your data or doing any calculations. You
make this decision for all three of the t-tests for means.
To explain, let’s use the one-sample t-test. Suppose we have a random sample of protein bars,
and the label for the bars advertises 20 grams of protein per bar. The null hypothesis is that the
unknown population mean is 20. Suppose we simply want to know if the data shows we have a
different population mean. In this situation, our hypotheses are:

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.

How to perform a t-test


For all of the t-tests involving means, you perform the same steps in analysis:
1. Define your null (Ho) and alternative (Ha) hypotheses before collecting your data.
2. Decide on the alpha value (or α value). This involves determining the risk you are willing
to take of drawing the wrong conclusion. For example, suppose you set α=0.05 when
comparing two independent groups. Here, you have decided on a 5% risk of concluding
the unknown population means are different when they are not.
3. Check the data for errors.
4. Check the assumptions for the test.
5. Perform the test and draw your conclusion. All t-tests for means involve calculating a test
statistic. You compare the test statistic to a theoretical value from the t-distribution. The
theoretical value involves both the α value and the degrees of freedom for your data. For
more detail, visit the pages for one-sample t-test, two-sample t-test and paired t-test.

What is the t-distribution?

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.

Is the t-distribution the same as the Student’s t-distribution?


Yes.

What’s the key difference between the t- and z-distributions?


The standard normal or z-distribution assumes that you know the population standard deviation.
The t-distribution is based on the sample standard deviation.

t-Distribution vs. normal distribution


The t-distribution is similar to a normal distribution. It has a precise mathematical definition.
Instead of diving into complex math, let’s look at the useful properties of the t-distribution and
why it is important in analyses.
​ Like the normal distribution, the t-distribution has a smooth shape.
​ Like the normal distribution, the t-distribution is symmetric. If you think about folding it in
half at the mean, each side will be the same.
​ Like a standard normal distribution (or z-distribution), the t-distribution has a mean of
zero.
​ The normal distribution assumes that the population standard deviation is known. The
t-distribution does not make this assumption.
​ The t-distribution is defined by the degrees of freedom. These are related to the sample
size.
​ The t-distribution is most useful for small sample sizes, when the population standard
deviation is not known, or both.
​ As the sample size increases, the t-distribution becomes more similar to a normal
distribution.
Consider the following graph comparing three t-distributions with a standard normal distribution:

Figure 1: Three t-distributions and a standard normal (z-) distribution.


All of the distributions have a smooth shape. All are symmetric. All have a mean of zero.
The shape of the t-distribution depends on the degrees of freedom. The curves with more
degrees of freedom are taller and have thinner tails. All three t-distributions have “heavier tails”
than the z-distribution.
You can see how the curves with more degrees of freedom are more like a z-distribution.
Compare the pink curve with one degree of freedom to the green curve for the z-distribution.
The t-distribution with one degree of freedom is shorter and has thicker tails than the
z-distribution. Then compare the blue curve with 10 degrees of freedom to the green curve for
the z-distribution. These two distributions are very similar.
A common rule of thumb is that for a sample size of at least 30, one can use the z-distribution in
place of a t-distribution. Figure 2 below shows a t-distribution with 30 degrees of freedom and a
z-distribution. The figure uses a dotted-line green curve for z, so that you can see both curves.
This similarity is one reason why a z-distribution is used in statistical methods in place of a
t-distribution when sample sizes are sufficiently large.

Figure 2: z-distribution and t-distribution with 30 degrees of freedom

Tails for hypotheses tests and the t-distribution


When you perform a t-test, you check if your test statistic is a more extreme value than
expected from the t-distribution.
For a two-tailed test, you look at both tails of the distribution. Figure 3 below shows the decision
process for a two-tailed test. The curve is a t-distribution with 21 degrees of freedom. The value
from the t-distribution with α = 0.05/2 = 0.025 is 2.080. For a two-tailed test, you reject the null
hypothesis if the test statistic is larger than the absolute value of the reference value. If the test
statistic value is either in the lower tail or in the upper tail, you reject the null hypothesis. If the
test statistic is within the two reference lines, then you fail to reject the null hypothesis.

Figure 3: Decision process for a two-tailed test

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

How to use a t-table


Most people use software to perform the calculations needed for t-tests. But many statistics
books still show t-tables, so understanding how to use a table might be helpful. The steps below
describe how to use a typical t-table.
1. Identify if the table is for two-tailed or one-tailed tests. Then, decide if you have a
one-tailed or a two-tailed test. The columns for a t-table identify different alpha levels.
If you have a table for a one-tailed test, you can still use it for a two-tailed test. If you set
α = 0.05 for your two-tailed test and have only a one-tailed table, then use the column for
α = 0.025.
2. Identify the degrees of freedom for your data. The rows of a t-table correspond to
different degrees of freedom. Most tables go up to 30 degrees of freedom and then stop.
The tables assume people will use a z-distribution for larger sample sizes.
3. Find the cell in the table at the intersection of your α level and degrees of freedom. This
is the t-distribution value. Compare your statistic to the t-distribution value and make the
appropriate conclusion.

You might also like