t tests - excel

24
TTests Microsoft Excel 2010 Applied Statistics Laboratory 1 January 31, 2014 This tutorial explains how to perform one sample, two sample, and paired ttests in Excel. One Sample Ttest One sample ttests test whether the population mean underlying a sample set of numbers is different from a selected value. Excel does not have a onesample ttest 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 ttest to be placed.

Upload: lamthu

Post on 10-Feb-2017

220 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: t tests - Excel

  

 

T‐Tests Microsoft Excel 2010 

Applied  Statistics  Laboratory 

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. 

 

  

Page 2: t tests - Excel

  

 

T‐Tests Microsoft Excel 2010 

Applied  Statistics  Laboratory 

January 31, 2014 

Step 2: Click the “fx” at the top of the spreadsheet.  Once selected, the following screen 

will appear. 

 

  

Page 3: t tests - Excel

  

 

T‐Tests Microsoft Excel 2010 

Applied  Statistics  Laboratory 

January 31, 2014 

Step 3: Select the statistical category. 

 

  

Page 4: t tests - Excel

  

 

T‐Tests Microsoft Excel 2010 

Applied  Statistics  Laboratory 

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. 

 

 

Page 5: t tests - Excel

  

 

T‐Tests Microsoft Excel 2010 

Applied  Statistics  Laboratory 

January 31, 2014 

 

Step 5: For Array 1, highlight first set of data.  After you have highlighted, Excel will 

automatically fill in that argument. 

 

  

Page 6: t tests - Excel

  

 

T‐Tests Microsoft Excel 2010 

Applied  Statistics  Laboratory 

January 31, 2014 

Step 6: Repeat for Array 2, highlighting the second group of data. 

 

  

Page 7: t tests - Excel

  

 

T‐Tests Microsoft Excel 2010 

Applied  Statistics  Laboratory 

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. 

 

 

Page 8: t tests - Excel

  

 

T‐Tests Microsoft Excel 2010 

Applied  Statistics  Laboratory 

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.   

 

Page 9: t tests - Excel

  

 

T‐Tests Microsoft Excel 2010 

Applied  Statistics  Laboratory 

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. 

 

  

Page 10: t tests - Excel

  

 

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. 

 

 

Page 11: t tests - Excel

  

 

T‐Tests Microsoft Excel 2010 

Applied  Statistics  Laboratory 

11 

January 31, 2014 

Step 3: Select the statistical category. 

 

 

Page 12: t tests - Excel

  

 

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. 

 

 

Page 13: t tests - Excel

  

 

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. 

 

 

Page 14: t tests - Excel

  

 

T‐Tests Microsoft Excel 2010 

Applied  Statistics  Laboratory 

14 

January 31, 2014 

Step 6: Repeat for Array 2, highlighting the second group of data. 

 

 

Page 15: t tests - Excel

  

 

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. 

 

 

Page 16: t tests - Excel

  

 

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.  

Page 17: t tests - Excel

  

 

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. 

 

 

Page 18: t tests - Excel

  

 

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. 

 

 

Page 19: t tests - Excel

  

 

T‐Tests Microsoft Excel 2010 

Applied  Statistics  Laboratory 

19 

January 31, 2014 

Step 3: Select the statistical category. 

 

 

Page 20: t tests - Excel

  

 

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. 

 

 

Page 21: t tests - Excel

  

 

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. 

 

 

Page 22: t tests - Excel

  

 

T‐Tests Microsoft Excel 2010 

Applied  Statistics  Laboratory 

22 

January 31, 2014 

Step 6: Repeat for Array 2, highlighting the second group of data. 

 

  

Page 23: t tests - Excel

  

 

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. 

 

 

Page 24: t tests - Excel

  

 

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.