Menu
numiqo
Statistics made easy

Statistics made easy

8th revised edition (March 2026) - many illustrative examples - only €8.99

Free sample

One-sample t-test

Author: Dr. Hannah Volk-Jesussek
Updated:

Medical Example Data

The t-test is one of the most common hypothesis tests in statistics. The t-test determines either whether a population mean differs from a specified value or whether two population means differ. The t-test distinguishes between

One sample t-test

The choice of which t-test to use depends on whether one or two samples are available. If two samples are available, a distinction is made between dependent and independent samples. In this tutorial you will find everything about the one-sample t-test.

Tip: Do you want to calculate the t-value? You can easily calculate it for all three t-tests online in the t-test calculator on numiqo.com

The one-sample t-test is used to test whether a population mean differs from a fixed value. The fixed value may, for example, be a known population mean or a quality target that is to be monitored.

Social science example:

You want to find out whether the health perception of managers in Canada differs from that of the population as a whole. For this purpose you ask 50 managers about their perception of health.

Technical example:

You want to find out if the screws your company produces really weigh 10 grams on average. To test this, weigh 50 screws and compare the actual weight with the weight they should have (10 grams).

Medical example:

A pharmaceutical company promises that its new drug lowers blood pressure by 10 mmHg in one week. You want to find out if this is correct. To do this, compare the observed reduction in blood pressure of 75 test subjects with the expected reduction of 10 mmHg.

Assumptions

In a one-sample t-test, the observations should be independent, come from a random sample, and have a metric scale of measurement. The variable should be approximately normally distributed in the population. With larger samples, the test is often robust to moderate departures from normality, but strong skewness and outliers can still be problematic.

One-tailed and two-tailed t-test

One tailed and two tailed t-test

So if you want to know whether a sample differs from the population, you have to calculate a one-sample t-test. But before the t-test can be calculated, a question and the hypotheses must first be defined. This determines whether a one-tailed (directional) or a two tailed (non-directional) t-test must be calculated.

The question helps you to define the object of investigation. In the case of the one-sample t-test the question is:

Two tailed (non-directional)

Does the population mean differ from the specified value?

One-tailed (directional)

Is the population mean larger (or smaller) than the specified value?

For the examples above, this gives us the following questions:

  • Does the health perception of managers in Canada differ from that of the overall population in Canada?
  • Does the production plant produce screws with a weight of 10 grams?
  • Does the new drug lower blood pressure by 10 mmHg within one week?

Hypotheses t-Test

In order to perform a one-sample t-test, the following hypotheses are formulated:

Two-tailed (non-directional)

  • Null hypothesis H0: The mean value of the population is equal to the specified value.
  • Alternative hypothesis H1: The mean value of the population is not equal to the specified value.

One-tailed (directional)

  • Null hypothesis H0: For an upper-tailed test, the population mean is less than or equal to the specified value. For a lower-tailed test, it is greater than or equal to the specified value.
  • Alternative hypothesis H1: For an upper-tailed test, the population mean is greater than the specified value. For a lower-tailed test, it is smaller than the specified value.

One-sample t-test Equation

You can calculate the t-test either with statistical software like numiqo or by hand. For the calculation by hand, you first need the test statistic t, which can be calculated for the one-sample t-test with the equation

Calculate one sample t-test

To check whether the sample mean differs significantly from the specified value, the test statistic is compared with a critical t-value. First, the number of degrees of freedom, abbreviated df, is required. It is the number of observations minus one.

Degree of freedom

In the t-test equation, the sample standard deviation estimates the unknown population standard deviation.

If the number of degrees of freedom is known, the critical t-value can be determined using the table of t-values. For a sample of 12 people, the number of degrees of freedom is 11, and the significance level is assumed to be 5%. The table below shows the t-values for a one-tailed open distribution. Depending on whether you want to calculate a one-tailed (directional) or two-tailed (non-directional) t-test, you must read the t-value at either 0.95 or 0.975. For the non-directional hypothesis and a significance level of 5%, the critical t-value is 2.201.

For a two-tailed test, the result is significant if the absolute calculated t-value is greater than the critical t-value. For a one-tailed test, the calculated t-value must cross the critical value in the direction specified by the alternative hypothesis.

