I'm reading Experimental Design and Analysis by H.Seltman and working on the provided HCI dataset (SPSS format, can be downloaded from page 143). The experiment involves comparing reaction times of two different groups (cyan and yellow) using a t-test.

For residual analysis, the book shows these two graphs:

enter image description here

To replicate the plots, I run the following R commands:

fit = lm(time~cyan)
histogram(~residuals(fit)|cyan,type = "density") #lattice library

What I'm confused about is the following:

Why two residual plots? Normally I would run something like this (thinking that residuals of the whole dataset should be analyzed):


Should residual plots be analyzed on a per level basis?


1) "The distribution of Y within each group is normally distributed.” It’s the same thing as Y|X and in this context, it’s the same as saying the residuals are normally distributed." (is it appropriate to say "distribution is distributed"?)

(Source: Why do we care so much about normally distributed error terms (and homoskedasticity) in linear regression when we don't have to?)

2) Normality of residuals vs sample data; what about t-tests? (Scrotchi's answer)

So for a t-test Normality verification, residuals or the individual groups' outcomes may be analyzed.

Why then in the earlier mentioned book the author analyzes residuals by group, instead of looking at the overall residual plot? Can someone please comment whether this is correct too?

| cite | improve this answer | |
  • 1
    $\begingroup$ Re (1): saying that the distribution is Normal within each group is definitely not the same as saying that the residuals are Normal overall, which is a (much) stronger assumption. The problem is that the variances of the two group distributions may differ. This is a fundamental concern with the t-test. $\endgroup$ – whuber Jun 2 '16 at 14:50
  • $\begingroup$ Thank you for your comment, @whuber. Is there any reason why a by-group residual histogram (see chart screenshot in my question) should be preferred to the pooled residual plot (such as one output by the qqplot(residuals(fit)) command in R) for Normality analysis? $\endgroup$ – Gregory Jun 2 '16 at 15:38
  • 1
    $\begingroup$ Absolutely! Only by looking at the residuals by group can you reliably detect whether there is an important difference in group variances. The combined plot, on the other hand, may look just fine, because a superposition of two zero-mean Normal distributions will still look fairly Normal even when the variances are quite different. Its qq plot will look slightly twisted, with heavier tails than predicted based on the middle values. $\endgroup$ – whuber Jun 2 '16 at 16:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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