# One-sample t test

A one-sample t test compares a sample mean with a claimed value when sigma is unknown. The statistic is t = (sample mean - claimed mean) / (s / square root of n), with n - 1 degrees of freedom.

Statistics (university) · Part 06: Hypothesis testing · Card 6 of 9 · Last updated 2026-10-19

## Analogy

It asks how many standard errors the sample mean sits from the claim.

## Example

**Is the mean 48?**

n = 16, mean = 52, s = 8
H0: mean = 48
SE = 8 / 4 = 2
t = (52 - 48) / 2 = 2.0, df = 15
Critical t (5%) = 2.131; p = 0.064
Fail to reject H0

## In practice

Checks whether a machine's average output matches its specification.

## Practice

### Flashcards

- **Degrees of freedom in a one-sample t test?** n minus 1.

### Interview questions

**A machine should fill bottles with a mean of 500 ml. A sample of 16 bottles has a mean of 504 and s of 8. Test H0: mean = 500 at the 5% level.**

- SE = 8 / 4 = 2
- t = 4 / 2 = 2.0 with 15 df
- Critical value 2.131 (two-sided)
- Fail to reject H0
- State the conclusion in words

## Questions people ask

### What assumptions does a t test make?

The data should be independent observations, and roughly normal when the sample is small. With larger samples, the central limit theorem makes the test robust to non-normality. Strong outliers or heavy skew in small samples can make the results unreliable.

### How does the t statistic relate to the confidence interval?

They give matching answers. If the 95 percent interval for the mean excludes the claimed value, a two-sided test at alpha 0.05 rejects it. The interval has the advantage of also showing the plausible size of the difference, which a bare test result never does.

## Related concepts

- [Significance level and decision](https://studyvisually.com/learn/science/statistics-university/statistics-university-part-6/statistics-university-part-6-concept-3)
- [Two-sample t test](https://studyvisually.com/learn/science/statistics-university/statistics-university-part-6/statistics-university-part-6-concept-7)
- [Paired t test](https://studyvisually.com/learn/science/statistics-university/statistics-university-part-6/statistics-university-part-6-concept-8)

Web page: https://studyvisually.com/learn/science/statistics-university/statistics-university-part-6/statistics-university-part-6-concept-6
Study this card in the app: https://studyvisually.com/app/learn?category=statistics-university&card=statistics-university-part-6-concept-6
