# ANOVA - Homogeneous variance, what to look for in a boxplot

I'm just starting out learning about ANOVA, I'm having trouble understanding how to check for homogeneous variance assumptions.
One source I have seems to be looking at box-plots, and another looks at residual vs fitted plot. But I'm not sure what they are looking at exactly.
For example, here is a screenshot from a video on YouTube showing Residual vs Fitted (sorry I could not find the actual dataset used).
The presenter is saying that the overall variance is relatively homogeneous. How can he tell that? Is he looking at the vertical distance between the points in each group?
To me it seems that the first 2 groups from the left have a larger variance than the last group? Those point 19 and 29 are much further from the rest of the points below them.

What about when people use a box plot to check for equal variance?
For example, the box plot below. What am I supposed to be looking at?
Is it the overall size of the box (from Q1 to Q3) or the whole thing including whiskers?
Why can't we just look at the IQR?
What about outliers, do they impact the homogeneous variance assumption?
Would you consider this data to have approximately equal variance based on the box plots?

At this stage I'm really only looking for understanding based on visual inspection. I've read that there are some formal tests for this, but I'm not up to this stage yet.

Thank you

The point is to compare how "spread out" the residuals are at each value of the independent variable (or at each combination of the IVs if there's several of them).

The residuals vs fitted can be very handy for that, particularly since a common way for the assumption to be wrong is for the spread to increase as the mean does.

There are various ways to judge spread; I try to look at how big an interval would need to be to include about 90-95% of the values at (or near, for continuous IVs) each x-value or each fitted value.

You need to allow for the fact that these things will have a fair bit of noise.

Your top plot has very much the kind of picture you'd expect to see with constant variance.

For example look how much of each spread of points is left out by this length of interval:

I'd say your sds are all around $\frac12$ there.

We lose one point for each; if anything these seem surprisingly close. You can tolerate a lot more variation in spread than that.

Similarly it's not hard to compare box-widths in a boxplot (which include half the data at each value). If they're mostly within a factor of about 2 or so of each other everything should be completely fine. If sample sizes are close to equal at each x-value (in an ANOVA or t-test) you can have considerably wider differences in spread with little problem.

In your boxplot your biggest box is just over double the size of your smallest box, so that looks pretty good to me. Your assumption of constant variance shouldn't be a problem; with several groups you can generally tolerate quite a bit more variation across the set than that. If the groups are close to equal in size, worry much less.

I'd advise against formal tests of this assumption; they're not very useful (they don't answer the right question!)

Here's an example where I'd just about be on the cusp of saying "The equal variance assumption wouldn't do":

Even here the impact of that amount of heteroskedasticity isn't so terrible; but if you see anything clearly worse than that you would need to be wary of standard errors, p-values, confidence intervals and so on.

• So let me just summarise what I understood: For fitted vs residuals I want to make sure that the values are close together for each IV. The fact that only 1 point is left out from each spread indicates that the variability is ok. Regarding the box plot, we are looking at the size of the box. As long as the biggest box is not much more than 2 times the smallest, the variance is ok. So does that mean I an not really interested in the outliers and in the whisker length of the box plot? Also, why dont we just use IQR instead of looking at Box plots? – jmich738 Sep 6 '17 at 6:27
• "The values are close together" ... well no. To check equality of variance the spreads should be similar but the means might differ (different means would indicate a problem with the model, but not an issue with the variance -- which is what we're looking at in your question). The fact that the points outside the intervals I drew were outside is not an issue if they're not really far away. 2. "As long as the biggest box is not much more than 2 times the smallest, the variance is ok." Well, that's too strong; ... ctd – Glen_b Sep 6 '17 at 7:18
• ctd...you can use it when other things are fairly similar. If you had 15 huge outliers in one group then the similarity of the box widths would not be sufficient. SImilarly if the whisker lengths were very, very different it could be an issue. The most information about relative spread is in the middle but it's not the only thing. Whisker length and outliers are very noisy indicators; they do tell you something about spread ... but they may tell you something about other issues. There's some similarity between my analysis of the first plot and what whisker length would show. – Glen_b Sep 6 '17 at 7:19
• I was giving thought processes for the pictures you presented; discussion of what I focused on in those don't cover every possible situation. It's hard because issues like distribution shape and outliers can impact the picture (and raise other concerns than just spread) – Glen_b Sep 6 '17 at 7:22
• I think I'm getting it (slowly). It seems to be more of 'art' rather than science. I guess I was hoping for a clear cut yes/no. But it looks like that's not going to happen in statistics. It would be good to see examples of where the variance is clearly not equal. So that I can get a contrast between the 2 situations. Would you know how to simulate such an example in R or Excel? – jmich738 Sep 6 '17 at 13:55