Area one-tailed
Degree of Free- dom (df) 0.5 0.75 0.8 0.85 0.9 0.95 0.975 0.99 0.995 0.999 0.9995
... ... ... ... ... ... ... ... ... ... ... ...
9 0 0.703 0.883 1.1 1.383 1.833 2.262 2.821 3.25 4.297 4.781
10 0 0.7 0.879 1.093 1.372 1.812 2.228 2.764 3.169 4.144 4.587
11 0 0.697 0.876 1.088 1.363 1.796 2.201 2.718 3.106 4.025 4.437
12 0 0.695 0.873 1.083 1.356 1.782 2.179 2.681 3.055 3.93 4.318
13 0 0.694 0.87 1.079 1.35 1.771 2.16 2.65 3.012 3.852 4.221
... ... ... ... ... ... ... ... ... ... ... ...

Interpret t-value

The t-value is calculated by dividing the measured difference by its standard error. The larger the magnitude of t, the more the result argues against the null hypothesis. Whether the null hypothesis is rejected depends on the chosen one-tailed or two-tailed alternative.

Number of Degrees of Freedom (df)

The number of degrees of freedom indicates how many values are allowed to vary freely. The degrees of freedom are therefore the number of independent individual pieces of information.

One-sample t-test Example

As an example for the t-test for one sample, we examine whether an online students' examination results after a new online statistics tutorial was introduced differ from the historical average.

The average score in the statistics test at a university has been 28 points for years. This semester a new online statistics tutorial was introduced. Now the course management would like to know whether the average exam score has changed. Because there is no concurrent control group, this comparison can show a change from the historical average but cannot establish that the tutorial caused the change.

The population considered is all students who have written the statistics exam since the new statistics tutorial was introduced. The reference value to be compared is 28.

Null Hypothesis H0

The population mean is equal to the predefined value of 28 points. There is no evidence that the average exam score differs from the historical average.

Student Score
1 28
2 29
3 35
4 37
5 32
6 26
7 37
8 39
9 22
10 29
11 36
12 38
Here's how it goes with numiqo:

Do you want to calculate a t-test independently? Calculate the example in the Statistics Calculator. Just copy the upper table including the first row into the t-Test Calculator. numiqo will then provide you with the tables below.

The following results are obtained with numiqo: The mean value is 32.33 and the standard deviation 5.47. This leads to a standard error of the mean of 1.58. The t-statistic thus gives 2.75

You would now like to know whether the result is statistically significant (the score is 28) or not. To do this, you first specify a significance level in numiqo, usually 5% is used, which is preselected. Now you will get the table below in numiqo.

Statistics
n Mean value Standard deviation Standard error of the mean value
Score 12 32.33 5.47 1.58
One-sample t-test (test value = 28)
t df p
Score 2.75 11 0.02
95% confidence interval of the difference
Mean value difference Lower Upper
Score 4.33 0.86 7.81

To determine whether the result is statistically significant, either of the following can be used:

  • p-value (two-tailed)
  • lower and upper confidence interval of the difference

In this example, the two-tailed p-value is 0.02. This means that if the population mean were 28, a t-value at least as extreme as the observed value would occur with a probability of about 2%. Because the p-value is below the 5% significance level, the null hypothesis is rejected.

Whether or not there is a significant difference can also be read from the confidence interval of the difference. If the 95% CI for the difference includes 0, the result is not significant at α = .05; if it excludes 0, it is significant. In this example, the lower value is 0.86 and the upper value is 7.81. Since the lower and upper values do not touch zero, there is a significant difference.

APA-Style | One Sample t-test

If we were to write the top results for publication in an APA journal, that is, in an APA format, we would write it that way:

A one-sample t-test showed that the mean exam score after the tutorial was introduced (M = 32.33, SD = 5.47) differed significantly from the historical mean of 28, t(11) = 2.75, p = .02, 95% CI [0.86, 7.81].


Statistics made easy

  • many illustrative examples
  • ideal for exams and theses
  • statistics made easy on 464 pages
  • 8th revised edition (March 2026)

Only €8.99

Free sample
numiqo

"Super simple written"

"It could not be simpler"

"So many helpful examples"

Cite numiqo: numiqo Team (2026). numiqo: Online Statistics Calculator. numiqo e.U. Graz, Austria. URL https://numiqo.com