There are basically three types of t tests. We are going to look at each one in turn, that is, how to perform and interpret the output. The three types are:
Independent-samples t test (two-sample t test):
This is used to compare the means of one variable for two groups of cases. As an example, a practical application would be to find out the effect of a new drug on blood pressure. Patients with high blood pressure would be randomly assigned into two groups, a placebo group and a treatment group. The placebo group would receive conventional treatment while the treatment group would receive a new drug that is expected to lower blood pressure. After treatment for a couple of months, the two-sample t test is used to compare the average blood pressure of the two groups. Note that each patient is measured once and belongs to one group.
Paired-samples t test (dependent t test):
This is used to compare the means of two variables for a single group. The procedure computes the differences between values of the two variables for each case and tests whether the average differs from zero. For example, you may be interested to evaluate the effectiveness of a mnemonic method on memory recall. Subjects are given a passage from a book to read, a few days later, they are asked to reproduce the passage and the number of words noted. Subjects are then sent to a mnemonic training session. They are then asked to read and reproduce the passage again and the number of words noted. Thus each subject has two measures, often called, before and after measures.
An alternative design for which this test is used is a matched-pairs or case-control study. To illustrate an example in this situation, consider treatment patients. In a blood pressure study, patients and control might be matched by age, that is, a 64-year-old patient with a 64-year-old control group member. Each record in the data file will contain response from the patient and also for his matched control subject.
One-sample t test:
This is used to compare the mean of one variable with a known or hypothesized value. In other words, the One-sample t test procedure tests whether the mean of a single variable differs from a specified constant. For instance, you might be interested to test whether the average IQ of some 50 students differs from 125.
Before we look at the details of how to perform and interpret a t test, it is good idea for you to understand the assumption underlying the use of t test. It is assumed that the data has been derived from a population with normal distribution and equal variance. With moderate violation of the assumption, you can still proceed to use the t test provided the following is adhere to:
However, if the sample seriously violates the assumption then Nonparametric Tests should be used. Nonparametric tests do not carry specific assumptions about population distributions and variance.
In the interpretation of the t statistics, we will be looking at its p-value. Generally, there are three situations where you will need to interpret the p-value:
After understanding the background of a t test, let us consider some real examples.
To illustrate this procedure, consider the data shown on Table 1 below. Twenty patients suffering from high blood pressure were randomly selected and assigned to two separate groups. One group called the placebo group were given conventional treatment and the other group called newdrug were given a new drug. The aim was to investigate whether the new drug will reduced blood pressure.
Table 1: Patients with high blood pressure
|
Group |
Blood pressure |
|
1 |
90 |
|
1 |
95 |
|
1 |
67 |
|
1 |
120 |
|
1 |
89 |
|
1 |
92 |
|
1 |
100 |
|
1 |
82 |
|
1 |
79 |
|
1 |
85 |
|
2 |
71 |
|
2 |
79 |
|
2 |
69 |
|
2 |
98 |
|
2 |
91 |
|
2 |
85 |
|
2 |
89 |
|
2 |
75 |
|
2 |
78 |
|
2 |
80 |
Note: 1 is a code for the placebo group and 2 is a code for the newdrug group
Using the techniques described in Getting Started for SPSS define the grouping (independent) variable as group and the dependent variable as blodpres. Fullers names (e.g. Treatment Groups and Blood pressure) and value labels (e.g. placebo and newdrug) can be assigned by using the Define Labels procedure. Type in the data and save in a suitable file. After the data has correctly been entered into the Data Editor of SPSS, we are now ready to perform some analysis. To carry out the t test procedure follow these instructions:
From the menus choose:
Statistics
Compare means
Independent-samples T Test.
The Independent-Samples T Test dialog box will be loaded on the screen as shown below. Highlight the variable blodpres and click on the top arrow (>) to transfer it to the Test Variable(s) text box. Highlight the grouping variable group and click on the bottom arrow (>) to transfer it to the Grouping Variable text box.
The Independent-Samples
T Test dialog box
At this point, the Grouping Variable text box will appear with ??. Now click on the Define Groups button and the Define Groups dialog box will be loaded on the screen. Type the value 1 into the Group 1 text box and the value 2 into the Group 2 text box. The Define Groups dialog box should be completed as shown below. Click on Continue and then on OK to run the t test.
The Define Groups
dialog box
Now let us look at the output listing.
The output listing starts with a table of statistics for the two groups followed by another table showing the mean difference between the two groups and some other statistics. One of the assumption underlying the use of t test is the equality of variance, the Levene test for homogeneity (equality) of variance is included in the table. Provided the F value is not significant (p > 0.05), the variances can be assumed to be homogeneous and the Equal Variance line values for the t test be used. If p < 0.05, then the equality of variance assumption has been violated and the t test based on the separate variance estimates (Unequal Variances) should be used.
In this case, the Levene test is not significant, so the t value calculated with the pooled variance estimate (Equal Variance) is appropriate. With a 2-Tail Sig (i.e. p-value) of 0.130 (i.e. 13%), the difference between means is not significant.
As mentioned above, paired-samples t test is used to compare the means of two variables for a single group. To illustrate this procedure, consider the data shown on Table 2 below. Subjects were given a passage to read and ask to reproduce it on a later date. Subjects were then sent to a mnemonic training session and after the training, subjects were given the same passage and asked to reproduce it on a later date. The table show the number of words recalled by subjects before and after the mnemonic training session.
Table 2: Number of words recalled
|
Before mnemonic training |
After mnemonic training |
|
204 |
223 |
|
393 |
412 |
|
391 |
402 |
|
265 |
285 |
|
326 |
353 |
|
220 |
243 |
|
423 |
443 |
|
342 |
340 |
|
480 |
582 |
|
464 |
490 |
Define the variables names as before and after and use the Define Labels procedure to provide fuller names such as Words recalled before training and Words recalled after training. Type the data into two columns and save under a suitable name. After the data has correctly been entered into the Data Editor of SPSS, we are now ready to perform some analysis. To carry out the t test procedure follow these instructions:
From the menus choose:
Statistics
Compare means
Paired-Samples T Test.
The Paired-Samples T Test dialog box will be loaded on the screen as shown below. Highlight the two variables names from the left hand box and transfer them into the Paired Variables text box. Now click on OK to run the procedure. Let us look at the output listing.
The Paired-Samples
T Test dialog box
T test output listing for Paired-Samples
The output listing starts with a table of statistics for the two variables (see below).
The next table from the output listing gives the correlation between the two variables which is 0.975.
The last table from the output listing contains the t-value (3.013) and the 2-tail p-value (0.015). The 95% confidence interval of 6.60 to 46.40 is also shown on the table. Since the p-value of 0.015 is less than 0.05 the difference between the means is significant. In other words, sending subjects to mnemonic training session improves their memory recall.
One-Sample T Test
The One-Sample t test procedure tests whether the mean of a single variable differs from a specified constant. For example, you might want to test whether the IQs of 10 students in your class differs from 125. Data for the ten students is shown on Table 3 below.
Table 3: IQs of students
|
IQs |
|
128 |
|
134 |
|
134 |
|
131 |
|
134 |
|
126 |
|
140 |
|
133 |
|
127 |
|
131 |
Define the name of the variables as iqs and use the Define Labels procedure to provide a fuller name such as Intelligence Quotient. Type the data into a single column and save under a suitable name. After the data has correctly been entered into the Data Editor of SPSS, we are now ready to perform some analysis. To carry out the t test procedure follow these instructions:
From the menus choose:
Statistics
Compare means
One-Sample T Test
The One-Sample T Test dialog box will be loaded on the screen as shown below. Highlight the variable iqs and transfer it to the Test Variable(s) text box. Enter 125 into the Test Value text box. Now click on OK to run the procedure. Let us look at the output listing.
The One-Sample T
Test dialog box
The output listing starts with a table of statistics for the variable. These include the mean, standard deviation and standard error (see table below).
The next table contains information about the t test. The t-value is 5.172 and the p-value is 0.001. Since the p-value is less than 0.05, the difference between the mean (131.80) and the test value (125) is statistically significant. The 95% confidence interval of the difference is 3.83 to 9.77.