A t-test is a statistical analysis designed to identify the differences, if any, between the means (averages) of two data sets. Need to perform one quickly? Let’s learn how to run a t-test in Excel.
How to Run a T-Test in Microsoft Excel
Imagine you have two sets of data. For our purposes, let’s use the average scores of two sports teams. We want to find out the differences, if any, in their given average performance.
T-tests may be one or two variables. Since these two data sets do not come from the same group, that makes this a two-variable test. (If you were comparing two data sets from the same team, it would be a one-variable test).
To start your analysis, begin by clicking into an empty cell on your worksheet. Type =, the standard way to begin any Microsoft Excel formula. Then, type ttest(.
As you can see, Excel is asking for four inputs:
array1,array2,tails,type.
Array1 is the data in column A, so begin by clicking and dragging to select the cell range, A2:A8. Type , and then repeat the click-and-drag step for your column B data.
Type , again. So far, your formula should read:
=ttest(A2:A8,B2:B8,
Tails will be either 1 or 2. If you believe there to be a significant difference between the two data sets, you’ll want to perform a 1-tail test. If you foresee no difference (or simply don’t know), run a 2-tail test. In our case, we’ll type 2, followed by , again.
Type refers to your number of variables. 1 would be a one-variable test. 2 is a two-variable test with equal variances. 3 is a two-variable test with unequal variances. (Hint: unless you know the variances are equal, use 3, unless you’re running a 1-variable test). Here, we’ll use 3. Close your ).
Your finished formula is:
=ttest(A2:A8,B2:B8,2,3)
Hit Enter, and Excel will return the value 0.98293835.
This number is what’s commonly called your p-value. Typically, the lower the value relative to 1, the more statistically significant it is. As you can see here, we’ve identified an insignificant difference between the two data sets.
This is how Microsoft Excel makes statistics a breeze.