t tests - excel
TRANSCRIPT
T‐Tests Microsoft Excel 2010
Applied Statistics Laboratory
1
January 31, 2014
This tutorial explains how to perform one sample, two sample, and paired t‐tests in
Excel.
One Sample T‐test
One sample t‐tests test whether the population mean underlying a sample set of
numbers is different from a selected value. Excel does not have a one‐sample t‐test
function. To work around this, replicate the number you are testing against (your
selected value) as a second group. In the following example, we wish to test whether
the “Sample” is different from the historical control of 8.
Step 1: Click and highlight the empty cell where you would like results of the t‐test to
be placed.
T‐Tests Microsoft Excel 2010
Applied Statistics Laboratory
2
January 31, 2014
Step 2: Click the “fx” at the top of the spreadsheet. Once selected, the following screen
will appear.
T‐Tests Microsoft Excel 2010
Applied Statistics Laboratory
3
January 31, 2014
Step 3: Select the statistical category.
T‐Tests Microsoft Excel 2010
Applied Statistics Laboratory
4
January 31, 2014
Step 4: Scroll down, select the TTEST (also seen as T.TEST) function and click OK.
The following dialog box will appear.
T‐Tests Microsoft Excel 2010
Applied Statistics Laboratory
5
January 31, 2014
Step 5: For Array 1, highlight first set of data. After you have highlighted, Excel will
automatically fill in that argument.
T‐Tests Microsoft Excel 2010
Applied Statistics Laboratory
6
January 31, 2014
Step 6: Repeat for Array 2, highlighting the second group of data.
T‐Tests Microsoft Excel 2010
Applied Statistics Laboratory
7
January 31, 2014
Step 7: Tails specifies the number of distribution tails to return; type “2” for hypothesis
of difference (two‐sided test).
Use “3” as the t‐test type.
T‐Tests Microsoft Excel 2010
Applied Statistics Laboratory
8
January 31, 2014
Step 8: Click OK. The result of this function is the p‐value for your t‐test.
A p‐value below or equal to your significance level (typically 0.05) indicates a
statistically significant difference; a p‐value greater than your significance level
indicates no statistical difference.
In this example, 0.004 is less than the significance level of 0.05. Therefore, we conclude
that the sample is significantly different from the historical control of 8.
T‐Tests Microsoft Excel 2010
Applied Statistics Laboratory
9
January 31, 2014
Two Sample T‐test
Two sample t‐tests test whether the population means underlying two sample sets of
numbers are different from each other. There are two forms of the two sample t‐tests.
The first is the one‐sided test, which is appropriate when we wish to learn whether the
mean of one group is greater than the mean of the other group. The second is the two‐
sided test, which is appropriate when we wish to learn merely whether the means of the
two groups are different. In the following example, we wish to utilize the two‐sided test
to determine whether the mean for “Group A” is different from the mean for “Group
B”.
Step 1: Click and highlight the empty cell where you would like results of the t‐test to
be placed.
T‐Tests Microsoft Excel 2010
Applied Statistics Laboratory
10
January 31, 2014
Step 2: Click the “fx” at the top of the spreadsheet. Once selected, the following screen
will appear.
T‐Tests Microsoft Excel 2010
Applied Statistics Laboratory
11
January 31, 2014
Step 3: Select the statistical category.
T‐Tests Microsoft Excel 2010
Applied Statistics Laboratory
12
January 31, 2014
Step 4: Scroll down, select the TTEST (also seen as T.TEST) function and click OK.
The following dialog box will appear.
T‐Tests Microsoft Excel 2010
Applied Statistics Laboratory
13
January 31, 2014
Step 5: For Array 1, highlight first set of data. After you have highlighted, Excel will
automatically fill in that argument.
T‐Tests Microsoft Excel 2010
Applied Statistics Laboratory
14
January 31, 2014
Step 6: Repeat for Array 2, highlighting the second group of data.
T‐Tests Microsoft Excel 2010
Applied Statistics Laboratory
15
January 31, 2014
Step 7: Tails specifies the number of distribution tails to return; type “1” for the one‐
sided test, type “2” for the two‐sided test.
Use Type “2” as the t‐test type if assuming equal variance; use Type “3” if assuming
unequal variance.
T‐Tests Microsoft Excel 2010
Applied Statistics Laboratory
16
January 31, 2014
Step 8: Click OK. This function gives the p‐value for your t‐test.
A p‐value below or equal to your significance level (typically 0.05) indicates a
statistically significant difference; a p‐value greater than your significance level
indicates no statistical difference.
In this example, 0.192 is greater than the significance level of 0.05. Therefore, we
conclude that there is not a statistical difference between Group A and Group B.
Alternatively, we could state that there is insufficient evidence to determine whether
there is a difference in Group A and Group B.
T‐Tests Microsoft Excel 2010
Applied Statistics Laboratory
17
January 31, 2014
Paired T‐test
Paired t‐tests test whether two set of related numbers are different from one another.
There are two forms of the paired t‐tests. The first is the one‐sided test, which is
appropriate when we wish to learn whether the mean of one group is greater than the
mean of the other group. The second is the two‐sided test, which is appropriate when
we wish to learn merely whether the means of the two groups are different. In the
following example, we wish to utilize the two‐sided test to determine whether the mean
for “Pre” is different from the mean for “Post”.
Step 1: Click and highlight the empty cell where you would like results of the t‐test to
be placed.
T‐Tests Microsoft Excel 2010
Applied Statistics Laboratory
18
January 31, 2014
Step 2: Click the “fx” at the top of the spreadsheet. Once selected, the following screen
will appear.
T‐Tests Microsoft Excel 2010
Applied Statistics Laboratory
19
January 31, 2014
Step 3: Select the statistical category.
T‐Tests Microsoft Excel 2010
Applied Statistics Laboratory
20
January 31, 2014
Step 4: Scroll down, select the TTEST (also seen as T.TEST) function and click OK.
The following dialog box will appear.
T‐Tests Microsoft Excel 2010
Applied Statistics Laboratory
21
January 31, 2014
Step 5: For Array 1, highlight first set of data. After you have highlighted, Excel will
automatically fill in that argument.
T‐Tests Microsoft Excel 2010
Applied Statistics Laboratory
22
January 31, 2014
Step 6: Repeat for Array 2, highlighting the second group of data.
T‐Tests Microsoft Excel 2010
Applied Statistics Laboratory
23
January 31, 2014
Step 7: Tails specifies the number of distribution tails to return; type “1” for the one‐
sided test, type “2” for the two‐sided test.
Use “1” as the t‐test type.
T‐Tests Microsoft Excel 2010
Applied Statistics Laboratory
24
January 31, 2014
Step 8: Click OK. This function gives the p‐value for your t‐test.
A p‐value below or equal to your significance level (typically 0.05) indicates a
statistically significant difference; a p‐value greater than your significance level
indicates no statistical difference.
In this example, 0.196 is greater than the significance level of 0.05. Therefore, we
conclude that there is not a statistical difference between Pre and Post. Alternatively, we
could state that there is insufficient evidence to determine whether there is a difference
in Pre and Post.