Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using the Fligner-Killen test to analyze the residuals of a linear regression. I subdivide those residuals in three groups and then I do the FK test to check the homogeneity of variances.

The result is:

fligner.test(pair.res, pair.groups)

    Fligner-Killeen test of homogeneity of variances

data:  pair.res and pair.groups 
Fligner-Killeen:med chi-squared = 2.6937, df = 2, p-value = 0.2601

In the image below I have plotted the residuals and the groups. Could someone explain me WHY those three groups have the same variance? It does not seem correct doing a simple visual check.

Time series plot of residuals, divided into three panels

share|improve this question
up vote 12 down vote accepted

They look about equal to me.

A good visual test to estimate or compare standard deviations (after checking for obvious outliers) is to look at the range of a dataset. For a given sample size, the range will typically be near a fixed multiple of the SD. With around 250 independent samples of a normal distribution, for instance, the range will be around 7 times the SD. So here we have ranges of around 1.3 (left panel), 1.0 (middle panel), and 1.1 (right panel), and each panel comprises about the same amount of data. Thus the ratios of variances, which will equal the squares of the ratios of the ranges, range from around $(1.3 : 1.1)^2$ = about $1.4$ down to $(1.0 : 1.1)^2$ = about $0.8$. You could use an F-test as a very rough estimate of significance, but I would reduce the degrees of freedom to account for the evidently strong serial correlation. Regardless, it wouldn't be unusual to get a pair of F-statistics (with 250 and 250 degrees of freedom) in the range $(0.8, 1.4)$ and reducing the df only increases that chance. In light of that, a p-value of $0.26$ looks fine.

Actually, you don't need a formal test here: it's pointless, because obviously these residuals aren't anywhere near independent and they exhibit strong trends within the series. There might not be much the regression can do to eliminate all the serial correlation, but a richer model is needed to capture the variation that is evident here. Until that happens, there's little sense in checking for homogeneity of the residuals.

share|improve this answer
Nicely and convincingly argued. – rolando2 Sep 30 '11 at 1:15
@whuber, one question. How did you understand that the series is normally distributed? – Dail Sep 30 '11 at 7:35
@Dail I don't think these residuals are normal: in the left panel they appear to have some negative skew and in the right panel, positive skew. I mentioned normality only as an example. This approach still works well for visual evaluation except when the groups have strongly different distributions (for then the proportion between the expected range and the expected SD in a random sample will be different). For that reason, an essential part of evaluating residuals includes assessing the shape of their univariate distribution (using probability plots, for instance). – whuber Sep 30 '11 at 13:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.