Tutorials › VEE Mathematical Statistics › Degrees of Freedom in Sample Variance Ratios

VEE Mathematical Statistics · F Distribution and Sampling Results · Tutorial 416 of 880

Degrees of Freedom in Sample Variance Ratios

Determine the ordered degrees of freedom for a sample-variance ratio and identify the conditions under which it has an exact F distribution.

Intermediate 12 min read

What You'll Learn

  • Define the ordinary unbiased sample variance and its degrees of freedom
  • Determine the F numerator and denominator degrees of freedom from sample sizes
  • Keep degrees of freedom in the same order as the variance ratio
  • Convert sums of squared deviations into sample variances correctly
  • Recognize the normality, independence, and common-variance conditions for the exact F law
  • Avoid using sample size itself as a sample variance's degrees of freedom

Why the Order of the Ratio Matters

An F distribution is specified by two degrees of freedom, and their order matters. In a ratio of sample variances, the numerator degrees of freedom come from the sample variance in the numerator; the denominator degrees of freedom come from the sample variance in the denominator. Reversing the ratio reverses the degrees of freedom as well.

The essential counting step is to recognize that an ordinary sample variance uses deviations from the sample mean. Those deviations are constrained: they must sum to zero. Consequently, a sample of size \(n\) contributes \(n-1\), not \(n\), degrees of freedom. This tutorial develops that rule and applies it to ratios from two independent normal samples.

Definition: For observations \(X_1,\ldots,X_n\), the ordinary unbiased sample variance is $$ S_X^2=\frac{1}{n-1}\sum_{j=1}^{n}(X_j-\bar{X})^2, \qquad \bar{X}=\frac{1}{n}\sum_{j=1}^{n}X_j. $$ For \(n\geq 2\), its degrees of freedom are \(n-1\). The degrees of freedom count the independent pieces of information in the deviations after estimating the sample mean.

The Degrees of Freedom in an F Ratio

Let \(X_1,\ldots,X_{n_1}\) be an independent random sample from \(N(\mu_1,\sigma^2)\), and let \(Y_1,\ldots,Y_{n_2}\) be an independent random sample from \(N(\mu_2,\sigma^2)\). The two samples are independent of each other, and both populations have the same variance \(\sigma^2\). Write their ordinary sample variances as \(S_X^2\) and \(S_Y^2\).

Under these conditions, each centered sum of squares divided by the population variance has a chi-square distribution. The degrees of freedom are \(n_1-1\) for the first sample and \(n_2-1\) for the second. Because the samples are independent, the two resulting chi-square variables are independent. Dividing each by its degrees of freedom and taking their ratio gives an F variable.

Theorem: For two independent normal samples with a common population variance, the ordinary sample-variance ratio has the distribution $$ \frac{S_X^2}{S_Y^2}\sim F_{n_1-1,\;n_2-1}. $$ The first subscript is the numerator degrees of freedom; the second is the denominator degrees of freedom. The order follows the ratio as written.

Here \(F_{\nu_1,\nu_2}\) denotes an F distribution with numerator degrees of freedom \(\nu_1\) and denominator degrees of freedom \(\nu_2\). In the ratio above, \(\nu_1=n_1-1\) and \(\nu_2=n_2-1\). Do not sort the two numbers, or put the larger sample first automatically. Read the statistic from left to right: identify its numerator variance, then its denominator variance.

Why Each Sample Contributes One Fewer Degree of Freedom

For any observed sample, the deviations from the sample mean satisfy the identity $$ \sum_{j=1}^{n}(X_j-\bar{X})=0. $$ Once \(n-1\) deviations are known, the last one is fixed by this equation. Thus the \(n\) deviations cannot vary independently; only \(n-1\) independent deviations remain.

For a normal sample, the standard sampling result is that the centered sum of squares, after division by the population variance, has a chi-square distribution with this same number of degrees of freedom. Since \(S_X^2\) divides the centered sum of squares by \(n-1\), it follows that $$ \frac{(n-1)S_X^2}{\sigma^2}\sim\chi^2_{n-1}. $$ Applying this result to both independent samples gives the ratio explicitly:

