Why Degrees of Freedom Matter
A one-sample t interval uses the sample standard deviation \(s\) to estimate the population standard deviation \(\sigma\). Because that estimate is itself variable from sample to sample, the standardized estimate of a population mean has a t distribution rather than a standard normal distribution. The degrees of freedom determine which t distribution is used: with fewer degrees of freedom, its tails are heavier, reflecting greater uncertainty about the spread.
For a sample of size \(n\), a one-sample t interval has \(n-1\) degrees of freedom. This is not an arbitrary adjustment. Once the sample mean is calculated, the deviations of the observations from that mean must sum to zero. That constraint means only \(n-1\) of the deviations can vary freely.
The Constraint on Deviations
Let \(X_1,\ldots,X_n\) be the observed values and let \(\bar{x}\) be their sample mean. The deviations from the mean are \(X_i-\bar{x}\). Their sum is necessarily zero:
If \(n-1\) of the deviations are known, the final one is fixed: it must be the negative of their sum. Thus only \(n-1\) deviations can vary freely. This is the source of the degrees of freedom used in the sample variance.
The sample variance is defined using the sum of squared deviations divided by \(n-1\), not \(n\). The sample standard deviation is its square root.
Worked Example: Counting the Free Deviations
Suppose a hypothetical sample contains the values 8, 10, 11, and 15. Find the sample mean, the deviations, and the number of degrees of freedom used for the sample variance.
The sample mean is \(\bar{x}=(8+10+11+15)/4=11\). The deviations are \(-3,-1,0,\) and \(4\). They sum to zero:
Once the first three deviations are known, the fourth must be 4 for the sum to remain zero. There are therefore \(4-1=3\) degrees of freedom. The sum of squared deviations is \(9+1+0+16=26\), so the sample variance is \(s^2=26/3=8.667\), and the sample standard deviation is \(s=\sqrt{26/3}\approx2.944\). Dividing the sum of squares by 4 would ignore the constraint that the deviations sum to zero.
Why the One-Sample Statistic Has a t Distribution
The one-sample t statistic compares the difference between the sample mean and a reference population mean \(\mu\) with the estimated standard error \(s/\sqrt{n}\). The one-sample t interval uses the corresponding t distribution to account for estimating \(\sigma\) with \(s\).
Here is the exact distribution result behind this formula. Assume \(X_1,\ldots,X_n\) are independent observations from a normal population with mean \(\mu\) and variance \(\sigma^2\), where \(n\ge2\) and \(\sigma^2>0\). The conditions ensure that the sample variance and the t statistic are defined. Under these assumptions, the statistic formed with the random sample mean and standard deviation has a t distribution with \(n-1\) degrees of freedom.
A short derivation shows why the degrees of freedom in this result are \(n-1\). Standardize the observations as \(Y_i=(X_i-\mu)/\sigma\). Under the assumptions above, the \(Y_i\) are independent standard normal variables. Regard their values as a vector in \(n\)-dimensional space, and choose an orthonormal coordinate system whose first axis points in the direction \((1,\ldots,1)\). Because a vector of independent standard normal variables is unchanged in distribution by an orthonormal rotation, its coordinates in the new system are still independent standard normal variables.
The first new coordinate is \(\sqrt{n}(\bar{X}-\mu)/\sigma\). The other \(n-1\) coordinates describe the deviations from the direction of the mean; their squared sum is \(\sum_{i=1}^{n}(X_i-\bar{X})^2/\sigma^2\). By definition, the sum of the squares of \(n-1\) independent standard normal variables has a chi-square distribution with \(n-1\) degrees of freedom. It is independent of the first coordinate. Consequently,
with \(Z\) and \(U\) independent. Since \(S^2=\sigma^2 U/(n-1)\), substitution gives
A t random variable with \(k\) degrees of freedom is defined as \(Z/\sqrt{U/k}\), where \(Z\) is standard normal, \(U\) has a chi-square distribution with \(k\) degrees of freedom, and they are independent. Taking \(k=n-1\) establishes the theorem.
Worked Example: Finding the Degrees of Freedom for a t Statistic
A hypothetical random sample of \(n=5\) observations has sample mean \(\bar{x}=72\) units and sample standard deviation \(s=6\) units. Calculate the t statistic for the reference value \(\mu=68\) units and identify its degrees of freedom.
The estimated standard error is \(s/\sqrt{n}=6/\sqrt{5}\approx2.683\) units. Therefore,
The degrees of freedom are \(df=n-1=5-1=4\). If the independent observations come from a normal population with positive variance, the statistic under the reference value has a t distribution with 4 degrees of freedom. The value \(1.491\) describes the observed difference in estimated standard-error units; it does not, on its own, determine a conclusion without specifying the inferential question.
How Degrees of Freedom Change the t Distribution
A t distribution is symmetric about zero, like the standard normal distribution, but it has heavier tails when its degrees of freedom are finite. Its extra tail area reflects the additional uncertainty from estimating the population spread. A small sample gives few independent deviations with which to estimate that spread, so the estimated standard error can be less stable. The t distribution allows for this by assigning more probability to values far from zero.
As the degrees of freedom increase, the sample variance is based on more independent information, and the t distribution becomes closer to the standard normal distribution. In the limit as \(df\) increases without bound, the t distribution approaches the standard normal distribution. This does not mean that the sample standard deviation becomes exactly known at a particular finite sample size; it describes how the t distribution changes as the estimate of spread becomes more stable.
Worked Example: Comparing Interval Margins Across Degrees of Freedom
To isolate the effect of degrees of freedom, consider three hypothetical t intervals with the same sample mean, \(\bar{x}=40\) minutes, and the same estimated standard error, \(SE=2\) minutes. Suppose each interval has 95% confidence. The relevant two-sided t critical values are approximately 2.776 for \(df=4\), 2.093 for \(df=19\), and 1.960 for the standard normal reference.
The margin of error is the critical value multiplied by the standard error. For \(df=4\), the margin is \(2.776(2)=5.552\) minutes, giving \(40\pm5.552\), or approximately \((34.448,45.552)\) minutes. For \(df=19\), the margin is \(2.093(2)=4.186\) minutes, giving approximately \((35.814,44.186)\) minutes. With the standard normal reference, the margin is \(1.960(2)=3.920\) minutes, giving \((36.080,43.920)\) minutes.
These intervals are a controlled comparison: the center and estimated standard error are held fixed so the effect of the distribution alone is visible. The smaller degrees of freedom produce the larger critical value and wider interval. In actual samples, changing \(n\) may also change the standard error, so the overall width can be affected by both the degrees of freedom and the standard error.
Using the Degrees of Freedom in a One-Sample t Interval
For a one-sample t interval, the degrees of freedom are calculated from the sample size as \(df=n-1\). In the usual exact model, the data are an independent random sample from a normal population with positive variance. A t interval is commonly written as
where \(t^*\) is a critical value from the t distribution with \(n-1\) degrees of freedom for the chosen confidence level. The degrees of freedom identify the appropriate member of the t family; they do not change the observed sample mean or standard deviation. The t critical value is larger for smaller degrees of freedom at a fixed confidence level, which increases the margin of error when the standard error is held fixed.
The formula \(df=n-1\) is specific here to estimating variability around one sample mean. It follows from the single constraint on the sample deviations. It should not be treated as a universal rule for every statistical procedure: a different model or a different set of estimated quantities can impose different constraints.
Common Mistake: Counting All Observations as Free
A common error is to say, “There are \(n\) observations, so the sample variance has \(n\) degrees of freedom.” That reasoning counts the observations but overlooks that \(\bar{x}\) was calculated from them. Once the mean is fixed, the deviations cannot vary independently because they must add to zero. The correct count for the one-sample t procedure is \(n-1\).
A related error is to assume every t distribution has the same tails, or to use the standard normal distribution regardless of the sample size. Degrees of freedom matter: fewer degrees of freedom mean heavier tails and, at a given confidence level, a larger critical value. As degrees of freedom rise, the t distribution approaches the standard normal distribution.
Check Your Understanding
Use the definitions and results in this tutorial to answer the following questions.
- A sample contains 12 observations. How many degrees of freedom does its one-sample t interval use, and what constraint explains the count?
- Four deviations from a sample mean are \(-2,1,3,\) and an unknown value. What must the unknown deviation be?
- State the conditions for the exact one-sample t-distribution result, including the restrictions on \(n\) and \(\sigma^2\).
- At a fixed confidence level, which t distribution has heavier tails: one with 4 degrees of freedom or one with 19 degrees of freedom? Explain.
- In the interval formula, what determines the degrees of freedom, and what role does the t critical value play?