Wize Regression Analysis Textbook > Regression Diagnostics

Transforming Data to Meet Normality Assumption

Transforming Data to Achieve Normal Residuals

The regression normality assumption concerns the errors around the conditional mean, not the marginal distribution of YY.


A skewed residual histogram or a curved normal Q-Q plot is evidence to investigate possible non-normal errors, not proof: a finite sample from normal errors can show either pattern.


A residual-versus-fitted plot addresses different questions, such as curvature in the mean or changing spread. Consider these diagnostics together and check them again after fitting any transformed-response model.

Choosing a transformation

Choose a response scale in light of the relationship between the conditional mean and spread, and make sure the transformation is defined for every observed response:

Left: the blue points are the eleven observations in the chart. The dashed curve is the fitted line from the right panel mapped back to the original scale of Y. Right: the same eleven observations after the response transformation, with the solid least-squares line fitted on the transformed scale (intercept 1.5853, slope 0.4835 per hour). The transformed-scale residuals do not alternate in sign; they range from about -0.040 to +0.024 transformed units, with no systematic widening over time.

Left: the blue points are the eleven observations in the chart. The dashed curve is the fitted line from the right panel mapped back to the original scale of YY. Right: the same eleven observations after the response transformation, with the solid least-squares line fitted on the transformed scale (intercept 1.5853, slope 0.4835 per hour). The transformed-scale residuals do not alternate in sign; they range from about −0.040-0.040 to +0.024+0.024 transformed units, with no systematic widening over time.


  • For a right-tailed response with Y>0Y>0, a log transformation can be a useful first attempt when the conditional standard deviation is approximately proportional to the conditional mean and a multiplicative-error model with a reasonably stable log-scale error distribution is plausible. A long tail or widening spread alone does not guarantee that logging will stabilize variance. Refit and inspect the new residuals.
  • For nonnegative counts, Y≥0Y\ge 0, the square-root transformation is defined. It can stabilize variance when the variance grows roughly in proportion to the mean, as in a Poisson-style model.
  • For proportions strictly between 0 and 1, a logit transformation is one option; exact boundary values require separate, justified handling.
  • For a positive response with an unclear transformation shape, the Box–Cox family is one option:
Y(λ)={Yλ−1λ,λ≠0ln⁡(Y),λ=0Y^{(\lambda)} = \begin{cases} \dfrac{Y^{\lambda}-1}{\lambda}, & \lambda \neq 0\\[4pt] \ln(Y), & \lambda = 0 \end{cases}

This family requires Y>0Y>0 for every observation. A model criterion such as profile likelihood commonly guides the choice of λ\lambda; after selecting it, inspect the residual diagnostics rather than treating the criterion as proof that the errors are normal. Here λ=1\lambda=1 gives Y−1Y-1, an additive shift; λ=0.5\lambda=0.5 is an affine rescaling of Y\sqrt{Y}; and λ=0\lambda=0 gives ln⁡(Y)\ln(Y).

Worked example

In the displayed bacterial-count series, all responses are positive and the counts rise in an approximately multiplicative pattern over time.


Plotting ln⁡(Y)\ln(Y) against time can turn such an exponential-shaped mean trend into a near-linear one. That change in mean shape does not by itself establish normal, constant-variance errors.


Inspect the residual-versus-fitted plot and a Q-Q plot or histogram on the log scale; any skew or curvature is evidence to investigate, not proof of a violated assumption.

Bacterial Count Over Time (Raw Scale)

Bacterial Count Over Time (Raw Scale)


When predictions are made on the log scale, back-transforming a fitted log value gives a prediction on the original scale, but its interpretation depends on the error distribution and the target (for example, a conditional median versus a conditional mean). A mean prediction may require a correction for log-scale variability.



In simple linear regression, which pattern in the residual diagnostics gives the strongest evidence that the response variable YY should be transformed to better satisfy the normality assumption?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

All observed values of the response YY are positive. The response has a long right tail, and a residual-versus-fitted plot shows spread widening as fitted means increase. The conditional standard deviation is approximately proportional to the conditional mean, which is consistent with multiplicative errors; the distribution of errors on the log scale still needs to be checked. Which response transformation is a reasonable first attempt?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

A regression of bacterial count YY on time (the same kind of skewed data shown in the chart) is refitted with YY replaced by a Box–Cox transformation. A model criterion such as profile likelihood selects λ=0.3\lambda = 0.3, after which the residuals are checked. Using Y(λ)=Yλ−1λY^{(\lambda)} = \dfrac{Y^{\lambda}-1}{\lambda}, compute the transformed value of an observation with Y=89Y = 89 (thousand CFU/mL), to two decimal places.

Give your answer in Box–Cox transformed units, with Y expressed in thousand CFU/mL.

Left: the blue points are the eleven observations in the chart. The dashed curve is the fitted line from the right panel mapped back to the original scale of Y. Right: the same eleven observations after the response transformation, with the solid least-squares line fitted on the transformed scale (intercept 1.5853, slope 0.4835 per hour). The transformed-scale residuals do not alternate in sign; they range from about -0.040 to +0.024 transformed units, with no systematic widening over time.

Left: the blue points are the eleven observations in the chart. The dashed curve is the fitted line from the right panel mapped back to the original scale of YY. Right: the same eleven observations after the response transformation, with the solid least-squares line fitted on the transformed scale (intercept 1.5853, slope 0.4835 per hour). The transformed-scale residuals do not alternate in sign; they range from about −0.040-0.040 to +0.024+0.024 transformed units, with no systematic widening over time.

Bacterial Count Over Time (Raw Scale)

Bacterial Count Over Time (Raw Scale)

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Extra Practice