How to use this tool
- Enter independent observations separated by commas or spaces, without thousands separators.
- Enter the population mean specified by the null hypothesis, then choose your alternative hypothesis before interpreting the data.
- Choose the significance level and calculate. Read the p-value together with the t statistic, sample size and assumptions.
Input reference and sample values
Use the units and choices shown for each field. Sample values are provided for practice, not as recommendations.
| Input | Format and units | Sample |
|---|---|---|
| Sample A | Keep the structure and separators shown in the sample. Line breaks are retained in this input. | 8, 10, 9, 12, 11 |
| Hypothesized mean | Numeric value. | 8 |
| Alternative hypothesis | Choose Two-sided: different / One-sided: greater / One-sided: less. | Two-sided: different |
| Significance level | Numeric value. Minimum: 0.0001. Maximum: 0.2. | 0.05 |
Result for these sample inputs
0.0474206556 probability
- Test statistic
- 2.82842712
- Degrees of freedom
- 4
- Decision at chosen alpha
- Reject the null hypothesis
- Sample mean
- 10
- Sample size
- 5
- Sample standard deviation
- 1.58113883
The p-value is not the probability that the null hypothesis is true. Choose the hypothesis and significance level before inspecting the result; statistical significance does not measure practical importance.
Select Try the example in the form to load these values and calculate them again. This replaces the current form inputs. Compare the result with the method and worked explanation below.
The method, explained
t = (sample mean − hypothesized mean)/(sample SD/√n); df = n − 1.
For 8, 10, 9, 12, 11 and a hypothesized mean of 8: n = 5, sample mean = 10, sample SD = √2.5 ≈ 1.5811, and standard error = √0.5 ≈ 0.7071. Thus t = (10 − 8) / 0.7071 ≈ 2.8284, with 4 degrees of freedom. The two-sided p-value is approximately 0.04742.
Understanding your result
At a preselected 0.05 significance level, this example rejects the null hypothesis in a two-sided test. That does not mean a 95% probability that the alternative is true. A p-value measures how unusual a result at least this extreme would be under the null model; it does not measure the size or practical importance of the difference.
What to keep in mind
Independent observations. For small samples, the population should be approximately normal without influential outliers. A descriptive or probability calculation under the stated assumptions. Check the sample design and model before interpreting results.
Reference: NIST: statistical methods handbook
Common questions
When should I use a one-sample t-test?
Use it to compare a population mean against a specified value when the population standard deviation is unknown. Observations should be independent; normality is especially important for small samples.
Should I choose a one-sided or two-sided test?
Choose two-sided to test for a difference in either direction. Choose greater or less only when a directional hypothesis was justified before seeing the result.
What if I have two groups?
Use the two-sample test for independent groups, or the paired test for matched observations. Do not enter both groups as one sample.
Methodology maintained by ClarityKit. How these tools are built and checked.