Student's t-Test
Gradeable Example
Question: Using a t-test, determine if the null hypothesis that the mean of the following two sets of data is equal can be accepted. Assume a significance level of 5% (two-sided test).
To answer the question, first find the value for the t-test statistic by hand, then choose the appropriate answer for the question if the null hypothesis should be accepted or rejected. Each part is graded equally.
Group 1:
Group 2:
t-test statistic value:
Should the null hypothesis be accepted or rejected ?
Background
The two sample Student's t-test is used to compare the responses from two groups. There are three assumptions that are made while performing the two sample Student t-Test:
Each group is considered to be a sample from a distinct population.
The responses within each group are independent of those in other groups.
The distributions of the variable of interest are normal.
The t-distribution is a special case of the normal distribution with an idealized mean of 0 and a standard deviation of 1. The two distributions are similar; however, the t-distribution is used for small sample sizes (usually less than 30), as it is sensitive to small sample sizes (see the image below).
Adjust the slider to see how changing the degrees of freedom affects the t-distribution.
To calculate the t-statistic, the following formula is used:
t=x‾1−x‾2s12n1+s22n2,
where the variables are defined by:
x‾=1n∑i=1n xi
s2=1n−1∑i=1nxi−x‾2
df=n1+n2−2
and n is the sample size of a particular group, x‾ is the mean of a particular group, s2 is the variance of a particular group, and df is the number of degrees of freedom.
The t-test comes in two versions. For the two-sided t-test, the null hypothesis is that the means of the two populations are the same. If the calculated test statistic is greater than the critical value tdf;α/2 in absolute value, the null hypothesis is rejected.
For the one-sided t-test, the null hypothesis is that the first population has a mean that is less than or equal to the mean of the second population. If the calculated test statistic is greater than the critical value tdf;α , the null hypothesis is rejected.
Example
Data is gathered from two groups resulting in the following sets of data:
Group 1: 2, 2, 4, 5, 6, 7, 8, 9, 5, 6
Group 2: 5, 4, 5, 6, 7, 8, 9,5, 9, 5
Assuming a significance level of 5% (two-sided test), are the means of the two sets of data significantly different?
The following hypotheses are tested when a two sample t-test is applied:
H0 : the true population means are equal
Ha : the true population means differ
The t-test statistic is calculated in the following manner:
First, the mean and variance for each of the groups are computed:
Mean = 5.4
Variance = 5.378
Mean = 6.3
Variance = 3.344
Substituting this into the formula for the t-test statistic gives:
t=5.4−6.35.37810+3.34410
t=−0.964
From a critical t-table, it can be observed that the critical value is t18;0.052=2.101.
Since abst=0.963<t18;0.025=2.101, the null hypothesis cannot be rejected. Therefore, it can be concluded that the population means of the two groups do not differ significantly.
More MathApps
MathApps/ProbabilityAndStatistics
MathApps/Gradeable
Download Help Document