Transformation to Symmetry of Gamma Random Variables

​
λ
0.344
shape α
2.96
scale β
1.126
0
10
20
30
This Demonstration shows the probability density function for the transformed random variable,
Z
λ
:
Z
λ
=
(
λ
X
-1)/λ
λ≠0
log(X)
λ=0
Here
λ∈[0,1]
and
X
is a gamma random variable with shape parameter
α
and scale parameter
β
. The mean and variance of
X
are
αβ
and
α
2
β
. So variance stabilization theory suggests that the logarithmic transformation should be used. This Demonstration shows that the value of
λ
that works best for making the distribution of
Z
λ
symmetric depends on the shape
α
. The case of
α=1
with
λ=0.3
shown in the thumbnail works fairly well. With
λ=0.3
, try experimenting with other shape parameters
α
to see how well this transformation preserves symmetry. Compare how well the logarithmic transformation,
λ=0
, works to make the distribution symmetric. With
λ=1
fixed, explore the shapes of various gamma distributions. Note that as
α
increases, the gamma distribution approximates the normal distribution. Changing the scale parameter
β
enlarges or shrinks the distribution but has no effect on the skewness or lack of symmetry.

Details

Snapshot 1: The scale parameter
β
has been increased from
β=1
in the thumbnail to
β=2
. There no change in the symmetry.
Snapshot 2: Here
α=β=1
, so this corresponds to the standard unit exponential distribution. Because of the Box–Cox transformation with
λ=1
, the location has been shifted to the left by 1, so the mean of the resulting distribution is now 0, while the variance remains at 1.
Snapshot 3: The logarithmic transformation,
λ=0
, for the exponential distribution is shown. Comparing with
λ=0.3
in the case shown in the caption, we see that
λ=0.3
does better. As an exercise, you might like to compute the skewness coefficient,
g
1
=
m
3

3/2
m
2
, where
m
2
and
m
3
are the second and third moments of the transformed distribution. The skewness coefficients for selected values of
λ
are shown in the table below:
λ
g
1
1.00
2.00
0.30
0.07
0.29
0.04
0.28
0.01
0.27
-0.02
0.00
-1.14
The built-in Mathematica function FindRoot found that
g
1
≈0
for
λ≈0.277597
.
Snapshot 4: When the shape parameter increases, the gamma distribution approximates the normal. Here
α=12
and
λ=1
corresponds to no transformation, apart from a shift in location, and even with
α=12
, the gamma distribution is close to the normal distribution. The degree of approximation could be visualized using normal quantile or probability plots. You may be interested in extending this Demonstration to include the use of these plots for choosing a suitable transformation.
The theory of variance-stabilizing transformations was derived in[1]. For more details and examples with transformation to symmetry of random variables, see[2].

References

[1] M. S. Bartlett, "The Use of Transformations," Biometrics, 3(1), 1947 pp. 37–52.
[2] I. McLeod. "Symmetrizing Positive Random Variables" from the Wolfram Demonstrations Project—A Wolfram Web Resource. demonstrations.wolfram.com/SymmetrizingPositiveRandomVariables.

External Links

Choosing a Data Transformation with the Box-Whisker Plot
Gamma Distribution (Wolfram Documentation Center)
Probability Plot (Wolfram Documentation Center)
Quantile Plot (Wolfram Documentation Center)
Symmetrizing Positive Random Variables

Permanent Citation

Ian McLeod, Nagham Muslim Mohammad
​
​"Transformation to Symmetry of Gamma Random Variables"​
​http://demonstrations.wolfram.com/TransformationToSymmetryOfGammaRandomVariables/​
​Wolfram Demonstrations Project​
​Published: June 24, 2013