ARBIMETRA LAB
One-sample T-test
Tests whether a population mean differs from a specified value.
What it does
Tests whether a population mean differs from a specified value.
Use it when you have one sample and a target or benchmark mean.
Data you need
- One numeric variable
- Reference mean
Supported data: Numeric. Level: Beginner.
Formula and method
t = (x̄ − μ₀) / (s/√n), df = n − 1
The distance between the sample mean and the reference value is divided by the standard error, and the result is compared with a t distribution with n − 1 degrees of freedom. One-sided tests use one tail.
Assumptions
- Observations are independent
- The sample mean is approximately normal
Input checks
- At least 2 observations
- No variation is rejected
How to read the result
A small p-value suggests the mean differs from the reference. Report the interval and effect size too.
Worked example
Illustrative run on Simulated study data (teaching data). These figures are the actual output of this model on that example, and they say nothing about your own data.
- Mean = 73.9696 against 75; t = -1.2728, df = 239, p = 0.2043.
- The difference is not statistically significant at the 5% level.
Limitations
- Statistical significance is not practical importance
Numerical validation
Validated 17 of 17 automated checks passed, including numerical results, invalid input, missing values, small samples, constant variables, charts and the interpretation text.
| Check | Reference | Result | Abs. error | Tolerance | Source |
|---|---|---|---|---|---|
| Sleep group 1: t | 1.3257 | 1.32571014 | 1.0e-5 | 1e-4 | Published R documentation output (Student's sleep data) |
| Sleep group 1: p | 0.2176 | 0.21759778 | 2.2e-6 | 2e-4 | Published R documentation output (Student's sleep data) |
| One-sided p (greater) | 0.10879889 | 0.10879889 | 5.6e-17 | 1e-11 | SciPy |
| One-sided p (less) | 0.89120111 | 0.89120111 | 0.0e+0 | 1e-11 | SciPy |
Computed with python 3.13.2, numpy 2.2.5, scipy 1.14.1, pandas 2.3.3, statsmodels 0.14.4, scikit-learn 1.7.0, in your browser. A passing check confirms the listed comparison only. It does not make any result suitable for your data, and it is not a claim of equivalence with other statistical software.
Questions
What does the p-value mean here?
It is the probability of a result at least this far from the reference value if the true mean equals that value. It is not the probability that the hypothesis is true.
ARBIMETRA LAB is an educational and research tool. Results should be checked by the researcher and are not professional advice.
