ARBIMETRA · Financial intelligence, made practical.

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.

CheckReferenceResultAbs. errorToleranceSource
Sleep group 1: t1.32571.325710141.0e-51e-4Published R documentation output (Student's sleep data)
Sleep group 1: p0.21760.217597782.2e-62e-4Published R documentation output (Student's sleep data)
One-sided p (greater)0.108798890.108798895.6e-171e-11SciPy
One-sided p (less)0.891201110.891201110.0e+01e-11SciPy

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.