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

**What is a One Sample t Test?**

A **one sample t test **is used to determine whether or not a sample mean is statistically different from a hypothesized mean.

For example, we might hypothesize that the mean height of a certain plant in Florida is 10 inches. Suppose there are 50,000 of these plants around the state. Because it would take too long to measure every plant, we instead take a sample of 200. We could then calculate the mean height of plants in this sample and perform a one sample t test to determine if the sample mean is significantly different from 10 inches.

**Data Requirements**

Before we can conduct a one sample t test, we need to first make sure that the following requirements are met:

**1. Independence. **Each observation should be independent from every other observation.

**2. Random**. The data should be collected using a random sampling method to ensure that the sample is representative of the population.

**3. Normality.** The data should be approximately normally distributed.

**4. No outliers. **There should be no outliers present in the data that could significantly affect the calculation of the mean.

**How to Run a One Sample t Test**

Perform the following steps to run a one sample t test:

**1. Write the null (H _{0}) and alternative (H_{A}) hypotheses.**

H_{0}: μ = x (the sample mean is equal to some hypothesized population mean)

H_{A}: μ ≠ x (the sample mean is equal to some hypothesized population mean)

*Note: **The following table shows the possible combinations of null and alternative hypotheses. Note that the null hypothesis will always contain the equal sign.*

H_{0 }(null hypothesis) |
H_{A }(alternative hypothesis) |
---|---|

μ = x | μ ≠ x |

μ ≤ x | μ > x |

μ ≥ x | μ < x |

**2. Calculate the test statistic.**

The test statistic, denoted *t*, is calculated as:

t =(x – μ) / (s/√n)

where:

x – sample mean

μ – hypothesized population mean

s – sample standard deviation

n – sample size

**3. Calculate the critical value.**

Identify the value in the t-Distribution table that corresponds to n-1 degrees of freedom along the left side of the table and your chosen alpha level along the the top of the table.

For example, suppose we are conducting a two-sided one sample t test at alpha = 0.05 with a sample size of n = 20. According to the t-Distribution table, the critical value is **2.093**.

**4. Draw a conclusion.**

If the absolute value of the test statistic, *t, *is greater than the critical value, then we can reject the null hypothesis and conclude that the sample mean is statistically different than the hypothesized population mean.

Otherwise, we fail to reject the null hypothesis and we don’t have sufficient evidence to say that the sample mean is statistically different than the hypothesized population mean.

**Example: One Sample t Test**

A factory claims that they produce tires that each weigh 200 pounds. An auditor picks 25 tires at random from the assembly line and weighs them. He finds that the mean weight is 202 pounds with a standard deviation of 10 pounds.

**Test the null hypothesis that the mean weight of a tire is 200 pounds against the alternative hypothesis that the mean weight of a tire is not 200 pounds. Use a 0.05 level of significance.**

**1. State the hypotheses. **

H_{0}: μ = 200

H_{A}: μ ≠ 200

**2. Calculate the test statistic.**

t = (x – μ) / (s/√n) = (202-200) / (10/√25) = (2) / (2) = **1**

**3. Calculate the critical value.**

According to the t-Distribution table, the critical value for a two-sided test with alpha = 0.05 and degrees of freedom n-1 = 24 is **2.064**.

**4. Draw a conclusion.**

Since our test statistic (1) is not greater than the critical value (2.064), we fail to reject the null hypothesis. We do not have sufficient evidence to say that the mean weight of a tire is different from 200 pounds.

**Using P-Values Instead of Critical Values**

Instead of comparing our test statistic to a critical value from the t-Distribution table, we could instead find the p-value associated with our test statistic using a T Score to P Value calculator. If the p-value is less than our chosen significance level (in this case, 0.05), then we reject the null hypothesis.

For example, we could enter “1” for the t score (note that “t score” means the same thing as “test statistic”), “24” for degrees of freedom, and specify a two-tailed test with a significance level of 0.05, then click “Calculate” to find out that the p-value is equal to **0.32729**.

Because our p-value is not less than 0.05, we fail to reject the null hypothesis.

It’s important to note that whether you use the critical value approach or the p-value approach, you will end up with the same conclusion. In practice, most statistical software will provide both the test statistic and the p-value, and you can simply compare the p-value to your chosen significance level to draw a conclusion for the test.