The independent two-sample t-test is used to test whether population means are significantly different from each other. Independent samples are randomly drawn using the means.
When to use two independent samples t-test?
If you have 2 independent groups of subjects. For example CEOs and non-CEOs, men and women, or people who received a treatment and people who didn’t, and you want to test whether they come from populations with the same mean for the variable of interest. In such cases you have a 2-independent samples design. Furthermore, in an independent-samples design, there is no relationship between people or objects in the 2 groups. The t-test you use is called an independent-samples t-test.
- You want to test the null hypothesis that, in the U.S. population, the average hours spent watching TV per day is the same for males and females.
- You want to compare 2 teaching methods. One group of students is taught by one method, while the other group is taught by the other method. At the end of the course, you want to test the null hypothesis that the population values for the average scores are equal.
- You want to test the null hypothesis that people who report their incomes in a survey have the same average years of education as people who refuse.
SPSS with example
If you have 2 independent groups of subjects, e.g., boys and girls, and want to compare their scores, your data file must contain two variables for each child: one that identifies whether a case is a boy or a girl, and one with the score. The same variable name is used for the scores for all cases. To run the 2 independent samples T test, you have to tell SPSS which variable defines the groups. That’s the variable Gender, which is moved into the Grouping Variable box. Notice the 2 question marks after a variable name. They will disappear after you use the Define Groups dialog box to tell SPSS which values of the variable should be used to form the 2 groups.
PLEASE NOTE: In the define groups dialog box, you must enter the actual values that you entered into the data editor, not the value labels. If you used the codes of 1 for male and 2 for female and assigned them value labels of m and f, then you enter the values 1 and 2, not the labels m and f, into the define groups dialog box.
An analyst at a department store wants to evaluate the success of a recent credit card promotion campaign which consisted of 2 strategies: reduced prices promotion; and seasonal ads. Success was measured in terms of response received as compared to money spent on that strategy. To this end, 500 cardholders were randomly selected. Half received an ad promoting a reduced interest rate on purchases made over the next three months, and half received a standard seasonal ad.
- Step 1: Select Analyze, then compare means, then independent samples T test
- Step 2: Select “Money spent during the promotional period” as the test variable. Select type of mail insert received (Reduced price promotion OR seasonal ad) as the grouping variable. Then click “Define groups”.
Type “0” as the group 1 variable and “1” as the group 2 variable under “Define groups”. For the default, the program should have “use specified values” selected. Then click continue and ok.
The Descriptives table displays the sample size, mean, standard deviation, and standard error for both groups. On average, the company collected $71 more with reduced interest rates group than the seasonal ad group (New Promotion mean minus Standard promotion mean in the table 1 below).
The procedure produces two tests of the difference between the two groups. The first test is “Levene’s Test”. This test checks the variation in opinions within the two sample groups (promotional reduced interest rate versus seasonal Ad). Secondly it also shows results for “t-test for equality of means” (See table 3). This test checks the mean difference between the response to the two ads.
The first test (Levene test) assumes that the variances of the two groups are equal. The Levene statistic tests this assumption.
The confidence interval in this case is set at 95%. In this example, the significance value of the statistic is 0.276. This value is greater than 0.10. Therefore, you can assume that the groups have equal variances and ignore the second test (t-test for equality of means). In addition this means that 95% people within the sample groups (seasonal ad and promotional reduced interest rate) have not started spending more after receiving the promotional offer.
Suppose if the result in Levene test was “Significant” (sig value <0.05), then we would have proceeded to check the “sig” value of “T-test for equality of means”. It is 0.024. Therefore it is significant. The result would mean that there is a significant difference in the spending pattern of people in different groups (seasonal ad and promotional reduced interest rate) after initiating the new promotional ad.
Legends (Table 3)
- The df column displays degrees of freedom. For the independent samples t test, this equals the total number of cases in both samples minus 2.
- The column labeled Sig. (2-tailed) displays a probability from the t distribution with 498 degrees of freedom. The value listed is the probability of obtaining an absolute value greater than or equal to the observed t statistic, if the difference between the sample means is purely random.
- The Mean Difference is obtained by subtracting the sample mean for group 2 (the New Promotion group) from the sample mean for group 1.
- The 95% Confidence Interval of the Difference provides an estimate of the boundaries between which the true mean difference lies in 95% of all possible random samples of 500 cardholders.
The significance value of the test is less than 0.05. On the basis of this you can safely conclude that the average of 71.11 dollars more spent by cardholders receiving the reduced interest rate is not due to chance alone. Therefore the store will now consider extending the offer to all credit customers.