t-Test in Excel

This example helps you learn how to do a t-test in Excel. The t-test is a statistical method used to determine if two sets of data have the same mean.

Here is the list of study hours for 6 female students and 5 male students.

H0: μ1 – μ2 = 0
H1: μ1 – μ2 ≠ 0

t-Test in Excel

To perform a t-test, execute the following steps.

1. The first step is to apply an F-test to determine whether the two populations have similar variances. This is not the case.

2. Under the Data tab, go to the Analysis group and click on Data Analysis.

Note: can’t find the Data Analysis button? Click here to load the Analysis ToolPak add-in.

3. From the options, select t-Test: Two-Sample Assuming Unequal Variances, and press OK.

4. Click inside the Variable 1 Range box, then select the cells from A2 to A7.

5. Select the Variable 2 Range box, and then highlight the cells B2:B6.

6. Click inside the Hypothesized Mean Difference box and enter 0 to represent the null hypothesis (H₀: μ₁ – μ₂ = 0).

7. Click inside the Output Range box, then select cell E1.

8. Click OK.

Result:

Conclusion: We do a two-tailed test (inequality). If the t-stat is less than -t Critical (two-tailed) or greater than t Critical (two-tailed), we reject the null hypothesis. In this case, it is not true because -2.365 < 1.473 < 2.365.

Therefore, we do not reject the null hypothesis. The difference between the sample means (33 – 24.8) is not large enough to conclude that female and male students study for significantly different amounts of time.

6/10 Completed! Learn more about the analysis toolpak ➝
Next Chapter: Create a Macro