t
tests in Excel
Single sample tests
Singlesample ttest
Excel doesn’t have a singlesample ttest built in as a simple function.
Instead you will
need to calculate the tstatistic, and then use the
TDIST
function to get a Pvalue.
Put your data in column A.
Then in cells B1: C8, enter the following:
Sample mean
=AVERAGE(A:A)
Sample standard deviation
=STDEV(A:A)
Sample size
=COUNT(A:A)
μ
0
<enter null hypothesis value here>
tstatistic
=(C1C4)/(C2/SQRT(C3))
Pvalue (twotailed; H0:
μ
X
=
μ
0
)
=TDIST(ABS(C5), C31, 2)
Pvalue (onetailed; H0:
μ
X
<=
μ
0
)
=IF(C5>0, TDIST(C5, C31, 1), 1TDIST(C5, C31, 1))
Pvalue (onetailed; H0:
μ
X
>=
μ
0
)
=IF(C5>0, 1TDIST(C5, C31, 1), TDIST(C5, C31, 1))
The reason we have to do the complicated stuff with the absolute value function (for the
twotailed test) and the IF function (for the onetailed test) is that the TDIST function
won’t accept a negative value of the t statistic (thanks, Microsoft!).
I’ve given you the formulas for all three Pvalues; obviously, in any given application,
you would only want to use one!
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '08
 KENDALL,BERKLEY
 Environmental Science, Statistics, Standard Deviation, Variance, Student's ttest, onetailed test

Click to edit the document details