- Extreme Optimization
- Documentation
- Statistics Library User's Guide
- Continuous Distributions
- Continuous Distributions
- The Beta Distribution
- The Cauchy Distribution
- The Chi Square Distribution
- The Erlang Distribution
- The Exponential Distribution
- The F Distribution
- The Gamma Distribution
- The Generalized Pareto Distribution
- The Gumbel Distribution
- The Laplace Distribution
- The Logistic Distribution
- Log-Logistic Distribution
- The Lognormal Distribution
- The Non-central Beta Distribution
- The Non-central Chi Square Distribution
- The Non-central F Distribution
- The Non-central Student t distribution
- The Normal Distribution
- The Pareto Distribution
- The Rayleigh Distribution
- Student's t Distribution
- The Transformed Beta Distribution
- The Transformed Gamma Distribution
- The Triangular Distribution
- The Continuous Uniform Distribution
- The Weibull Distribution

- The Transformed Gamma Distribution

The Transformed Gamma Distribution | Extreme Optimization Numerical Libraries for .NET Professional |

The transformed gamma distribution can be used to model the time until an event occurs a specified number of times. For example, if a system has n-1 backups all with identical exponential distributions, then the time until the original system and all its backups have failed can be modeled using a gamma distribution. From this example, it is obvious that the exponential distribution is a special case of the gamma distribution.

The transformed gamma distribution has two shape parameters and a scale parameter. The probability density function is:

The transformed gamma distribution defines a rich family of distributions. Special values of the parameters result in a variety of well-known distributions:

The The Weibull Distribution when a = 1.

The The Gamma Distribution when b = 1.

The The Exponential Distribution when a = 1 and b = 1.

The transformed gamma distribution is implemented by the TransformedGammaDistribution class. It has one constructor that takes three arguments. The first and second are the two shape parameters. The third is the scale parameter.

The following constructs a transformed gamma distribution with shape parameters 4.2 and 3, and scale parameter 1:

The TransformedGammaDistribution class has three specific properties, ShapeParameter1, ShapeParameter2, and ScaleParameter, which return the shape and scale parameters of the distribution.

TransformedGammaDistribution
has one static (*Shared* in Visual Basic) method, Sample, which
generates a random sample using a user-supplied uniform random number generator. It takes fourth parameters.
The first argument is the random number generator. The second to fourth parameters
are the two shape parameters and the scale parameter of the distribution.

var random = new MersenneTwister(); double sample = TransformedGammaDistribution.Sample(random, 4.2, 3.0, 1.0);

The above example uses the MersenneTwister to generate uniform random numbers.

For details of the properties and methods common to all continuous distribution classes, see the topic on continuous distributions.

Copyright Â© 2004-2018,
Extreme Optimization. All rights reserved.

*Extreme Optimization,* *Complexity made simple*, *M#*, and *M
Sharp* are trademarks of ExoAnalytics Inc.

*Microsoft*, *Visual C#, Visual Basic, Visual Studio*, *Visual
Studio.NET*, and the *Optimized for Visual Studio* logo

are
registered trademarks of Microsoft Corporation.