Mass Communication Research
t-test Lab

INDEX SYLLABUS SCHEDULE e-MEDIA COMM-STOP

For this lab download the Clean300.sav file.

As noted in the t-test Web notes, there are three different types of t tests. How will you know which to use? How will you get it to work on SPSS? This lab should help you learn the answers to those questions. It's a good idea for you to use the data set to run these examples for yourself. We'll use the Clean300.sav SPSS data file. You can download this file from the "assignments" page in Course Info, then open the file by double-clicking on it.

A REMINDER ABOUT SPSS — SPSS labels the independent variable as the "grouping" variable, and the dependent variable as the "test" variable.  As in crosstabulation, SPSS places the dependent variable in the top box.

A REMINDER ABOUT T TESTS — The independent variable will always be nominal or categorical data. The dependent variable will either be interval or ratio data.

INDEPENDENT SAMPLE t test
The Independent Sample t test compares means for two groups of cases. It is the most commonly used t test in communications research. For the hypothesis, "Males have higher GPAs than females," an independent sample t test will compare the means GPA (variable 25) by gender (variable 28). 

To do this we go to Analyze, Compare Means, and then Independent Sample t test. You then get a pop-up window like the one below.

When you click on "independent samples t-test," you'll get another window like the one below.

The dependent variable will be students' GPA. Highlight it in the left box and click the arrow to put it in the top right box. The independent variable will be gender so you highlight it in the left and click the arrow to put it in the bottom right box.

After you move gender into the grouping variable, you have to tell SPSS how the variable was coded in the data set. To do this make sure that the variable gender is highligted in the right box and click on "define groups." In this data set, males were coded "1" and females were coded "2". When the pop-up window appears, enter 1 for males and 2 for females so the display looks like the one below.