$$ \frac{S_X^2}{S_Y^2} = \frac{\left((n_1-1)S_X^2/\sigma^2\right)/(n_1-1)} {\left((n_2-1)S_Y^2/\sigma^2\right)/(n_2-1)} \sim F_{n_1-1,\;n_2-1}. $$

The common \(\sigma^2\) cancels, and the two chi-square quantities in parentheses are independent. This explains both the degrees of freedom and why the common-variance assumption matters for the unscaled ratio to have this exact F distribution. If the population variances differ, the raw ratio is not covered by this result; the conditions and scaling for that case are a separate matter.

Worked Example: Assigning Degrees of Freedom from Sample Sizes

Two independent random samples come from normal populations with the same unknown variance. Sample A has \(n_A=12\) observations and sample B has \(n_B=9\). Determine the distribution of the ratio \(S_A^2/S_B^2\).

Method. Use one fewer degree of freedom than the sample size for each ordinary sample variance, then match the results to the numerator and denominator of the ratio.

Step 1: Check the assumptions. The samples are independent, both populations are normal, and they share a common variance. The exact F result therefore applies.

Step 2: Find the degrees of freedom. Sample A contributes \(12-1=11\). Sample B contributes \(9-1=8\).

Step 3: Preserve the stated order. \(S_A^2\) is on top, so 11 is the numerator degrees of freedom. \(S_B^2\) is on the bottom, so 8 is the denominator degrees of freedom. Therefore, $$ \frac{S_A^2}{S_B^2}\sim F_{11,8}. $$

Check and common mistake avoided. The first sample variance uses 11 independent deviations and the second uses 8. Using \(F_{12,9}\) would incorrectly count the fitted sample means as if they were known in advance. Swapping the subscripts would describe the degrees-of-freedom order for the reversed ratio, not the ratio given. The answer is \(F_{11,8}\), in the stated numerator-to-denominator order.

When the Problem Gives Sums of Squares

A problem may report sample sizes and centered sums of squared deviations rather than the sample variances themselves. The degrees of freedom still come from the sample sizes. To calculate a variance ratio, first divide each centered sum of squares by its own \(n-1\); then divide the resulting sample variances in the order requested.

A frequent trap is to divide a centered sum of squares by \(n\). That does not give the ordinary unbiased sample variance defined here. It also changes the numerical ratio, even though the degrees of freedom used to identify the F distribution remain tied to the sample sizes.

Worked Example: Computing the Ratio from Centered Sums of Squares

Two independent normal samples come from populations with the same variance. For sample R, \(n_R=10\) and \(\sum (X_j-\bar{X})^2=72\). For sample T, \(n_T=7\) and \(\sum (Y_j-\bar{Y})^2=30\). Find the observed value of \(S_R^2/S_T^2\) and the degrees of freedom of its F distribution.

Method. Convert each centered sum of squares to its ordinary sample variance using its own \(n-1\), and then form the requested ratio.

Step 1: Calculate the sample variances. For sample R, the denominator is \(10-1=9\): $$ S_R^2=\frac{72}{9}=8. $$ For sample T, the denominator is \(7-1=6\): $$ S_T^2=\frac{30}{6}=5. $$

Step 2: Form the ratio. The requested order is R over T, so $$ \frac{S_R^2}{S_T^2}=\frac{8}{5}=1.6. $$

Step 3: Identify the distribution and its order. The numerator variance has \(9\) degrees of freedom and the denominator variance has \(6\). Under the stated normality, independence, and common-variance assumptions, the ratio has distribution \(F_{9,6}\).

Check and common mistake avoided. Directly comparing the sums of squares would give \(72/30=2.4\), not the sample-variance ratio, because the samples have different sizes. Dividing by \(n\) would also be incorrect for the ordinary unbiased sample variances. The computed sample variances are 8 and 5, their ratio is 1.6, and the ordered degrees of freedom are 9 and 6.

Reversing the Ratio Reverses the Degrees of Freedom

The same two sample variances can form different statistics. If the statistic is \(S_B^2/S_A^2\), then sample B supplies the numerator degrees of freedom and sample A supplies the denominator degrees of freedom. The sample sizes do not change; their roles in the ratio do.

This distinction is important even if the problem describes one sample first and the other second. The wording order does not determine the F subscripts. The algebraic order of the ratio does.

Worked Example: Matching Degrees of Freedom to a Reversed Ratio

