Tutorials › Introduction to Statistics › Reading One-Sample T Test Software Output

Tests for Means · Tutorial 658 of 996

Reading One-Sample T Test Software Output

Translate the key fields in one-sample t-test output into the quantities and evidence they represent.

Intermediate 12 min read

What You'll Learn

  • Identify the sample mean estimate and distinguish it from the null mean.
  • Read the t statistic and degrees of freedom in software output.
  • Determine whether a p-value comes from a one-sided or two-sided alternative.
  • Check that the reported output matches the test setup and summary statistics.
  • Interpret a p-value as evidence against a null model, not as the probability that the null is true.

Why Reading the Output Matters

A one-sample t test asks whether the data provide evidence that a population mean differs from a specified value. Statistical software can calculate the test quickly, but its output is useful only when you can identify what each number represents. In particular, the p-value depends on the alternative hypothesis: the same sample and null mean can produce different p-values for a less-than, greater-than, or two-sided test.

This tutorial focuses on five fields commonly shown in one-sample t-test output: the estimated mean, the t statistic, degrees of freedom, the p-value, and the alternative hypothesis. The output does not choose the scientific question for you. You must specify the null mean and direction of the alternative before interpreting the reported numbers.

The Model and the Main Output Fields

Suppose \(X_1,\ldots,X_n\) are quantitative measurements from a random sample, with independent observations from a population whose mean is \(\mu\). A one-sample t test evaluates a null hypothesis about \(\mu\), usually \(H_0:\mu=\mu_0\), where \(\mu_0\) is a specified reference value. The t procedure uses the sample standard deviation \(s\) to estimate the population standard deviation \(\sigma\).

Before relying on the test, check the conditions for one-sample t inference. The observations should come from a suitable random sample or randomized process and be independent; if sampling without replacement, the sample should be a small fraction of the population. The population should be approximately normal for a small sample, with no severe skewness or influential outliers. With a sufficiently large sample, the sampling distribution of the mean is often reasonably approximated even when the population is not exactly normal, provided the data do not contain severe problems. The study design and data diagnostics should support these conditions.

Definition: In a one-sample t test, the estimated mean is the sample mean \(\bar{x}\). The test statistic measures how many estimated standard errors separate \(\bar{x}\) from the null value \(\mu_0\): $$ t=\frac{\bar{x}-\mu_0}{s/\sqrt{n}}. $$ For the usual one-sample t procedure, the statistic is compared with a t distribution with \(df=n-1\) degrees of freedom, assuming the null hypothesis and the test conditions hold.

The output fields have related but distinct roles. The estimate describes the sample’s center in the variable’s units. The t statistic is unitless and records the signed distance between that estimate and the null value, measured in standard errors. The degrees of freedom identify which t distribution is used to calculate the p-value. The alternative hypothesis specifies which results count as evidence against the null.

Output fieldWhat it meansWhat to check
Estimate or mean of xThe observed sample mean \(\bar{x}\)Its value and units; it is not the null value
tThe signed standardized difference \((\bar{x}-\mu_0)/(s/\sqrt{n})\)Its sign should agree with the direction of the observed difference
dfDegrees of freedom for the reference t distributionFor a one-sample test, it should equal \(n-1\)
p-valueTail probability under the null model, using the specified alternativeIt depends on both the t statistic and the alternative
AlternativeThe direction of departure from the null value being testedIt should match the question chosen before examining the data

How the Alternative Determines the P-Value

Under \(H_0:\mu=\mu_0\), the one-sample t statistic follows a t distribution with \(n-1\) degrees of freedom when the model assumptions hold. That reference distribution is symmetric around zero. The p-value is the probability, assuming the null model, of obtaining a t statistic at least as favorable to the alternative as the observed statistic.

For a two-sided alternative, evidence includes a statistic far from zero in either direction. For a greater-than alternative, only a sufficiently large positive statistic counts in the tail; for a less-than alternative, only a sufficiently negative statistic does. If \(F_{df}\) is the cumulative distribution function of the t distribution with \(df\) degrees of freedom, the corresponding p-values are:

$$ \begin{aligned} H_a:\mu\ne\mu_0 &: \quad P\left(|T|\ge |t_{\mathrm{obs}}|\right),\\ H_a:\mu>\mu_0 &: \quad P\left(T\ge t_{\mathrm{obs}}\right),\\ H_a:\mu<\mu_0 &: \quad P\left(T\le t_{\mathrm{obs}}\right). \end{aligned} $$

This follows directly from the definition of a tail probability: under the null model, identify the part of the t distribution that represents results at least as extreme in the direction specified by \(H_a\), then find its probability. For a two-sided test, symmetry gives \(2P(T\ge |t_{\mathrm{obs}}|)\). For a one-sided test, the relevant tail is not doubled.

Worked Example: Reading a Two-Sided Test

Suppose a hypothetical laboratory takes an independent random sample of 16 measurements of a solution’s concentration, in milligrams per liter (mg/L). The measurements show no strong skewness or outliers. The sample mean is 52.4 mg/L and the sample standard deviation is 6.4 mg/L. The question is whether the population mean differs from 50 mg/L, so the hypotheses are \(H_0:\mu=50\) mg/L and \(H_a:\mu\ne50\) mg/L. The output reports: estimate = 52.4; t = 1.500; df = 15; p-value = 0.1540; alternative: true mean is not equal to 50.

