I'm working with the Iris dataset. One of the variables, PetalWidth, has a clear bimodal distribution.

My understanding is that multivariate regression sssumes normality for each of the input variables.

Can I continue with the variable left alone? Is it necessary to normalize it?

Here's the R code to access the data:

dni3 <- dimnames(iris3)
ii <- data.frame(matrix(aperm(iris3, c(1,3,2)), ncol = 4,
                        dimnames = list(NULL, sub(" L.",".Length",
                                                  sub(" W.",".Width", dni3[[2]])))),
                 Species = gl(3, 50, labels = sub("S", "s", sub("V", "v", dni3[[3]]))))
all.equal(ii, iris) # TRUE

1 Answer 1


I assume you mean multiple regression?

Anyway, it doesn't assume normality of the input variables. It assumes the response variable is conditionally distributed Gaussian (normal) but doesn't assume anything about the covariates or predictor variables (that said, transforming the covariates so that it's not just a few extreme values dominating the estimated effect often makes sense.)

Let's assume you are modelling petal width and it is bimodal. We might assume that the width of the petal is in some way connected to some of the petals coming from species A and some from species B. Once we account for the effect of species, the bimodality disappears if it was due to species as we essentially subtract each species mean from the data, which moves the two modes of the distribution together to be approximately 0. We then can say that conditional upon the model the response is distributed Gaussian (or rather we hope we can say this, but this is an assumption we need to check). Or in linear regression, that the residuals, which are the data after we have account for the model, are distributed Gaussian.

For example:


mod <- lm(Petal.Width ~ Species, data = iris)
iris <- cbind(iris, Residual = resid(mod))

p1 <- ggplot(iris, aes(x = Petal.Width)) +
  geom_histogram(bins = 10) + labs(title = "Original data")
p2 <- ggplot(iris, aes(x = Residual))+
  geom_histogram(bins = 10) + labs(title = "Residuals")
plot_grid(p1, p2, ncol = 2, align = 'hv', axis = 'lrtb')

Which produces

enter image description here

The residuals aren't really Gaussian, but this is not the right model for a variable constrained at 0 (can't observe zero width or negative width petals). However, the bimodality has gone because it was due to (careful with causality) or related to differences between species.

  • $\begingroup$ does data transformation of the response variable into one that is conditionally distributed Gaussian (normal), in accordance with linear regression's assumptions, lower the amount of out-of-sample mis-estamation the fitted model makes? or will the model perform the same as it would had the original data been used, untransformed? in other words, are we any better off complying with the rules (assumptions) of a learning model, or will estimation error still be present either way regardless? $\endgroup$
    – develarist
    Commented Aug 11, 2020 at 13:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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