*45*

A **one sample t-test** is used to test whether or not the mean of a population is equal to some value.

This tutorial explains how to conduct a one sample t-test in Excel.

**How to Conduct a One Sample t-Test in Excel**

Suppose a botanist wants to know if the mean height of a certain species of plant is equal to 15 inches. She collects a random sample of 12 plants and records each of their heights in inches.

The following image shows the height (in inches) for each plant in the sample:

We can use the following steps to conduct a one sample t-test to determine if the mean height for this species of plant is actually equal to 15 inches.

**Step 1: Find the sample size, sample mean, and sample standard deviation.**

First, we need to find the sample size, sample mean, and sample standard deviation, which will all be used to conduct the one sample t-test.

The following image shows the formulas we can use to calculate these values:

**Step 2: Calculate the test statisticÂ t.**

Next, we will calculate the test statisticÂ *tÂ *using the following formula:

*tÂ * = x â€“ Âµ / (s/âˆšn)

where:

xÂ = sample mean

Âµ = hypothesized population mean

s = sample standard deviation

n = sample size

The following image shows how to calculateÂ *tÂ *in Excel:

The test statisticÂ *tÂ *turns out to beÂ **-1.68485**.

**Step 3: Calculate the p-value of the test statistic.**

Next, we need to calculate the p-value associated with the test statistic using the following function in Excel:

=T.DIST.2T(ABS(x), deg_freedom)

where:

x = test statisticÂ *t*

deg_freedom = degrees of freedom for the test, which is calculated as n-1

Technical Notes:ÂÂ

The function

T.DIST.2T()returns the p-value for a two-tailed t-test. If youâ€™re instead conducting a left-tailed t-test or a right-tailed t-test, you would instead use the functionsT.DIST()orT.DIST.RT(), respectively.

The following image shows how to calculate the p-value for our test statistic:

The p-value turns out to beÂ **0.120145**.

**Step 4: Interpret the results.**

The two hypotheses for this particular one sample t test are as follows:

**H _{0}:Â **Âµ = 15 (the mean height for this species of plant is 15 inches)

**H _{A}:Â **ÂµÂ â‰ 15 (the mean height isÂ

*notÂ*15 inches)

Because the p-value of our test** (0.120145)Â **is greater than alpha = 0.05, we fail to reject the null hypothesis of the test.

We do not have sufficient evidence to say that the mean height for this particular species of plant is different from 15 inches.

**Additional Resources**

The following tutorials explain how to perform other common types of t-tests in Excel:

How to Conduct a Two Sample t-Test in Excel

How to Conduct a Paired Samples t-Test in Excel