# Normalization of data for ANOVA

Is it necessary to do normalization before anova if data are not normal (came to know after normality test).

I must explain my experiment: I have different temperature ranges (10-50 $^\circ$C) given to insects; then I measure the number of days to complete a life cycle against each temperature.

When I did ANOVA then I got $F$ that was almost 5000. One reviewer of our paper suggested that you should transform data before analysis.

I did $\log_{10}(X+1)$ transformation but data are still not normal. So what should I do?

• Just to be sure, $X$ is life cycle? Commented Nov 1, 2016 at 18:56
• You could also use a non-parametric test. Commented Nov 1, 2016 at 18:57
• The ideal condition for analysis of variance is that conditional distributions (response given predictors) are normal rather than that the marginal distribution is normal. Many texts and courses are paranoid to over-cautious on this point, but if in doubt compare results for untransformed and transformed data and certainly proceed with extreme caution if results differ greatly. In your case the transform log(response + 1) is at most needed if some life cycles are 0 days long, which seems implausible unless you are rounding to integer days. Commented Nov 1, 2016 at 19:42
• Why not show the data to get precise advice? We can't advise well at a distance any more than a doctor can judge between "you're basically fine" and "you're really sick" just on a report that you are unsure about your state of health. Commented Nov 1, 2016 at 19:43
• The reciprocal of a length of time has an interpretation as a rate (here of living, or of dying). But it is off-limits if any value is 0 and possibly a bad idea if any values are really close to 0 compared with others. Commented Nov 1, 2016 at 19:48

First, the data do not have to be normal for ANOVA (or, equivalently, linear regression). The assumptions are about the errors, which are represented by residuals.

Second, you should transform your data if it makes sense, substantively, to do so. You tell us, but it doesn't appear to me like there is a substantive reason to take logs.

Third, if the assumptions of ANOVA are violated, don't force the data to fit, use a method that makes different assumptions such as quantile regression, robust regression, regression trees ....

Fourth, if the number of days surviving is an integer, and the range isn't great, then you probably want to use a model for count data, such as Poisson or negative binomial regression.

Finally, if some of the data is censored (as is often the case with time to event data) then you need some form of survival analysis.

I can not comment yet. Take this response down if needed. Usually, it is advised against using a statistical test to quantify normality of a distribution. If you have a small sample size these tests do not have enough power to detect violation of normality and if the sample size becomes too large the test will become significant even if the distribution deviates only by little from the normal distribution. I would recommend just visually inspecting the data through a histogram or Q-Q plot.

Regarding the transformations. It really depends on the way your data is distributed. So maybe uploading a picture of the distribution, in form of a histogram, could help.

Try other transformations. Look here for more ideas. For example: $\sqrt X, 1/X, 1/X^2\ldots$ if you really want ANOVA. The other option is to non-parametric alternative to ANOVA: Kruskal-Wallis test. It works even for non-normal data.

Or eithe a) use a generalized least squares approach where you model the variance (eg it differs by group) or b) use a generalized linear model with the appropriate error distribution for your data.