Formualizer Docs

GAMMA.DIST

Returns the gamma-distribution probability at x for shape alpha and scale beta.

GAMMA.DIST supports cumulative and density modes for right-skewed waiting-time models.

The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.

Syntax

=GAMMA.DIST(x, alpha, beta, cumulative)

Arguments

ArgumentTypeRequiredDefault
xnumberRequired—
alphanumberRequired—
betanumberRequired—
cumulativenumberRequired—

How it works

With positive shape α and scale β, the density for x > 0 is x raised to α−1 times exp(−x/β), divided by Γ(α)β raised to α. The cumulative option integrates from zero through x. Negative observations are outside the support.

Remarks

  • Requires x >= 0, alpha > 0, and beta > 0.
  • Set cumulative to non-zero for CDF mode, or 0 for PDF mode.
  • Invalid numeric coercions propagate as spreadsheet errors.
  • Alias GAMMADIST (the Excel 2007 compatibility name) is supported.

Error cases

  • Returns #NUM! when any parameter is outside its valid range.

Examples

Find the cumulative probability for a gamma distribution with shape three.

Formula =GAMMA.DIST(2,3,2,TRUE)

Expected result 0.0803013970713941

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Evaluate density at the same point.

Formula =GAMMA.DIST(2,3,2,FALSE)

Expected result 0.0919698602928605

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Evaluate the cumulative distribution at its lower boundary.

Formula =GAMMA.DIST(0,3,2,TRUE)

Expected result 0

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

A negative observation is outside the distribution.

Formula =GAMMA.DIST(-1,3,2,TRUE)

Expected result #NUM!

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Gamma CDF with alpha=1 and beta=2

Formula =GAMMA.DIST(2,1,2,TRUE)

Expected result 0.632120558828558

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Gamma PDF with alpha=1 and beta=2

Formula =GAMMA.DIST(2,1,2,FALSE)

Expected result 0.183939720585721

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Implementation

Engine source

On this page