Tutorials › VEE Mathematical Statistics › How Outliers Distort Variance-Ratio Tests

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

How Outliers Distort Variance-Ratio Tests

Learn why outliers can sharply change a variance ratio and how to check whether an F-test conclusion is trustworthy.

Intermediate 10 min read

What You'll Learn

  • Explain why squared deviations give extreme observations disproportionate influence on sample variance.
  • Calculate how an added observation changes a sample variance.
  • Compute and interpret an F statistic when one sample contains an outlier.
  • Identify how an outlier can change a two-sided variance-test decision.
  • Avoid confusing the sample-variance divisor with the sample size.
  • Separate a mechanical F-test result from a conclusion supported by the model assumptions.

Why an Outlier Matters in a Variance-Ratio Test

A variance-ratio test compares the variability in two independent samples. Its statistic is built from sample variances, and each sample variance is built from squared deviations from a sample mean. That squaring makes the procedure especially responsive to observations far from the rest of their sample: one extreme value can contribute more to the total squared deviation than all the other observations combined.

This creates two related issues. First, the computed F statistic may become very large or very small because one sample contains an unusual observation. Second, the exact classical F test is justified when the two samples are independent random samples from normal populations. If an extreme observation signals that the normal model is inappropriate, the usual F reference distribution may no longer give a reliable test decision. The statistic can still be calculated, but its textbook p-value must be interpreted with care.

Definition: For observations \(x_1,\ldots,x_n\), the sample mean is \(\bar{x}=\frac{1}{n}\sum_{i=1}^{n}x_i\), and the unbiased sample variance is \(s^2=\frac{\sum_{i=1}^{n}(x_i-\bar{x})^2}{n-1}\). For two independent normal samples, the classical null hypothesis of equal population variances gives \(F=s_1^2/s_2^2\sim F(n_1-1,n_2-1)\) when the ratio is formed in that order. The exact result requires independent observations within and between samples, normal populations, and the null hypothesis of equal variances.

The order of the ratio matters for identifying its degrees of freedom: the numerator sample variance contributes \(n_1-1\), and the denominator contributes \(n_2-1\). For a two-sided test, one may put the larger observed variance in the numerator and use the corresponding degrees of freedom, or use the lower and upper tails with the original ordering. Either approach must match the test's critical values or p-value calculation. An outlier does not change the arithmetic rules; it may change the values being compared and undermine the model used to calibrate the test.

Why a Distant Observation Inflates Variance

The sample variance measures squared distance from the sample mean. When an observation is far from the other observations, it contributes a large squared distance. The sample mean also shifts toward it, which reduces some of the other deviations, but this shift does not usually offset the outlier's large contribution.

