Two-Sample t-Test Assuming Equal Variances in Excel
Use a t-Test to determine if means (i.e., averages) are the same or different
Prerequisite: Before using the t-test, use an F-test to determine if the variances are equal or unequal.
If they are not equal go to: Two-Sample t-Test assuming unequal variances.
(The QI Macros Stat Wizard will do this for you automatically.)
t-Test Two-Sample Assuming Equal Variances Video
t-Test Two-Sample Assuming Equal Variances Example
If you're producing rubber made from two different recipes, you might want to know if the tensile strengths are the same or different. So you test five samples of each to get the data:
Warning: While you can run a t-Test using Excel's Data Analysis Toolpak, if you don't enter the two columns in the correct order, Excel will give you incorrect results. The QI Macros have eliminated this problem.
To conduct an t-test using the QI Macros for Excel, follow these steps:
- Select the data with your mouse and click on the QI Macros Menu and select the Statistical Tools->Two-Sample t-Test Assuming Equal Variances:
- The QI Macros will prompt for a significance level (default is .05, or use 0.01 or 0.001):
Note: Significance Level = (1 - Confidence Level)
- Next the QI Macros will prompt for the hypothesized difference in the means (default is 0):
- The QI Macros will perform the calculations and interpret the results for you:
Interpreting t-Test Results With QI Macros
Note: Native Excel will not interpret the test results for you, but the QI Macros will compare the p-value (0.818) to the significance level (0.05) and tell you "Cannot Reject the Null Hypothesis because p>0.05" and that the "Means are the same."
If you want to evaluate the results manually, here is some guidance:
Define the null and alternate Hypothesis
- The null hypothesis H0 is that the mean difference ( x1-x2 ) = 0
or in other words the means are the same
- The alternative hypothesis Ha is that the mean difference <> 0
or in other words the means are not the same
|test statistic > critical value
(i.e. t> tcrit)
|Reject the null hypothesis|
|test statistic < critical value
(i.e. t< tcrit)
|Cannot Reject the null hypothesis|
|p value < a||Reject the null hypothesis|
|p value > a||Cannot Reject the null hypothesis|
Since the null hypothesis in this example is that the mean difference (1-x2) = 0, this is a two-sided test. Therefore, use the two-tail values for our analysis.
Since the t statistic < t critical (-.237 < 2.306) and p value > a ( .818> 0.05) , we cannot reject the null hypothesis that the means are the same.
Therefore we can say that the two recipes produce rubber with the same mean tensile strength at a 95% confidence level.
If you use Excel's Data Analysis Toolpak, Excel requires the recipe with the largest variance and mean to be first to ensure correct calculations. The QI Macros does not have this requirement in order to perform the calculations correctly.
- Two-Sample t-Test assuming unequal variances
- t-Test one sample
- Paired Two-Sample t-Test
- Statistics Wizard analyzes your data and selects the right statistical tests for you