GAMMAINV

GAMMAINV(probability, alpha, beta)[source]

Calculates the inverse of the gamma cumulative distribution.

GAMMAINV returns the value x such that the gamma CDF evaluated at x equals the given probability, for the specified shape and scale parameters.

Parameters:
  • probability (Operand | int | float) –

    The probability value(s) for which to find the inverse (must be between 0 and 1).

    Supported types:

    • INTEGER

    • DECIMAL

    • INTEGER_ARRAY

    • DECIMAL_ARRAY

  • alpha (Operand | int | float) –

    The shape parameter α of the distribution (must be > 0).

    Supported types:

    • INTEGER

    • DECIMAL

    • INTEGER_ARRAY

    • DECIMAL_ARRAY

  • beta (Operand | int | float) –

    The scale parameter β of the distribution (must be > 0).

    Supported types:

    • INTEGER

    • DECIMAL

    • INTEGER_ARRAY

    • DECIMAL_ARRAY

Return type:

Formula

Returns:

A formula object evaluating to the inverse gamma distribution value(s).

  • Returns DECIMAL if all inputs are scalar

  • Returns DECIMAL_ARRAY if any input is an array

Supported types:

  • DECIMAL

  • DECIMAL_ARRAY

Raises:

ValueError – If probability, alpha, or beta are not numeric types

Examples

Scalar inverse:

GAMMAINV(0.9, 3.0, 1.0)
# Returns the 90th percentile of a gamma distribution with shape=3, scale=1

Array inputs:

GAMMAINV(my_table["probability"], 3.0, 1.0)
# Returns an array of inverse gamma values for each row