Gamma distribution - Analytica Docs (2024)


The Gamma distribution is a continuous, positive-only, unimodal distribution that encodes the time required for «alpha» events to occur in a Poisson process with mean arrival time of «beta»

Use the Gamma distribution with «alpha» > 1 if you have a sharp lower bound of zero but no sharp upper bound, a single mode, and apositive skew. The LogNormal distribution is also an option in this case. Gamma() is especially appropriate when encoding arrivaltimes for sets of events. A gamma distribution with a large value for «alpha» is also useful when you wish to use a bell-shaped curve fora positive-only quantity.

The gamma distribution is bounded below by zero (all sample points are positive) and is unbounded from above. It has a theoretical mean of alpha*beta and a theoretical variance of alpha*beta^2. When «alpha» > 1, the distribution is unimodal with the mode at (alpha - 1)*beta. An exponential distribution results when alpha = 1. As [math]\displaystyle{ \alpha \to \infty }[/math] , the gamma distribution approaches a normal distribution in shape.

  • 1 Functions
    • 1.1 Gamma(alpha, beta, over)
    • 1.2 Dens_Gamma(x, alpha, beta)
    • 1.3 CumGamma(x, alpha, beta)
    • 1.4 CumGammaInv(p, alpha, beta)
  • 2 When to use
  • 3 Statistics
  • 4 Parameter Estimation
  • 5 History
  • 6 See Also

Functions

Note

Some textbooks use Rate = 1/beta, instead of «beta», as the scale parameter.

Gamma(alpha, beta, over)

The distribution function. Use this to describe a quantity that is gamma-distributed with shape parameter «alpha» and scale parameter «beta». The scale parameter, «beta», is optional and defaults to beta = 1.

Dens_Gamma(x, alpha, beta)

To use this, you need to add the Distribution Densities Library to your model.

The analytic probability density of the Gamma distribution at «x». Returns

[math]\displaystyle{ p(x) = {{\beta^{-\alpha} x^{\alpha-1} \exp(-x/\beta)}\over{\Gamma(\alpha)}} }[/math]

CumGamma(x, alpha, beta)

To use this, you need to add the Distribution Densities Library to your model, or use GammaI instead.

The cumulative density up to «x», given for [math]\displaystyle{ x\gt 0 }[/math] by

[math]\displaystyle{ F(x) = {1\over {\Gamma(\alpha)}} \int_0^x \beta^{-\alpha} t^{\alpha-1} \exp(-t/\beta) dt }[/math]

This is also the same as the regularized incomplete gamma function, computed by the function GammaI.

CumGammaInv(p, alpha, beta)

To use this, you need to add the Distribution Densities Library to your model, or use GammaIInv instead.

The analytic inverse cumulative probability function (quantile function). Returns the pth fractile/quantile/percentile for the gamma distribution. Same as the inverse incomplete gamma function, GammaIInv.

When to use

Use the Gamma distribution with «alpha» > 1 if you have a sharp lower bound of zero but no sharp upper bound, a single mode, and apositive skew. The LogNormal distribution is also an option in this case. Gamma() is especially appropriate when encoding arrivaltimes for sets of events. A gamma distribution with a large value for «alpha» is also useful when you wish to use a bell-shaped curve fora positive-only quantity.

Statistics

The theoretical statistics (i.e., in the absence of sampling error) for the gamma distribution are as follows.

  • [math]\displaystyle{ 0\lt x\lt \infty }[/math]
  • [math]\displaystyle{ \alpha, \beta\gt 0 }[/math]
  • Mean = [math]\displaystyle{ \alpha \beta }[/math]
  • Mode = [math]\displaystyle{ Max([0, \alpha-1) \beta]) }[/math]
  • Variance = [math]\displaystyle{ \alpha \beta^2 }[/math]
  • SDeviation = [math]\displaystyle{ \beta \sqrt{\alpha} }[/math]
  • Skewness = [math]\displaystyle{ 2 / \sqrt{\alpha} }[/math]
  • Kurtosis = [math]\displaystyle{ 6 / \alpha }[/math]

Parameter Estimation

Suppose X contains sampled historical data indexed by I. To estimate the parameters of the gamma distribution that best fits this sampled data, the following parameter estimation formulae can be used:

alpha:= Mean(X, I)^2/Variance(X, I)
beta := Variance(X, I)/Mean(X, I)

The above is not the maximum likelihood parameter estimation, which turns out to be rather complex (see Wikipedia). However, in practice the above estimation formula perform excellently and are so convenient that more complicated methods are hardly justified.

