What is the Independent Sample T-Test?
The independent samples t-test is a member of the t-test family, which consists of tests that compare mean value(s) of continuous-level(interval or ratio data), normally distributed data. The independent samples t-test compares two means. It assumes a model where the variables in the analysis are split into independent and dependent variables. The model assumes that a difference in the mean score of the dependent variable is found because of the influence of the independent variable. Thus, the independent samples t-test is an analysis of dependence. It is one of the most widely used statistical tests, and is sometimes erroneously called the independent variable t-test.
The t-test family is based on the t-distribution, because the difference of mean score for two multivariate normal variables approximates the t-distribution. The t-distribution and also the t-test is sometimes also called Student’s t. Student is the pseudonym used by W. S. Gosset in 1908 to publish the t-distribution based on his empirical findings on the height and the length of the left middle finger of criminals in a local prison.
Within the t-test family, the independent samples t-test compares the mean scores of two groups in a given variable, that is, two mean scores of the same variable, whereby one mean represents the average of that characteristic for one group and the other mean represents the average of that specific characteristic in the other group. Generally speaking, the independent samples t-test compares one measured characteristic between two groups of observations or measurements. It tells us whether the difference we see between the two independent samples is a true difference or whether it is just a random effect (statistical artifact) caused by skewed sampling.
The independent samples t-test is also called unpaired t-test. It is the t-test to use when two separate independent and identically distributed variables are measured. Independent samples are easiest obtained when selecting the participants by random sampling.
The independent samples t-test is similar to the dependent sample t-test, which compares the mean score of paired observations these are typically obtained when either re-testing or conducting repeated measurements, or when grouping similar participants in a treatment-control study to account for differences in baseline. However the pairing information needs to be present in the sample and therefore a paired sample can always be analyzed with an independent samples t-test but not the other way around.
Examples of typical questions that the independent samples t-test answers are as follows:
- Medicine – Has the quality of life improved for patients who took drug A as opposed to patients who took drug B?
- Sociology – Are men more satisfied with their jobs than women? Do they earn more?
- Biology – Are foxes in one specific habitat larger than in another?
- Economics – Is the economic growth of developing nations larger than the economic growth of the first world?
- Marketing: Does customer segment A spend more on groceries than customer segment B?
The Independent Sample T-Test in SPSS
The independent samples t-test, or Student’s t-test, is the most popular test to test for the difference in means. It requires that both samples are independently collected, and tests the null hypothesis that both samples are from the same population and therefore do not differ in their mean scores.
Our research question for the independent sample t-test is as follows:
Does the standardized test score for math, reading, and writing differ between students who failed and students who passed the final exam?
Let’s start by verifying the assumptions of the t-test to check whether we made the right choices in our decision tree. First, we are going to create some descriptive statistics to get an impression of the distribution. In order to do this, we open the Frequencies menu in Analyze/Descriptive Statistics/Frequencies…
Next we add the two groups to the list of variables. For the moment our two groups are stored in the variable A and B. We deselect the frequency tables but add distribution parameters and the histograms with normal distribution curve to the output.
The histograms show quite nicely that the variables approximate a normal distribution and also their distributional difference. We could continue with verifying this ‘eyeball’ test with a K-S test, however because our sample is larger than 30, we will skip this step.
The independent samples t-test is found in Analyze/Compare Means/Independent Samples T-Test.
In the dialog box of the independent samples t-test we select the variable with our standardized test scores as the three test variables and the grouping variable is the outcome of the final exam (pass = 1 vs. fail = 0). The independent samples t-test can only compare two groups (if your independent variable defines more than two groups, you either would need to run multiple t-tests or an ANOVA with post hoc tests). The groups need to be defined upfront, for that you need to click on the button Define Groups… and enter the values of the independent variable that characterize the groups.
The dialog box Options… allows us to define how missing cases shall be managed (either exclude them listwise or analysis by analysis). We can also define the width of the confidence interval that is used to test the difference of the mean scores in this independent samples t-test.
The Output of the Independent Sample T-Test
The output of the independent samples t-test consists of only two tables. The first table contains the information we saw before when we checked the distributions. We see that the students that passed the exam scored higher on average on all three tests. The table also displays the information you need in order to calculate the t-test manually.
We are not going to calculate the test manually because the second table nicely displays the results of the independent samples t-test. If you remember there is one question from the decision tree still left unanswered, and that is, “Are the groups homoscedastic?”
The output includes the Levene Test in the first two columns. The Levene test tests the null hypothesis that the variances are homogenous (equal) in each group of the independent variable. In our example it is highly significant for the math test and not significant for the writing and reading test. That is why we must reject the null hypothesis for the math test and assume that the variances are not equal for the math test. We cannot reject the null hypothesis for the reading and writing tests, so that we might assume that the variances of these test scores are equal between the groups of students who passed the exam and students who failed the final exam.
We find the correct results of the t-test next to it. For the math score we have to stick to the row ‘Equal variances not assumed’ whereas for reading and writing we go with the ‘Equal variances assumed’ row. We find that for all three test scores the differences are highly significant (p < 0.001). The table also tells us the 95% confidence intervals for the difference of the mean scores; none of the confidence intervals include zero. If they did, the t-test would not be significant and we would not find a significant difference between the groups of students.
A possible write up could be as follows:
We analyzed the standardized test scores for students who passed the final exam and students who failed the final exam. An independent samples t-test confirms that students who pass the exam score significantly higher on all three tests with p < 0.001 (t = 12.629, 6.686, and 9.322). The independent samples t-test has shown that we can reject our null hypothesis that both samples have the same mean scores for math, reading, and writing.
Syntax
FREQUENCIES VARIABLES=Test_Score Test2_Score Test3_Score
/STATISTICS=STDDEV MEAN MEDIAN SKEWNESS SESKEW KURTOSIS SEKURT
/HISTOGRAM NORMAL
/ORDER=ANALYSIS.
T-TEST GROUPS=Exam(0 1)
/MISSING=ANALYSIS
/VARIABLES=Test_Score Test2_Score Test3_Score
/CRITERIA=CI(.95).
















