You are on page 1of 6

Name : Rizqi Fadhilah Matondang

NIM : 2181121032

Class : English Education 18 B


Subject : Statistics

An Introduction to t-test
A t-test is a statistical test that is used to compare the means of two groups. It is often
used in hypothesis testing to determine whether a process or treatment actually has an effect on
the population of interest, or whether two groups are different from one another.

A t-test measures the difference in group means divided by the pooled standard error of
the two group means. In this way, it calculates a number (the t-value) illustrating the magnitude
of the difference between the two group means being compared, and estimates the likelihood that
this difference exists purely by chance (p-value).

Your choice of t-test depends on whether you are studying one group or two groups, and
whether you care about the direction of the difference in group means. If you are studying one
group, use a paired t-test to compare the group mean over time or after an intervention, or use a
one-sample t-test to compare the group mean to a standard value. If you are studying two groups,
use a two-sample t-test. If you want to know only whether a difference exists, use a two-tailed
test. If you want to know if one group mean is greater or less than the other, use a left-tailed or
right-tailed one-tailed test.

A one-sample t-test is used to compare a single population to a standard value (for example, to
determine whether the average lifespan of a specific town is different from the country average).

A paired t-test is used to compare a single population before and after some experimental
intervention or at two different points in time (for example, measuring student performance on a
test before and after being taught the material).

A t-test should not be used to measure differences among more than two groups, because
the error structure for a t-test will underestimate the actual error when many groups are being
compared. If you want to compare the means of several groups at once, it’s best to use another
statistical test such as ANOVA or a post-hoc test.

When to use a t-test

A t-test can only be used when comparing the means of two groups (a.k.a. pair wise
comparison). If you want to compare more than two groups, or if you want to do multiple pair
wise comparisons, use an ANOVA test or a post-hoc test.

The t-test is a parametric test of difference, meaning that it makes the same assumptions
about your data as other parametric tests. The t-test assumes your data :

1. are independent
2. are (approximately) normally distributed.
3. have a similar amount of variance within each group being compared (a.k.a. homogeneity
of variance)

If your data do not fit these assumptions, you can try a nonparametric alternative to the t-test,
such as the Wilcoxon Signed-Rank test for data with unequal variances.

What type of t-test should I use?

When choosing a t-test, you will need to consider two things: whether the groups being
compared come from a single population or two different populations, and whether you want to
test the difference in a specific direction.

One-sample, two-sample, or paired t-test?

 If the groups come from a single population (e.g. measuring before and after an
experimental treatment), perform a paired t-test.
 If the groups come from two different populations (e.g. two different species, or people
from two separate cities), perform a two-sample t-test (a.k.a. independent t-test).
 If there is one group being compared against a standard value (e.g. comparing the acidity
of a liquid to a neutral pH of 7), perform a one-sample t-test.
One-tailed or two-tailed t-test?

 If you only care whether the two populations are different from one another, perform
a two-tailed t-test.
 If you want to know whether one population mean is greater than or less than the other,
perform a one-tailed t-test.

Performing a t-test

The t-test estimates the true difference between two group means using the ratio of the
difference in group means over the pooled standard error of both groups. You can calculate it
manually using a formula, or use statistical analysis software.

T-test formula

The formula for the two-sample t-test (a.k.a. the Student’s t-test) is shown below.

In this formula, t is the t-value, x1 and x2 are the means of the two groups being
compared, s2 is the pooled standard error of the two groups, and n1 and n2 are the number of
observations in each of the groups.

A larger t-value shows that the difference between group means is greater than the pooled
standard error, indicating a more significant difference between the groups.

You can compare your calculated t-value against the values in a critical value chart to
determine whether your t-value is greater than what would be expected by chance. If so, you can
reject the null hypothesis and conclude that the two groups are in fact different.
T-test function in statistical software

Most statistical software (R, SPSS, etc.) includes a t-test function. This built-in function
will take your raw data and calculate the t-value. It will then compare it to the critical value, and
calculate a p-value. This way you can quickly see whether your groups are statistically different.

Paired Samples T Test

Example question: Calculate a paired t test by hand for the following data:

Step 1: Subtract each Y score from each X score.


Step 2: Add up all of the values from Step 1.

Step 3: Square the differences from Step 1.

Step 4: Add up all of the squared differences from Step 3.


Step 5: Use the following formula to calculate the t-score:

 ΣD: Sum of the differences (Sum of X-Y from Step 2)


 ΣD2: Sum of the squared differences (from Step 4)
 (ΣD)2: Sum of the differences (from Step 2), squared.
If you’re unfamiliar with Σ you may want to read about summation notation first.

Step 6: Subtract 1 from the sample size to get the degrees of freedom. We have 11 items, so
11-1 = 10.

Step 7: Find the p-value in the t-table, using the degrees of freedom in Step 6. If you don’t
have a specified alpha level, use 0.05 (5%). For this example problem, with df = 10, the t-value
is 2.228.

Step 8: Compare your t-table value from Step 7 (2.228) to your calculated t-value (-2.74).
The calculated t-value is greater than the table value at an alpha level of .05. The p-value is less
than the alpha level: p <.05. We can reject the null hypothesis that there is no difference between
means.

You might also like