t-test for Independent Samples - Arrangement of Data

In order to perform the t-test for independent samples, one independent (grouping) variable (example, Gender) and at least one dependent variable (example, a test score) are required.

The means of the dependent variable is compared between selected groups based on the specified values (grouping codes, example, male and female) of the independent variable. The following data set can be analyzed with a t-test comparing the average WCC score in males and females:

 GENDERWCC
case 1male111
case 2male110
case 3male109
case 4female102
case 5female104
 mean WCC in males = 110

mean WCC in females = 103

If you specified a list of dependent variables, then a series of t-tests is performed (one for each dependent variable).