One numeric sample is summarized and compared with a stated reference mean using a standard error, t statistic and confidence interval.
A one-sample test asks how the observed mean compares with a value chosen before analysis.
On this page

When a one-sample t-test fits

Use a one-sample t-test when the outcome is numeric, the observations form one sample, and your question compares its population mean with a specified reference value. The population standard deviation is unknown, so the method estimates it with the sample standard deviation. This is a different design from comparing two unrelated groups or analyzing matched before-and-after measurements.

Set the reference value and the research question before inspecting the result. Choose a two-sided alternative when either direction matters, or a one-sided alternative only when the direction was justified in advance. A one-sided test does not become appropriate because the observed mean happens to point that way.

Supporting reading: [1] [2]

How the one-sample t statistic is calculated

The sample mean is x̄ and the sample standard deviation is s. The standard error is s ÷ √n, where n is the number of observations. The test statistic is t = (x̄ − μ₀) ÷ (s ÷ √n), with n − 1 degrees of freedom; μ₀ is the reference population mean. The calculator uses the selected tail to obtain the p-value and reports a two-sided confidence interval for the population mean.

Constructed example: observations 8, 9, 10, 11 and 12 have mean 10, sample standard deviation about 1.581 and standard error about 0.707. Against a reference mean of 8, t is about 2.828 with 4 degrees of freedom. The two-sided p-value is about 0.047 and the 95% confidence interval for the population mean is about 8.04 to 11.96. These invented values demonstrate the calculation; they are not results from a study.

Supporting reading: [1] [2]

Assumptions and interpretation to review

The outcome should be quantitative, and observations should be independent under the sampling design. For a small sample, the population distribution should be reasonably compatible with the t procedure; inspect the data for strong skew and influential outliers. A larger sample can make the sampling distribution of the mean more robust in many settings, but a simple size threshold cannot fix dependence, selection bias, measurement problems or extreme observations. The calculator cannot verify how the sample was collected or whether its assumptions fit.

The confidence interval estimates a plausible range for the population mean under the method and its assumptions. The p-value describes how unusual a result at least this extreme would be under the specified null model; it is not the probability that the null hypothesis is true. Statistical significance does not establish causation or practical importance. The American Statistical Association recommends interpreting p-values in context rather than using them as a substitute for scientific reasoning.

Supporting reading: [1] [2] [3]

When to choose a different method

If the population standard deviation is known and the model conditions support it, a z procedure may be appropriate instead. If the observations are paired, analyze the within-pair differences. If there are two independent groups, use a two-sample method such as Welch’s t-test. Categorical outcomes, clustered data, repeated measurements, strong outliers or a complex design may require another procedure. Follow the analysis named in your course or research plan when one has been specified.

Supporting reading: [1] [2]

Free one-sample mean calculator

Compare one sample with a reference mean

Enter one numeric observation per line, then set the hypothesized population mean. Choose the test direction from your research question before interpreting the data.

Constructed example

Observations: 8 · 9 · 10 · 11 · 12
Reference mean: 8

One sample; no pairs or second group.

Your calculation stays in this browser tab. Avoid entering identifiable or confidential measurements on a shared device.

The constructed example has 5 observations and a reference mean of 8. Edit the values, then calculate.

Questions about this topic

What does a one-sample t-test compare?

It compares the mean of one numeric sample with a reference value for a population mean when the population standard deviation is unknown. It does not compare two separate groups.

What is the difference between a one-sample and paired t-test?

A one-sample test compares one sample mean with a fixed reference value. A paired test first calculates one difference for every genuine matched pair, then tests the mean of those differences against a reference value, usually zero.

Should I choose a one-sided or two-sided test?

Choose the direction from the research question before looking at the data. Use a two-sided test when departures in either direction matter. A one-sided test is justified only when the opposite direction is outside the question and was specified in advance.

Does the calculator check normality or independence?

No. It calculates from the entered values but cannot inspect the sampling process, independence, measurement quality or whether the distribution supports the t approximation. Review the design and data, especially for small samples.

Does a small p-value mean the reference mean is probably false?

No. A p-value is calculated assuming the null model and its conditions; it is not the probability that the null hypothesis is true. Interpret it alongside the estimate, confidence interval, design and practical context.

Are my observations uploaded?

No. The calculation runs in this browser tab. Values entered here are not sent to AI Essay.

Sources and editorial notes

The supporting reading below informs our editorial guidance. Exercises and scenarios illustrate a method; they do not report a completed product test or measured learning outcome. Read our editorial policy or send a correction with a supporting source to info@ai-essay.com.

  1. Penn State STAT 200: inference for one sample, one-sample mean t-test and assumptions
  2. NIST/SEMATECH e-Handbook: confidence limits for the mean and one-sample t-test
  3. American Statistical Association: statement on statistical significance and p-values