# t-tests with Excel

In Module three, we conducted several t-tests by hand. Excel has the capability of conducting a two sample independent t-test. For this process, we are going to introduce a second data set (just for the t-test, we will go back to the previous data set for future sections.

 Test 1 Test 2 31 18 20 17 18 14 17 11 9 10 8 7 10 5 7 6 15 16 19 20

The meaning behind these values is not important, for our example, we just want to determine if a difference exists between them.

In Excel, there are three two-sample t-tests, one for samples with unequal variance, one for samples with equal variance, and a third for paired samples. In this section, we will look at the first two options. The test for unequal variance is the most common test and the one you should generally choose. The assumption of unequal variances is more reasonable (if the populations are different in means, why would the variances be equal?) and is never wrong. It could lead to erroneous results, however, to assume equal variances when, in fact, that assumption is false. It is worth noting that in statistical software the default is generally for unequal variances. We will not be examining the paired samples option.

For our first run through, let's assume that the samples here have unequal variances.

From the menu bar, select Tools > Data Analysis > t-test > Two Sample Assuming Unequal Variances. Type in the input range for each of the diets into the dialogue box provided, then select the output range and click OK.

Variable 1 Range: \$A\$1:\$A\$11

Variable 2 Range: \$B\$1:\$B\$11

Make sure the labels box is checked if you include the column headings (preferred).Note there is a field in the dialog box for you to enter the "Hypothesized Mean Difference." The default value is 0, and this is probably the most usual value for the difference. However, it might be good practice to always fill in this field, even if it is almost always 0. Then if you ever need to test a hypothesized difference other than 0 you will be in the habit of making sure the test the difference you want. Your call.