WOLFRAM NOTEBOOK

WOLFRAM|DEMONSTRATIONS PROJECT

Symmetrizing Positive Random Variables

λ
1
distribution
exponential
half-normal
Weibull
inverse gamma
Transformations to symmetry are frequently used in statistics to improve the accuracy of statistical models that assume the normal distribution or at least symmetrically distributed errors. Typically the transformation is chosen after the data has been observed but it is of theoretical interest to see what is the best symmetrizing transformation for various possible distributions.
We show the probability density function for the transformed random variable,
Z
,
Z=
(
λ
X
-1)/λ
λ0
log(X)
λ=0
,
where
λ[-2,2]
and
X
is a random variable with support on
(0,)
. This table shows the value of
λ
for each of the distributions that makes skewness of
Z
close to zero for the distributions used.
λ
exponential
0.278
half-normal
0.460
Weibull
0.416
inversegamma
-0.307
For the first three distributions, the usual skewness coefficient is defined for
λ>0
, so the best
λ
to symmetrize the distribution was found using Mathematica's built-in function FindMinimum to minimize the absolute skewness coefficient. The skewness coefficient may be computed using Mathematica's built-in function NIntegrate to obtain the first three moments. In the case of the inverse gamma distribution the mean and variance are undefined so a different definition of skewness is needed. The simplest definition for this problem is to take the difference in areas with respect to the mode. Using this definition,
λ=-0.307
was obtained. The values given in the table agree visually with the display.
In general, the value of
λ
to symmetrize the distribution may depend on the shape parameter. Of course, for some distributions, such as bimodal ones, there may not exist a symmetrizing transformation of the type discussed in this Demonstration.
It is of interest to note that increasing
λ
pushes the right tail of the distribution out toward
and pulls the left tail in towards 0. Decreasing
λ
reverses this effect so the right tail is pulled in and the left tail is pushed out toward
-
. This effect is sometimes referred to as the ladder of transformations with increasing/decreasing
λ
corresponding to going up/down the ladder.
Wolfram Cloud

You are using a browser not supported by the Wolfram Cloud

Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.


I understand and wish to continue anyway »

You are using a browser not supported by the Wolfram Cloud. Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.