Derivation: Suppose a sample of size \(n\) has mean \(\bar{x}\) and sum of squared deviations \(Q=\sum_{i=1}^{n}(x_i-\bar{x})^2\). Add an observation \(z\). The new mean is \(\bar{x}'=(n\bar{x}+z)/(n+1)\). The new sum of squared deviations is \(Q'=Q+\frac{n}{n+1}(z-\bar{x})^2\), so the new sample variance is \(s_{\text{new}}^2=Q'/n\). To see the identity, write each old deviation as \(x_i-\bar{x}'=(x_i-\bar{x})+(\bar{x}-\bar{x}')\). The cross terms sum to zero because \(\sum_i(x_i-\bar{x})=0\). Adding the new observation's squared deviation then gives \(Q'=Q+n(\bar{x}-\bar{x}')^2+(z-\bar{x}')^2\). Substituting \(\bar{x}-\bar{x}'=(\bar{x}-z)/(n+1)\) and \(z-\bar{x}'=n(z-\bar{x})/(n+1)\) simplifies the added terms to \(\frac{n}{n+1}(z-\bar{x})^2\). The increase is therefore proportional to the square of the distance between the added value and the original mean.

The formula explains why an outlier's influence can be disproportionate. If the distance from \(z\) to the old mean is multiplied by 10, the added term in \(Q'\) is multiplied by 100. This does not mean every distant value is an error. It means that a variance-based analysis needs careful attention to unusual observations, their measurement, and the model assumptions.

Worked Example: Measuring the Effect of an Added Extreme Value

A hypothetical claims review records four loss amounts, in thousands of dollars, for a small category of claims: 9, 10, 11, and 10. A fifth reviewed claim is later found to have a recorded amount of 30. Calculate the sample variance before and after adding that observation, and explain the change. Treat the values as a statistical illustration, not as industry data.

Method. Compute the mean and sum of squared deviations for each data set, then divide by the sample size minus one. This uses the unbiased sample variance, not the divisor \(n\).

Before adding the fifth observation, the sample size is \(n=4\), and the mean is

$$ \bar{x}=\frac{9+10+11+10}{4}=10. $$

The squared deviations are \(1,0,1,0\), so their sum is \(Q=2\). Thus

$$ s^2=\frac{2}{4-1}=\frac{2}{3}=0.6667 $$

in squared thousands of dollars. After adding 30, the sample size is 5 and the new mean is

$$ \bar{x}'=\frac{9+10+11+10+30}{5}=\frac{70}{5}=14. $$

The deviations from 14 are \(-5,-4,-3,-4,16\). Their squares sum to

$$ Q'=25+16+9+16+256=322. $$

Therefore the new sample variance is

$$ s_{\text{new}}^2=\frac{322}{5-1}=80.5. $$

The variance has increased from \(0.6667\) to \(80.5\), a factor of \(80.5/(2/3)=120.75\). The added value accounts for \(256\) of the new sum of squared deviations, even though the other four values are close together. Check: the original sum of squared deviations is 2, and the update identity gives \(2+\frac{4}{5}(30-10)^2=2+320=322\), matching the direct calculation. The common mistake is to treat the new mean shift as enough to make the extreme observation harmless; the direct squared deviations show otherwise.

How the Outlier Changes the F Statistic

For two samples, an outlier in just one group can dominate the numerator or denominator of \(F=s_1^2/s_2^2\). If the larger variance is placed in the numerator, a single extreme value can make the ratio look like strong evidence against equal population variances. But the F distribution provides an exact reference only under the stated normality and independence assumptions. A data point created by contamination, a recording error, or a genuinely heavy-tailed population may make those assumptions doubtful.

Worked Example: An Outlier Reverses the Test Decision

Consider two hypothetical independent samples, each of size 4. Initially, both contain the values 9, 10, 11, and 10. Then one observation in the second sample is replaced by 30. Use the classical two-sided 5% F test of equal population variances to compare the results, while noting the model limitation.

Method. Calculate each unbiased sample variance and form the larger-to-smaller ratio. Under the null hypothesis and independent normal sampling, the statistic has an \(F(3,3)\) distribution because each sample has \(4-1=3\) degrees of freedom.

Initially each sample has mean 10 and squared-deviation sum 2. Therefore both sample variances are \(2/3\), and the ratio is

$$ F=\frac{2/3}{2/3}=1. $$

There is no evidence of a variance difference in this initial comparison. With the changed second sample \(9,10,11,30\), its mean is 15 and its squared-deviation sum is

$$ (9-15)^2+(10-15)^2+(11-15)^2+(30-15)^2 =36+25+16+225=302. $$

Its unbiased sample variance is \(302/3=100.6667\), while the first sample variance remains \(2/3\). The larger-to-smaller ratio is

$$ F=\frac{302/3}{2/3}=151. $$

For a two-sided 5% test with degrees of freedom \((3,3)\), the upper critical value is approximately 15.44. Since \(151>15.44\), the mechanical classical test rejects equality of variances. Check: \(151(2/3)=100.6667\), the larger sample variance. The common mistake is to report the rejection as conclusive evidence of different population variances without checking why the second sample contains 30. The observation has overwhelming influence on the ratio, and if it reflects non-normality or contamination, the exact F calibration may not be trustworthy.

A very small variance in the denominator can also magnify a ratio, even if the numerator is not unusually large. Always inspect both sample spreads and the underlying observations rather than treating a large F statistic as a self-explanatory finding. Conversely, if extreme observations occur in both samples, their effects may partly offset in the ratio; the absence of a large F statistic does not prove that the samples are well behaved.

A Divisor Error Can Change the Conclusion

A common exam trap is to divide the sum of squared deviations by \(n\) instead of \(n-1\). The result is not the unbiased sample variance used in the classical F test. For two samples of the same size, using \(n\) in both variances happens to leave their ratio unchanged, because the same factor cancels. For unequal sample sizes, it generally does not cancel. Even with equal sizes, the mistaken values are not the sample variances, so the error can confuse later calculations or comparisons.

Worked Example: Correcting the Sample-Variance Divisor

Two independent hypothetical samples each have size 3. The first sample is \(-\sqrt{53.56}, 0, \sqrt{53.56}\); the second is \(-1,0,1\). Test equality of variances with a two-sided 5% classical F test, using the larger sample variance in the numerator. Assume independent normal sampling for the test calculation.

Method. Find the means and sums of squared deviations, divide each sum by \(n-1=2\), and then calculate the ratio and p-value. The \(F(2,2)\) distribution has cumulative distribution function \(P(F\leq f)=f/(1+f)\) for \(f>0\). Thus its upper-tail probability is \(1/(1+f)\). With the larger-to-smaller ratio, the two-sided p-value is twice that upper-tail probability when it is at most 1.

The first sample has mean 0 and squared-deviation sum \(53.56+0+53.56=107.12\). Its sample variance is

$$ s_1^2=\frac{107.12}{3-1}=53.56. $$

The second sample has mean 0 and squared-deviation sum \(1+0+1=2\), so

$$ s_2^2=\frac{2}{3-1}=1. $$

The observed ratio is \(F=53.56/1=53.56\), with degrees of freedom \((2,2)\). Its two-sided p-value is

$$ p=2\left(\frac{1}{1+53.56}\right) =\frac{2}{54.56} \approx 0.0367. $$

Since \(0.0367<0.05\), the classical test rejects equal variances at the 5% level. The same conclusion follows from the upper critical value 39 for the larger-to-smaller ratio: \(53.56>39\).

If the first sum of squared deviations were mistakenly divided by \(n=3\), its variance-like value would be \(107.12/3=35.7067\), not \(53.56\). Treating that as the sample variance would give the incorrect ratio \(35.7067\), and the corresponding \(F(2,2)\) two-sided calculation would be \(2/(1+35.7067)\approx0.0545\), which would not reject. The correct divisor changes the decision in this example. Check: the sample size is 3, so the unbiased sample variance uses \(3-1=2\); the correct result is \(107.12/2=53.56\). The common mistake is to confuse the number of observations with the degrees-of-freedom divisor.

Interpreting the Result in Context

A classical F test is most useful when its assumptions are plausible. If a sample contains an extreme observation, first distinguish the arithmetic question from the modeling question:

1
Verify the observation.
Check units, data entry, and whether the value belongs to the group being analyzed. Do not delete a value solely because it is inconvenient or extreme.
2
Recalculate transparently.
Report the sample sizes, sample variances, ratio, degrees of freedom, and test decision. Use \(n-1\) for each unbiased sample variance.
3
Assess the model-based conclusion.
Ask whether independent normal samples remain credible. If the extreme value indicates non-normality or contamination, qualify the classical p-value rather than presenting its exact calibration as assured.

The distinction is important in actuarial work. A hypothetical insurer might compare claim-severity variability between two independently sampled portfolios. A single unusually large claim can be a valid observation and still dominate the sample variance. The resulting test statistic answers a mathematical question under its model; it does not determine whether the outlier is erroneous, whether the model is appropriate, or whether a portfolio difference has a particular cause.

The key exam discipline is to state the assumptions before interpreting the test. Under independent normal sampling and equal population variances, the F statistic has its stated reference distribution. If those conditions are doubtful, the calculation remains a description of the observed variances, but the nominal test conclusion may not have its intended error rate. This is aligned with the SOA VEE Mathematical Statistics syllabus.

Key takeaway: Because sample variance uses squared deviations, one extreme observation can greatly inflate a variance and alter the F ratio or test decision. Calculate carefully, check the \(n-1\) divisor, and distinguish the classical test result from the conclusion warranted by the model assumptions.

Check Your Understanding

For each problem, use the unbiased sample variance and state the requested result. Classical F-test interpretations assume independent normal samples unless the problem says otherwise.

  1. A sample of four hypothetical measurements is \(4,5,6,20\). Calculate its mean and unbiased sample variance. (Answer: \(\bar{x}=8.75,\ s^2=56.9167\).)
  2. Two independent samples of size 3 have values \(2,3,4\) and \(2,3,10\). Find both sample variances, the larger-to-smaller F statistic, and the two-sided p-value under the \(F(2,2)\) null model. Does the test reject at 5%? (Answer: \(s_1^2=1,\ s_2^2=19,\ F=19,\ p=2/20=0.1000\); do not reject.)
  3. The observations \(1,2,3,4\) have sum of squared deviations 5. An observation of 10 is added. Use the update identity to calculate the new sum of squared deviations and the new sample variance. (Answer: \(Q'=5+\frac45(10-2.5)^2=50,\ s_{\text{new}}^2=50/4=12.5\).)
  4. Two independent normal samples of size 3 have sample variances 4 and 1. Find the larger-to-smaller F statistic and the two-sided p-value under the null model. State the 5% decision. (Answer: \(F=4,\ p=2/(1+4)=0.4000\); do not reject.)
Clinical Biostats