# Transformation of leptokurtic data

I'm working on my BSc dissertation currently. One of my variables is created using the ratio of one continuous (mostly) normally distributed variable to another. The distribution of ratio is very highly leptokurtic with outliers (kurtosis/s.e. = 183) and I was wondering if there was any transformation that I could use to make it more normal. I had previously taken the absolute value and logged it which improved the distribution but it's been pointed out to me that the difference between -1 and 1 ratio etc is important and they are not equal. My data set includes negative values but no zero values. Any help would be appreciated. Thankyou.

• Have a look at Lambert W x Gaussian random variables and their transformation of data to normality (e.g., stats.stackexchange.com/questions/20445/…). It will work for your use case and has no issues with negative values – Georg M. Goerg Jun 1 '17 at 4:03
• FWIW the distribution of R = X / Y, where X and Y are two (independent) N(0, 1) random variables has a Cauchy distribution. This might be the case for you, then removing heavy-tails might not be desirable as you lose the property of it being Cauchy (and you can use Cauchy regression or sthg like that). See also stats.stackexchange.com/questions/162483/… and references therein. – Georg M. Goerg Mar 24 '18 at 21:18

It is a mistake to suppose that there is a good statistical solution that can be identified regardless of what the science (or economics, or whatever) is here. Why are you calculating a ratio in the first place? Is that essential, standard, conventional, or just a way of combining variables that seemed possible? Would the difference between variables make sense too?

If the denominator could be zero, at least in principle, taking the ratio is a bad idea. It may be your good fortune that you have no zeros, but it would still be the wrong thing to do. In any case, the ratio can be very sensitive to values near zero. That may be how your outliers arise.

Transformations that can be applied to variables that may be positive or negative include the cube root, the arctangent and the inverse sinh function.

They are all likely to be somewhat ad hoc, although there can be dimensional arguments for the cube root, e.g. if you are using volumes (in the physical sense).

Depending on your software, you might need to implement cube roots as something like

sign(y) * abs(y)^(1/3)


or the equivalent in your software. Most root functions take logarithms first and fall over with negative arguments, and they miss the fact that odd integer roots are perfectly well defined for negative values (e.g. the cube root of -8 is -2).

atan() and asinh() (or whatever notation is used by your software) pull in tails more than the cube root. The choice of function for transformation may be more a matter of psychology or sociology, if inverse trigonometric or hyperbolic functions are too exotic for your likely readership, or not something you care to explain.

See also work on the so-called neglog transformation. That was named in www.jstor.org/stable/3592674 If you don't use that transformation, the paper is useful as one of the few discussions of this problem that appear to exist. Almost all the literature on transformations seems to presuppose positive or at least non-negative variables.

• Thankyou for the replies both of you. The original variables are gene expression data so cannot be zero. A previous paper used the ratio of two gene expressions as one of their key independent variables so I really need to have a look at the ratio at least. Cube root and arctan both seem to help with the distribution so thankyou very much there. (And for the advice about software with cube roots - SPSS did indeed refuse to cube root negative values). The ratio variable will be used in comparisons of distributions between multiple groups and possibly within a multivariate logistic regression. – Jenny May 21 '13 at 20:30
• You might try the difference as well. If it produces results that are easier to handle or to interpret then you might be contributing to discussions of method. stata-journal.com/article.html?article=st0223 is a little paper on cube roots. – Nick Cox May 21 '13 at 22:08
• For reference the Lambert W x Gaussian transformation is another transformation which works perfectly fine for negative values as well (and even serves as a proper family of probability distributions-- not just a transformations). See e.g., stats.stackexchange.com/questions/20445/… – Georg M. Goerg Jun 1 '17 at 4:04
• I've not worked with that method. FWIW, I don't think it's a goal that any variable in a regression model has a named marginal distribution; at most conditional distributions are of interest and importance. – Nick Cox Jun 1 '17 at 5:50

Is this variable going to be an independent variable in some sort of regression? A dependent variable? Or what? Transforming it to normality may not be necessary, depending on how you plan to use the variable.

BUT.....

If you do need to use the two variables as one variable and you need it to be normally distributed , a better alternative may be the difference rather than the ratio. You did not show your data, but a simulation shows what I mean

set.seed(1919102)
x1 <- rnorm(100)
x2 <- rnorm(100)
xratio <- x1/x2
xdiff <- x1 - x2

plot(density(xratio)) #looks sort of like yours, highly leptokurtic with outliers
plot(density(xdiff)) #Much closer to normal