One-Sample T-Test Calculator
Test if mean differs from a value.
Enter at least 2 data values
Enter sample data and hypothesized mean
What Is a One-Sample T-Test?
The one-sample t-test determines whether a sample mean differs significantly from a hypothesized population mean.
Question answered: "Is the true mean different from this specific value?"
Example: "Is the average test score different from the passing threshold of 70?"
The Hypotheses
Null hypothesis (): (population mean equals hypothesized value)
Alternative hypothesis ():
- Two-tailed: (mean is different)
- Right-tailed: (mean is greater)
- Left-tailed: (mean is less)
The Test Statistic
Where:
- = sample mean
- = hypothesized population mean
- = sample standard deviation
- = sample size
The t-statistic follows a t-distribution with .
Example Calculation
Scenario: Testing whether average daily steps differs from the recommended 10,000.
Data: 25 participants, mean = 8,450 steps, SD = 2,100 steps
Calculation:
P-value: For (two-tailed),
Conclusion: The sample mean is significantly below 10,000 steps ().
Applications
Quality Control
"Does the production process hit the target weight?"
Sample: 30 products, mean = 497g, SD = 8g
Test whether mean differs from target.
Educational Assessment
"Do students perform differently from the national average?"
(national average)
Sample: Class mean = 81, SD = 12, n = 28
Health Research
"Is the average blood pressure in this population different from normal?"
mmHg
Sample: Mean = 128, SD = 15, n = 45
Process Monitoring
"Has the mean shifted from the established baseline?"
Compare current sample to historical standard.
Interpreting Results
P-Value Interpretation
| P-Value | Interpretation |
|---|---|
| p < 0.01 | Strong evidence against Hâ‚€ |
| p < 0.05 | Moderate evidence against Hâ‚€ |
| p < 0.10 | Weak evidence against Hâ‚€ |
| p ≥ 0.10 | Insufficient evidence against H₀ |
Confidence Interval Connection
A 95% CI that excludes corresponds to .
If is outside this interval, reject .
One-Tailed vs. Two-Tailed
Two-tailed (default): Tests for difference in either direction. Use when either increase or decrease is interesting.
One-tailed: Tests for difference in a specific direction. Has more power but requires prior justification.
Two-tailed p-value = 2 × one-tailed p-value
Assumptions
Normality
The population should be approximately normally distributed, OR the sample should be large enough () for the Central Limit Theorem to apply.
Check with:
Independence
Observations should be independent—one measurement shouldn't influence another.
Random Sampling
Sample should be randomly selected from the population of interest.
When to Use One-Sample T-Test
Appropriate:
- Comparing sample mean to a known standard
- Testing against theoretical value
- Comparing to published norm
- Process control against target
Not appropriate:
- Comparing two sample means (use two-sample t-test)
- Non-numeric data (use chi-square)
- Severely non-normal data with small n (use Wilcoxon)
Effect Size: Cohen's d
Beyond significance, report effect size:
| d | Interpretation |
|---|---|
| 0.2 | Small effect |
| 0.5 | Medium effect |
| 0.8 | Large effect |
In the steps example: (medium-large effect)
Historical Context
William Gosset (Student) developed the t-test in 1908 at Guinness Brewery.
The one-sample case was his original focus: testing whether batch quality met standards when sample sizes were small.
His work enabled rigorous inference with limited data—previously, large samples were required for valid conclusions.
Reporting Results
APA format:
"A one-sample t-test revealed that mean daily steps (M = 8,450, SD = 2,100) was significantly lower than the recommended 10,000 steps, t(24) = -3.69, p = .001, d = -0.74."
Always include:
- Sample statistics (M, SD, n)
- Test statistic and df
- P-value
- Effect size
Related Calculations
- Two-Sample T-Test — Compare two groups
- Paired T-Test — Repeated measures
- Confidence Interval for Mean — Interval estimate
- T-Distribution Calculator — P-values
- Cohen's d Calculator — Effect size
Summary
The one-sample t-test determines whether a sample mean significantly differs from a hypothesized value. The test statistic divides the difference (sample mean minus hypothesized mean) by the standard error, producing a t-value compared against the t-distribution. Assumptions include normality (or large n), independence, and random sampling. Always report effect sizes alongside p-values to communicate practical significance, and use confidence intervals to show the range of plausible population means.