The estimate is the sample mean, 52.4 mg/L. It is 2.4 mg/L above the null value. The standard error is $$ SE=\frac{s}{\sqrt{n}}=\frac{6.4}{\sqrt{16}}=\frac{6.4}{4}=1.6\text{ mg/L}. $$ Thus the test statistic is $$ t=\frac{52.4-50}{1.6}=\frac{2.4}{1.6}=1.500. $$ The reported \(df=15\) agrees with \(n-1=16-1=15\). The two-sided alternative means that differences in either direction count, and the reported p-value is the probability under \(H_0\) of a t statistic at least 1.500 units from zero in either direction. The conditions are supported here by the hypothetical random, independent sample and the stated absence of strong skewness or outliers. At a significance level of 0.05, 0.1540 is larger than 0.05, so this test does not provide statistically significant evidence of a population mean different from 50 mg/L.

Three Output-Reading Checks

A good reading of software output checks whether the fields fit together rather than treating each number in isolation. Start with the alternative stated in the output; then check that the estimate, null value, and sign of \(t\) are consistent. Confirm the degrees of freedom from the sample size, and interpret the p-value using the correct tail. The following examples illustrate these checks.

Worked Example: A Less-Than Alternative

In a hypothetical assessment, a random sample of 25 independent response times has a sample mean of 18.6 seconds and a sample standard deviation of 4.0 seconds. The data show no severe skewness or outliers. The question, specified in advance, is whether the population mean response time is less than 20 seconds. A software excerpt reports: estimate = 18.6; t = -1.750; df = 24; p-value = 0.0464; alternative: true mean is less than 20.

The estimated mean is 18.6 seconds, which is 1.4 seconds below the null value. The standard error and t statistic are $$ SE=\frac{4.0}{\sqrt{25}}=0.8\text{ seconds}, \qquad t=\frac{18.6-20}{0.8}=\frac{-1.4}{0.8}=-1.750. $$ The degrees of freedom check: \(25-1=24\). Since the alternative is less than, the p-value is the area to the left of \(-1.750\) on the t distribution with 24 degrees of freedom, not a two-sided area. The random, independent sample and the stated data shape support using the procedure. The p-value 0.0464 is below 0.05; if the test uses \(\alpha=0.05\), the result is statistically significant evidence that the population mean response time is less than 20 seconds.

Worked Example: A Greater-Than Alternative

Consider a hypothetical random sample of 10 independent packages from a production process. Their measured fill amounts have a sample mean of 103.2 grams and sample standard deviation of 5.0 grams. Suppose the underlying distribution is approximately normal and the sample has no apparent outlier. The question is whether the population mean exceeds 100 grams. Software reports: estimate = 103.2; t = 2.024; df = 9; p-value = 0.0370; alternative: true mean is greater than 100.

The estimate is 103.2 grams, or 3.2 grams above the null value. The standard error is $$ SE=\frac{5.0}{\sqrt{10}}\approx1.581\text{ grams}. $$ Therefore, $$ t=\frac{103.2-100}{5.0/\sqrt{10}} =\frac{3.2}{1.581}\approx2.024. $$ The degrees of freedom are \(10-1=9\). Because the alternative is greater than, the p-value is the area to the right of 2.024 under the \(t\) distribution with 9 degrees of freedom. The assumed approximate normality, absence of an outlier, and independent random sampling are particularly important with this small sample. The p-value 0.0370 is evidence against the null in the greater-than direction; at \(\alpha=0.05\), it is statistically significant.

Common Mistakes and What the Output Does Not Say

A p-value is calculated under the assumption that the null hypothesis is true, along with the model conditions. It is not the probability that \(H_0\) is true, nor is it the probability that chance alone caused the data. It measures how unusual the observed statistic, or a more extreme one in the specified direction, would be under the null model.

The estimate is also easy to misread. In a one-sample t test, a software field such as “mean of x” or “estimate” typically gives \(\bar{x}\), not \(\bar{x}-\mu_0\). The null value is supplied as part of the test and may appear in the alternative-hypothesis text rather than alongside the estimate. Compare the estimate with that null value yourself to check the sign and size of the difference.

A reported p-value of 0.000, if software rounds to three decimal places, does not mean that the probability is exactly zero. It means the value is smaller than the software’s displayed precision; report it as below the rounding threshold when appropriate. Also, the same t statistic can yield different p-values when the alternative changes, because the relevant tail area changes.

Key takeaway: Read the alternative first. Then identify the sample mean and null value, check that \(t=(\bar{x}-\mu_0)/(s/\sqrt{n})\) and \(df=n-1\) are consistent, and interpret the p-value in the specified tail under the null model.

Check Your Understanding

Use the definitions and checks in this tutorial to answer the following questions.

  1. A one-sample test uses \(n=12\) observations. What degrees of freedom should its output report, and why?
  2. Output gives estimate = 7.8, null value = 8, and t = -0.5. Is the sign of the test statistic consistent with the estimate and null value?
  3. For \(H_a:\mu>\mu_0\), which tail of the null t distribution determines the p-value?
  4. Why is a two-sided p-value generally not the same as the p-value for a one-sided alternative using the same observed t statistic?
  5. Software displays p-value = 0.000. What does this usually mean, and what should you avoid claiming?