















A one‑sample t‑test checks whether the mean of a single sample is significantly different from a known or hypothesized population mean.
It answers the question:
“Is my sample mean different enough from the population mean to rule out random chance?”
When you use it
Use a one‑sample t‑test when:
- You have one group
- You know or assume a population mean
- You want to test whether your sample’s mean differs from that value
- The data are approximately normal (especially for small samples)
Hypotheses
Two‑tailed (most common)
One‑tailed
vs.
orvs.
Fresh, Original Examples
🧪 Example 1: Vitamin C Levels
A nutritionist believes the average vitamin C level in a population is 50 mg/dL.
She measures 20 people and gets a sample mean of 54 mg/dL.
Question: Is 54 significantly different from 50?
- One sample
- Known population mean → one‑sample t‑test
📚 Example 2: Reading Speed
A textbook claims that the average reading speed of adults is 250 words/minute.
You test 15 students and find a mean of 230 words/minute.
Question: Are your students slower than the claimed average?
- One group
- Comparing to a published mean → one‑sample t‑test
🧠 Example 3: Memory Test Scores
A cognitive test is designed so that the population mean score is 100.
Your sample of 12 participants scores an average of 108.
Question: Is your group performing above the standard?
- One sample
- Known test mean → one‑sample t‑test
🏃 Example 4: Average Step Count
A fitness tracker company advertises that users take 8,000 steps/day on average.
You collect data from 30 users and find a mean of 7,450 steps/day.
Question: Is the real average lower than advertised?
- One sample
- Testing against a claimed mean → one‑sample t‑test
🎮 Example 5: Game Completion Time
A game developer says the average completion time for a level is 12 minutes.
You test 10 players and get a mean of 13.2 minutes.
Question: Are players taking longer than expected?
- One sample
- Known benchmark → one‑sample t‑test
Formula (for completeness)
Where:
= sample mean
= hypothesized population mean
= sample standard deviation
= sample size
Fully worked one‑sample t‑test example
A company claims that their energy bars contain on average 200 calories.
You suspect the true mean is lower than 200.
You take a sample of 10 bars and measure the calories:
We’ll test (one‑tailed):
Significance level:
Step 1: Compute the sample mean 
Add them up:
Sample size:
Step 2: Compute the sample standard deviation 
First, compute each deviation from the mean and square it:
Sum of squared deviations:
Sample variance:
Sample standard deviation:
Step 3: Compute the t‑statistic
Formula:
Here:
Standard error:
Now:
Step 4: Degrees of freedom and critical value
Degrees of freedom:
For a one‑tailed test at and
, the critical t‑value is about:
(negative because we’re testing ).
Step 5: Decision
Our test statistic:
Compare:
So the test statistic falls in the rejection region.
We reject at the 5% level.
Step 6: Interpretation in words
There is statistically significant evidence at that the true mean calorie content is less than 200 calories per bar.
Discover more from Knowledge sparks
Subscribe to get the latest posts sent to your email.