# What could be the reason for using square root transformation on data?

What is the primary reason that someone would apply the square root transformation to their data? I always observe that doing this always increases the $$R^2$$. However, this is probably just due to centering the data. Any thoughts are appreciated!

• I have answered this question and the more general question here stats.stackexchange.com/questions/18844/… Aug 17 '15 at 17:40
• If the dependent variable is different, the R-squares cannot be compared.
– user105305
Feb 16 '16 at 9:40

In general, parametric regression / GLM assume that the relationship between the $Y$ variable and each $X$ variable is linear, that the residuals once you've fitted the model follow a normal distribution and that the size of the residuals stays about the same all the way along your fitted line(s). When your data don't conform to these assumptions, transformations can help.

It should be intuitive that if $Y$ is proportional to $X^2$ then square-rooting $Y$ linearises this relationship, leading to a model that better fits the assumptions and that explains more variance (has higher $R^2$). Square rooting $Y$ also helps when you have the problem that the size of your residuals progressively increases as your values of $X$ increase (i.e. the scatter of data points around the fitted line gets more marked as you move along it). Think of the shape of a square root function: it increases steeply at first but then saturates. So applying a square root transform inflates smaller numbers but stabilises bigger ones. So you can think of it as pushing small residuals at low $X$ values away from the fitted line and squishing large residuals at high $X$ values towards the line. (This is mental shorthand not proper maths!)

As Dmitrij and ocram say, this is just one possible transformation which will help in certain circumstances, and tools like the Box-Cox formula can help you to pick the most useful one. I would advise getting into the habit of always looking at a plots of residuals against fitted values (and also a normal probability plot or histogram of residuals) when you fit a model. You'll find you'll often end up being able to see from these what sort of transformation will help.

• Hey Thanks! I know the boxcox funtion, but I was wondering for what practical reasons the sqrt transformation makes sense! Thank you! May 30 '11 at 16:47
• if the variance of the errors is linearly related to the level of the series one takes a logarithmic transformation. If the standard deviation is linearly related to the level of the series one takes a square root transformation. The selection has nothing to do with the size of the residuals as it relates to the level of y and all to do with the coupling/de-coupling the first and second moment. May 30 '11 at 17:58
• Freya, +1 for mental shorthand >> proper maths. Is that intuition also a reason for using L.5-metrics-for-clustering ? Jun 14 '11 at 17:17
• Hi Denis, I'm afraid I don't know anything about clustering. Jun 15 '11 at 13:22

The square-root transformation is just a special case of Box-Cox power transformation (a nice overview by Pengfi Li, could be useful reading and is found here), with $\lambda = 0.5$ and omitting some centering.

The aim of the Box-Cox transformations is to ensure the usual assumptions for Linear Model hold. That is, $y\sim N(X\beta, \sigma^2 I_n)$.

However this a priori fixed value could be (and probably is) not optimal. In R you may consider a function from car library powerTransform that helps to estimate an optimal value for Box-Cox transformations for each of the variables participated in linear regression or any data you work with (see the example(powerTransform) for further details).

When the variable follows a Poisson distribution, the results of the square root transform will be much closer to Gaussian.

• Could you give some arguments for this claim? May 6 '13 at 5:33
• It doesnt really help much for the individual distribution with a specific value of the parameter, but it makes the family of distribution obtained when the parameter is varying, closer to a normal family with constant variance Jun 24 '15 at 20:06
• Apr 24 '18 at 6:58

Taking the square root is sometimes advocated to make a non-normal variable appear like a normal variable in regression problems. The logarithm is another common possible transformation.

Distance matrix calculated with Bray-Curtis are usually not metric for some data, giving rise to negative eigenvalues. One of the solutions to overcome this problem is to transform (logarithmic, Square root or double Square root) it.