Two independent normal samples share a common population variance. Sample C has \(n_C=18\) observations and sample D has \(n_D=11\). A statistic is defined as \(S_D^2/S_C^2\). Determine the numerator and denominator degrees of freedom and the exact distribution.

Method. Read the statistic first, then attach each sample's \(n-1\) degrees of freedom to the variance occupying that position.

Step 1: Find each sample's degrees of freedom. Sample C has \(18-1=17\). Sample D has \(11-1=10\).

Step 2: Match them to the ratio. The numerator is \(S_D^2\), so the numerator degrees of freedom are 10. The denominator is \(S_C^2\), so the denominator degrees of freedom are 17.

Step 3: State the distribution. With independent normal samples and a common population variance, $$ \frac{S_D^2}{S_C^2}\sim F_{10,17}. $$

Check and common mistake avoided. The result is not \(F_{17,10}\), because that order would put sample C in the numerator. The larger sample does not automatically get the first subscript. The ratio as written is D over C, so its ordered degrees of freedom are 10 and 17.

A Reliable Process and the Main Exam Trap

A short sequence of checks prevents most degrees-of-freedom errors. First establish that the question is using ordinary sample variances from two independent normal samples. Then confirm the common-variance condition for the exact unscaled F result. Finally, compute the two \(n-1\) values and attach them to the ratio in its written order.

1
Identify the variance statistic.
Write down which sample variance is in the numerator and which is in the denominator.
2
Compute each sample's degrees of freedom.
For an ordinary sample variance from \(n\) observations, use \(n-1\).
3
Keep the order.
Put the numerator variance's degrees of freedom first and the denominator variance's degrees of freedom second.
4
Check the model.
The exact F law for the raw ratio requires independent normal samples with a common population variance.

The central exam trap is to treat the degrees of freedom as labels for the two samples in the order they were introduced. They are not. They describe the numerator and denominator chi-square contributions that make up the statistic. Reversing the ratio changes those roles, even though the observations and sample sizes stay the same.

A second trap is to assume that any ratio of two sample variances automatically has the stated exact F distribution. The result given here depends on the sampling assumptions. In particular, normality and independence produce the relevant independent chi-square quantities, while the common variance allows it to cancel in the raw ratio. If those conditions are not met, do not invoke this exact result without further justification.

Key takeaway: For \(S_1^2/S_2^2\) from two independent normal samples with a common population variance, the exact distribution is \(F_{n_1-1,n_2-1}\). Use one fewer degree of freedom than each sample size, and preserve the numerator-then-denominator order of the ratio.

Check Your Understanding

For each problem, state the numerator and denominator degrees of freedom and, where the assumptions permit, the distribution of the ratio.

  1. Independent normal samples with a common variance have sizes 14 and 8. For \(S_1^2/S_2^2\), identify the ordered degrees of freedom. (Answer: numerator \(13\), denominator \(7\); \(F_{13,7}\).)
  2. Two independent normal samples share a common variance. Sample M has size 9 and sample N has size 16. The statistic is \(S_N^2/S_M^2\). What are its ordered degrees of freedom? (Answer: numerator \(15\), denominator \(8\); \(F_{15,8}\).)
  3. For independent normal samples with a common variance, sample P has size 11 and centered sum of squares 40; sample Q has size 6 and centered sum of squares 20. Calculate \(S_P^2/S_Q^2\) and give its F degrees of freedom. (Answer: \(S_P^2=40/10=4\), \(S_Q^2=20/5=4\), ratio \(1\); \(F_{10,5}\).)
  4. Independent normal samples have a common variance and sizes 20 and 12. A statistic is defined as \(S_2^2/S_1^2\), where sample 1 has size 20 and sample 2 has size 12. Give its ordered degrees of freedom. (Answer: numerator \(11\), denominator \(19\); \(F_{11,19}\).)
  5. Two independent samples have sizes 10 and 7, and the requested statistic is \(S_1^2/S_2^2\). The populations are normal but have different variances. Can the raw ratio be assigned the exact \(F_{9,6}\) distribution from the common-variance result? (Answer: No. The degrees of freedom attached to the two sample variances are 9 and 6, but the stated exact F law for the raw ratio requires a common population variance.)
Clinical Biostats