Statistical Calculators

One-Sample t-Test and Confidence Interval Calculator

Enter the mean, the standard deviation, and the size of one sample. The calculator returns the confidence interval for the population mean and the t test of that mean against a value, with the p-value and a conclusion in plain words.

One-sample t calculator

The design effect stays at 1 for a simple random sample. A survey sample from a complex design enters its design effect, and the standard error widens by the square root of that value.

How this calculator works

The one-sample t test suits one sample when the population standard deviation is unknown and the sample standard deviation stands in for it. That swap adds uncertainty, and the t distribution carries the extra width. Small samples get wider intervals and larger critical values than a z calculation would give.

The standard error is the standard deviation divided by the square root of the sample size. It measures how far sample means typically land from the population mean. The interval is the sample mean plus and minus a critical t value times the standard error. The critical value comes from the t table at the degrees of freedom, which for one sample is the sample size minus one.

The test statistic is the gap between the sample mean and the value under test, divided by the standard error. The p-value is the chance of a gap at least that large if the tested value were the true mean. A p-value below the alpha level counts as evidence against the tested value. The conclusion line under the results states the decision in those terms.

Worked example

A sample of 25 has a mean of 102 and a standard deviation of 15. The value under test is 100. The standard error is 15 divided by 5, which is 3. The t statistic is 2 divided by 3, which is 0.667, at 24 degrees of freedom. The p-value is 0.5113, and the 95 percent interval runs from 95.81 to 108.19. The interval covers 100 and the p-value sits above 0.05, so the test does not reject a mean of 100.

Values computed from the t distribution. The method was checked against reference calculations: the entries in the worked example reproduce to four decimal places, and the full pair record sits in the package verification file.