T-Tests
One-Group T-test
Here, you are dealing with one group, and you want to study the behavior
of its sample mean (not the population mean sigma; else you'd use a
z-test).
- Compare your sample mean xbar to the population mean mu. Hzero says
they're the same; h1 says they are not.
- You need to know n, xbar, and s for the sample.
- Set alpha. Decide one-tail vs. 2-tail.
- df = n-1 = degrees of freedom. There is only one group (J=1).
- Calculate the sem: s xbar = s/sqrt(n) - really it's sqrt(s**2/n)
- t = (xbar - mu)/sem
- Compare with the critical value. If the obtained t > table t, reject
hzero. Your probability of making a Type I error was set to
alpha; SPSS will calculate the p value for you, taking n into account.
Two Independent Groups T-test
Compare the sample means for two independent groups taken from the same
population.
- Hzero says they're the same; h1 says they're not.
- Set alpha. Decide how many tails.
- You need n1, n2; xbar1, xbar2; s1, and s2.
- Calculate df = n1 - n2 - 2. This is the same as 2(n-1).
- Calculate s(xbar1-xbar2) = sqrt(s1**2/n1 + s2**2/n2) - this is like
sem for the one group test, except that you sum the s**2/n terms before
you take the square root.
- t = (xbar1 - xbar2)/s(sbar1-xbar2) - denominator from previous step.
- Compare your obtained t with the t from the table, using df.
- If it is larger than the critical value, reject hzero.
Two Dependent Groups T-test
This is done exactly the same as the two independent groups t-test
(above) except for one difference: there is an extra term in the square
root, which is the correlation of the two groups. Hence, sem is:
sem = sqrt (s1**2/n1 + s2**2/n2 - correlation).
Naturally, this term drops out when there is no correlation between
groups. This test is often used for pretest/posttest situations.
Assumptions
The t-test is a parametric test. That means it has assumptions. There
are three assumptions:
- The two groups are completely independent. No crossover.
- The scores are normally distributed. Actually this doesn't have to
be true in practice - it's OK if they're not normal.
- Homogeneity of variance - both populations have equal variance. It's
OK to violate this too - provided the n's are equal. But if they are
not, then you need to test for the actual variance.
Homogeneity of variance
These apply to independent 2-group T-tests. Tests (like Fmax) for
homogeneity of variance are needed if n1 is not equal to n2 and s1 is
not equal to s2. Here are the ground rules, for alpha = .05
For equal n's:
- if n1 = n2, if xbar1 > xbar2, and if the alternate hypothesis says
mu1 > mu2, then YOU MAY HAVE A PROBLEM REJECTING THE NULL HYPOTHESIS
(this is because both means are varying in the SAME DIRECTION.)
- if n1 = n2 and the mus and xbars vary oppositely, then NO PROBLEM.
For unequal n's:
- if n1 is not equal to n2, but s1 = s2, NO PROBLEM.
- if the n's and the s's are both unequal, there may be a problem.
- if the n's and s's are unequal in OPPOSITE DIRECTIONS, the t-test is
liberal. That means alpha > .05, so it's OK to accept the null
hypothesis (probably you are seeing chance variations), but IT IS NOT OK
TO REJECT THE NULL HYPOTHESIS.
- if the n's and s's are unequal in THE SAME DIRECTION, the t-test is
conservative. Hence, alpha < .05, so it's OK to reject the null
hypothesis (you are probably seeing a real effect), but IT IS NOT OK TO
ACCEPT THE NULL HYPOTHESIS (you throw out the baby with the bath water.)
Hartley's Fmax test
In the liberal/conservative cases above, you need to test for homogeneity
of variance. You want to satisfy hzero, i.e. all variances are equal.
The statistic you use is Fmax.
- Get s1 and s2, and square each of them.
- J is the number of groups.
- Calculate df = n-1. (n is the larger of the
two sample sizes.)
- Fmax = s**2(largest)/s**2(smallest)
- Look up Fmax for J groups and df degrees of freedom. If your
obtained Fmax value exceeds the critical value, then reject hzero. Now
you know you are in trouble! If n's and s's vary in the same direction
you're conservative, if in opposite directions you're liberal.
- If your obtained Fmax is less than the critical value, then use the
regular t-test safely. Here, you are not in trouble.
- If your test was conservative (very low alpha, little chance) and you
rejected hzero, you are OK. Else report conservative.
- If your test was liberal (very high alpha, lots of chance) and you
accepted hzero, you are OK. Else report liberal.
Back to Statistics course
Lorraine Sherry
lsherry@carbon.cudenver.edu
Updated October 7, 1996