So we'll use the same logic and steps for hypothesis testing that we used in the previous labs, and fill in the details of the differences as we go.
Step 2: Compute the observed t for your samples Step 3: Compare observed t to critical t (or p to α) and make a decision
Let's start with Step 1: Figuring out your criteria is exactly the same process as before, you pick what your field has decided as being an accepted level of alpha (chance of making a type I error). For our example, let's assume α = 0.05 The hypotheses are going to be a bit different, because the situation is different. Remember, that now we are making hypotheses about two different populations, not just comparing a treatment to what is known. For example, suppose that you want to compare two different treatments (e.g., two ways of studying, two different drugs, etc), or you want to compare two groups of people (e.g., men vs. women, young vs. old, etc.). So now, the hypotheses are about population A (men) and population B (women), and how they are different from one another.
Is this going to be a one-tailed test or a two-tailed test? In this case, we'll conduct a two-tailed test. We won't make a directional prediction. So the H0 hypothesis would be that men and women are the same height. That is,
- or - H0: μMen - μWomen = 0
- or - H1: μMen - μWomen ≠0
We are going to be using two samples, one to represent each population. This is a good time to look at some sample data: Men's
heights: 67, 73, 74, 70, 70, 75, 73, 68, 69
Think about it this way, with one sample we used n - 1 because all of the values in the sample are free to vary but one, because we know the value of the sample mean. Now consider the current situation. We've got two samples. How many values are free to vary?
sample 2: nWomen - 1 so together there are nMen + nWomen - 2 = df We need to know how many individuals we have in our samples. nA = 9 and nB = 9 So the df for our example is: nA + nB - 2 = 9 + 9 - 2 = 16 Remember, that because we're using samples, we can only estimate the values of the population parameters and so we're going to need to take degrees of freedom into account. So what is our
critical t for a 2-tailed test? Critical t = TINV(2α/tails, df) = TINV(2 * .05 / 2, 16) = TINV(.05, 16) = 2.12 Now comes the big difference. We need to compute our observed t statistic. At the conceptual level, the formula is the same. However, at the practical level, it is a much more complex because we have two samples, which means that we have two estimates. Let's break the formula below into several parts. ![]() So
the numerator is straightforward:
The
denominator is where things become
complex: The
formula is going to be a little
tricky but is based on the same idea as other standard errors. Let's
rewrite
the estimated standard error formula so both the numerator and
denominator are under the square root like this: We
see that there is an estimated
variance (s2)
in the numerator and a sample size n in the denominator. Eventually,
we'll do roughly the same thing with the independent samples
t-test but it will require several steps to get there. In
order to calculate the standard
error, we are going to need the formulas for the degrees of freedom
first. dfA
and dfB are
simply the sample sizes of groups A and B minus 1. The
total degrees of freedom is df = dfA
+ dfB = (nA -1) +
(nB - 1) = nA
- nB - 2 Second,
we need a sort of average
variance in the 2 samples. We call this, "pooled variance." It is a
measure of variance that is a weighted average of both samples'
variance. Here is the
formula for pooled variance:
An
alternate formula for pooled
variance that makes it easier to calculate from SPSS output is:
The
pooled variance is just a step on
the way to calculating the estimated standard
error of
the difference between sample means. Here is the formula for that: Thus,
you can see that there is a sort
of variance in the numerators and sample sizes in the denominators.
Thus, although the formula looks very weird, at its core, it is very
much like the formula we've already seen. Example: Suppose
we have Groups 1 and 2 with 5 and 4 scores,
respectively.
If we
calculate the means, sums of squares, and
degrees of freedom, we get the following:
Total
degrees of freedom = 4 + 3 = 7 Finally,
we see that the observed t of 2.80 is
larger than the critical t of 2.36 and thus we reject the null
hypothesis. Assumptions of all t-tests (1) The observations are independent (both between and within groups) (2)
The two populations are normally
distributed ** New Assumption ** (3) The two populations have equal variances. This is referred to as the homogeneity of variance assumption. Recall that in the formula we pool our sample variances. This is an okay thing to do if the variances are about the same. However, it isn't okay if they are very different. SPSS provides a test for this assumption. In the output for the Independent Samples Test, you'll see a box labeled Levene's Test for Equality of Variances. If this test is significant (the Sig. value is 0.05 or less), then there is evidence that this assumption has been violated and a corrected formula must be used. We won't deal directly with this corrected formula but we can make use of it from SPSS output. Using SPSS to compute independent samples t-tests
If you do not have the raw data but you do know the
means, standard deviations, and sample sizes of the two groups you wish
to compare, you can use this
spreadsheet to conduct an independent-samples t-test. Download the worksheet
here to answer the questions.
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||