The Gamma distribution with an «offset» has the form:

Gamma(alpha, beta) - offset

To estimate all three parameters, the following heuristic estimation can be used:

alpha := 4/Skewness(X, I)^2
offset:= Mean(X, I) - SDeviation(X, I)*Sqrt(alpha)
beta := Variance(X, I)/(Mean(X, I) - offset)

History

  • The analytic functions, DensGamma, CumGamma, and CumGammaInv were added as built-in functions to Analytica 5.2.
  • The underscore in Dens_Gamma function in the Distribution Densities Library was dropped for the built-in function.
  • In Analytica 5.0, the analytic functions CumGamma and CumGammaInv were added to the Distribution Densities Library. Although they are identical to the incomplete gamma function and its inverse, GammaI and GammaIInv, and hence entirely redundant, the addition was done to match the naming convention used for all other distributions.
  • GammaI and GammaIInv were added as built-in functions in Analytica 2.0.

See Also

  • Erlang
  • Gamma_m_sd
  • GammaI -- cumulative density at «x», incomplete gamma function
  • GammaIInv -- inverse cumulative density
  • GammaFn -- the gamma function
  • Beta
  • Exponential
  • LogNormal -- and above, related distributions
  • SDeviation
  • Parametric continuous distributions
  • Distribution Densities Library
Gamma distribution - Analytica Docs (2024)
Top Articles
How to increase Office 365 mailbox size to 100 GB
Robert Kiyosaki Is In Debt, But He Doesn’t Believe It’s a Bad Thing — Here’s Why
Jack Doherty Lpsg
WALB Locker Room Report Week 5 2024
Bleak Faith: Forsaken – im Test (PS5)
Repentance (2 Corinthians 7:10) – West Palm Beach church of Christ
Missing 2023 Showtimes Near Cinemark West Springfield 15 And Xd
Es.cvs.com/Otchs/Devoted
What is international trade and explain its types?
Nyuonsite
T&G Pallet Liquidation
Epaper Pudari
FIX: Spacebar, Enter, or Backspace Not Working
Full Range 10 Bar Selection Box
Craigslist Pikeville Tn
Binghamton Ny Cars Craigslist
Meritas Health Patient Portal
Spartanburg County Detention Facility - Annex I
Craigslist Malone New York
Transfer and Pay with Wells Fargo Online®
Race Karts For Sale Near Me
Healthier Homes | Coronavirus Protocol | Stanley Steemer - Stanley Steemer | The Steem Team
Panic! At The Disco - Spotify Top Songs
Filthy Rich Boys (Rich Boys Of Burberry Prep #1) - C.M. Stunich [PDF] | Online Book Share
Helpers Needed At Once Bug Fables
Inter Miami Vs Fc Dallas Total Sportek
Wrights Camper & Auto Sales Llc
Cor Triatriatum: Background, Pathophysiology, Epidemiology
Wku Lpn To Rn
Stephanie Bowe Downey Ca
Sinfuldeed Leaked
Craigs List Jax Fl
Mosley Lane Candles
UPC Code Lookup: Free UPC Code Lookup With Major Retailers
Utexas Baseball Schedule 2023
What Time Does Walmart Auto Center Open
School Tool / School Tool Parent Portal
Reborn Rich Ep 12 Eng Sub
Mta Bus Forums
Td Ameritrade Learning Center
craigslist | michigan
Cranston Sewer Tax
18 terrible things that happened on Friday the 13th
Panorama Charter Portal
Danielle Ranslow Obituary
Miami Vice turns 40: A look back at the iconic series
House For Sale On Trulia
Craigslist Sarasota Free Stuff
Elvis Costello announces King Of America & Other Realms
Cvs Minute Clinic Women's Services
Jovan Pulitzer Telegram
Latest Posts
Article information

Author: Prof. An Powlowski

Last Updated:

Views: 6145

Rating: 4.3 / 5 (64 voted)

Reviews: 95% of readers found this page helpful

Author information

Name: Prof. An Powlowski

Birthday: 1992-09-29

Address: Apt. 994 8891 Orval Hill, Brittnyburgh, AZ 41023-0398

Phone: +26417467956738

Job: District Marketing Strategist

Hobby: Embroidery, Bodybuilding, Motor sports, Amateur radio, Wood carving, Whittling, Air sports

Introduction: My name is Prof. An Powlowski, I am a charming, helpful, attractive, good, graceful, thoughtful, vast person who loves writing and wants to share my knowledge and understanding with you.