9853

Transformation to Symmetry of Gamma Random Variables

This Demonstration shows the probability density function for the transformed random variable, :
Here and is a gamma random variable with shape parameter and scale parameter . The mean and variance of are and . 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 symmetric depends on the shape . The case of with shown in the thumbnail works fairly well. With , try experimenting with other shape parameters to see how well this transformation preserves symmetry. Compare how well the logarithmic transformation, , works to make the distribution symmetric. With 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.

SNAPSHOTS

  • [Snapshot]
  • [Snapshot]
  • [Snapshot]
  • [Snapshot]

DETAILS

Snapshot 1: The scale parameter has been increased from in the thumbnail to . There no change in the symmetry.
Snapshot 2: Here , so this corresponds to the standard unit exponential distribution. Because of the Box–Cox transformation with , 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, , for the exponential distribution is shown. Comparing with in the case shown in the caption, we see that does better. As an exercise, you might like to compute the skewness coefficient, , where and are the second and third moments of the transformed distribution. The skewness coefficients for selected values of are shown in the table below:
The built-in Mathematica function FindRoot found that for .
Snapshot 4: When the shape parameter increases, the gamma distribution approximates the normal. Here and corresponds to no transformation, apart from a shift in location, and even with , 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.
    • Share:

Embed Interactive Demonstration New!

Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details »

Files require Wolfram CDF Player or Mathematica.









 
RELATED RESOURCES
Mathematica »
The #1 tool for creating Demonstrations
and anything technical.
Wolfram|Alpha »
Explore anything with the first
computational knowledge engine.
MathWorld »
The web's most extensive
mathematics resource.
Course Assistant Apps »
An app for every course—
right in the palm of your hand.
Wolfram Blog »
Read our views on math,
science, and technology.
Computable Document Format »
The format that makes Demonstrations
(and any information) easy to share and
interact with.
STEM Initiative »
Programs & resources for
educators, schools & students.
Computerbasedmath.org »
Join the initiative for modernizing
math education.
Step-by-step Solutions »
Walk through homework problems one step at a time, with hints to help along the way.
Wolfram Problem Generator »
Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet.
Wolfram Language »
Knowledge-based programming for everyone.
Powered by Wolfram Mathematica © 2014 Wolfram Demonstrations Project & Contributors  |  Terms of Use  |  Privacy Policy  |  RSS Give us your feedback
Note: To run this Demonstration you need Mathematica 7+ or the free Mathematica Player 7EX
Download or upgrade to Mathematica Player 7EX
I already have Mathematica Player or Mathematica 7+