(Your variable could have more than two values and then you have to tell SPSS what two groups you want to compare. For instance, if you wanted to compare the GPA of freshmen to seniors, you would use the variable class rank {variable 1} as the grouping variable. You'd have to tell SPSS the way these groups were coded; in this case the groups would be 1 for freshmen and 4 for seniors).

Click Continue and you will come back to the original pop-up window. Then click Okay. The computer will run the comparison and produce an output file for you to analyze. 
 
Group Statistics
Gender N Mean Std. Deviation Std. Error Mean
GPA male 185 3.0980 .4619 3.396E-02
female 187 3.1762 .4736 3.463E-02

Independent Samples Test
Levene's Test for Equality of Variances t-test for Equality of Means
F Sig. t df Sig. (2-tailed) Mean Difference Std. Error Difference 95% Confidence Interval of the Difference
Lower Upper
GPA Equal variances assumed .152 .697 -1.612 370 .108 -7.8214E-02 4.851E-02 -.1736 1.718E-02
Equal variances not assumed -1.613 369.927 .108 -7.8214E-02 4.850E-02 -.1736 1.716E-02

The first thing on the page is Group Statistics. You will see the groups you are comparing (male and female), the number of cases in each group (185 males and 187 females), and the mean GPA for each group (3.10 for males and 3.18 for females {remember to round!}). You need to be cognizant of the numbers you are comparing. Look at the means — are they different? Is the difference large enough that we expect it to be significant?

Under that information will be in the next  box. The first thing we notice is the Levene's test, which indicates if the variances of the two samples are different. Is it significant? This will determine which t-score we choose. If Levene's test was NOT significant, choose the "t" value on the row Equal variances assumed. If the Levene's test WAS significant, choose the "t" value in the row Equal Variances not assumed. In this case, the significance is 0.70 (rounded from 0.697), which is more than 0.05. Thus we determine that equal variances are assumed, and use the "t" value from the top line.

We are looking for a t-value and that value's significance. When viewing the "t" value, please note that you should ignore the sign (+/-). An easy way to think of this is make "t" an absolute value. The sign (+/-) is a result of the order in which you entered the grouping variable. When looking for the significance of t, you must remember to determine if we have a one-tailed or two-tailed hypothesis. A two-tailed hypothesis states there are differences between the variables, while a one-tailed hypothesis states a direction, i.e. one is "higher" or "better" than the other. If our hypothesis is two-tailed, use the significance value given in output. If one-tailed, divide the significance value by 2 (be sure to round to the third place to the right of the decimal). When writing the significance of "t", be sure to place a zero before the decimal point (e.g. 0.05 instead of .05) or the computer will not correctly grade the answer.

From the Levene's test, we know we should use the "t" value of 1.612. The significance level is 0.108 for a two-tailed hypothesis. However, our hypothesis is one-tailed as it calls for a difference with direction, i.e. we expect males to have higher GPAs than females. So we'll need to divide the significance value by 2. This gives us a one-tailed significance of 0.054, which we'd report as 0.05.

How do I interpret it?

Once we've determined significance, we must interpret our findings by stating our conclusions in terms of the differences in means. In this case, we'd say there is a difference in GPA between males (3.10) and females (3.18). However we accept the null hypothesis that there is no significant difference between the two groups. Why? Remember, significance is less than 0.05, not equal to it. 

NOTE: If the "t" value were shown to be significant, would it have supported our hypothesis? NO. Why? Look back at the means. We had hypothesized that men would have higher GPAs than women. But in this instance, the means indicate women have higher  GPAs than men — the opposite of the prediction! Remember, you can't tell if your hypothesis was confirmed just by looking at the significance; you have to look at and interpret the means.

ONE-SAMPLE T TEST

The One-Sample t test examines whether the mean of a single variable differs from the population. For the hypothesis "There is a difference between the sample GPA and the mean GPA of the university," we'd use the One-Sample t test to compare the mean GPA of the sample (variable 43) to the mean GPA of the university. Assume we contacted the registrar, who informed us the average GPA of all UT students is 3.0.

To do this we go to Analyze, Compare Means, and then click on One-Sample t test.

After the next window opens, enter GPA into the test variable, then enter 3.0 as the test value as shown below.

Hit OK.

The output will first show the group statistics. Look at the mean GPA for the group; in this case, it would be 3.14 (remember to round to the hundredths spot — two digits to the right of the decimal). Is there a difference between this and the test value GPA of  3.0? Would we expect there to be a significant difference?

The next box will give the results of the One-Sample t test. The "t" value is 5.65, and the associated significance is 0.00 for a two-tailed hypothesis. In this case, our hypothesis is two-tailed as we only expected a difference between the two means, but we didn't indicate the direction that difference would take. 
One-Sample Statistics
N Mean Std. Deviation Std. Error Mean
GPA 372 3.1373 .4688 2.431E-02

One-Sample Test
Test Value = 3.0
t df Sig. (2-tailed) Mean Difference 95% Confidence Interval of the Difference
Lower Upper
GPA 5.648 371 .000 .1373 8.948E-02 .1851

How do I interpret it?

Again, once we've determined significance, we must interpret our findings by stating our conclusions in terms of the differences in means. In this case we can say that the average GPA of our sample (3.14) is significantly different from the average GPA of the university (3.00).

PAIRED-SAMPLE T TEST

The Paired-Sample t test compares the means of two variables for a single group. For this example, let's test the hypothesis: Students rate the quality of their instructors (variable 3B) lower than they rate the quality of their advisors.(variable 3C)

To do this we go to Analyze, Compare Means, and then Paired-Samples t test.

In the next window, highlight the two variables you want to compare — in this case, we'll use the rating of instructors (variable 3B) and rating of advisors (variable 3C). Notice when you highlight a variable, it appears in current selections. Once two variables are highlighted, you can hit the arrow to move them into the "paired variables" box.

Then hit OK.
Paired Samples Statistics
Mean N Std. Deviation Std. Error Mean
Pair 1 rate quality of instructors 6.7572 451 1.5830 7.454E-02
rate quality of advisors 6.0000 451 2.3767 .1119

Paired Samples Correlations
N Correlation Sig.
Pair 1 rate quality of instructors & rate quality of advisors 451 .480 .000

Paired Samples Test
Paired Differences t df Sig. (2-tailed)
Mean Std. Deviation Std. Error Mean 95% Confidence Interval of the Difference
 
 
Lower Upper
 
 
Pair 1 rate quality of instructors - rate quality of advisors .7572 2.1321 .1004 .5599 .9545 7.542 450 .000

The output will first show the group statistics. Notice the difference in the means. The mean for rating of instructors is 6.76 and the mean for rating of advisors is 6.00. Is the difference between these means significant?

The second box will show correlations between the two variables, but we won't deal with that right now. Go to the third box. The "t" value is 7.54 with a two-tailed significance of 0.00. In this case, our hypothesis is one-tailed. Why? Since it's one-tailed, we divide the significance by 2. As zero divided by anything is zero, the one-tailed significance is still 0.00.

How do I interpret it?

Again, once we've determined significance, we must interpret our findings by stating our conclusions in terms of the differences in means. It's important to know what the numbers mean. In this case the numbers are ratings on a 1-to-10 scale, with 10 being the high end.

If we were to only look at the significance, we might think that our hypothesis is confirmed. But this is only half of the story. By examining the means, we can tell that the mean rating for instrutors is higher that the mean rating for advisors — the opposite of what we predicted. Remember, you can't tell if your hypothesis was confirmed just by looking at the significance; you have to look at and interpret the means.

Our actual interpretation of the data would be: Students rate the quality of their instructors significantly higher (6.76) than the quality of their advisors (6.00). Our hypothesis is not supported.

If you don't understand something in this Web note, please e-mail Dr. Sitton.

INDEX SYLLABUS SCHEDULE e-MEDIA COMM-STOP

©M. Mark Miller & Ronald W. Sitton 2009
Revised 092811 — http://www.uamont.edu/FacultyWeb/sitton/crz/mrea/t-testlab.html