The GAMMA.DIST function in Google Sheets is designed to compute the cumulative distribution function (CDF) or the probability density function (PDF) of the gamma distribution. This function is particularly useful for statistical analysis and modeling, where gamma-distributed data is involved, such as life insurance claims or queuing theory scenarios.
Syntax
GAMMA.DIST(x, alpha, beta, cumulative)
- x: The value at which to evaluate the function.
- alpha: A parameter that defines the shape of the distribution.
- beta: A parameter that defines the scale of the distribution.
- cumulative: A boolean indicating whether to return the CDF (TRUE) or PDF (FALSE).
Example #1
=GAMMA.DIST(2, 3, 2, TRUE)
This function returns the cumulative distribution value for x=2, with alpha set to 3 and beta set to 2. The result will be approximately 0.857123, indicating the probability that a gamma-distributed random variable is less than or equal to 2.
Example #2
=GAMMA.DIST(5, 7, 1, FALSE)
In this instance, the function calculates the probability density at x=5, using alpha=7 and beta=1. The resulting value will be approximately 0.001051, representing the likelihood of observing exactly the value of 5 in the gamma distribution.
Example #3
=GAMMA.DIST(1, 4, 2, TRUE)
Here, this function computes the cumulative distribution for x=1 with parameters alpha=4 and beta=2. The output will be around 0.350428, showing the probability that a random variable is less than or equal to 1.
Error handling
- NUM!: This error occurs when any of the parameters are out of the valid range. Ensure that alpha and beta are positive numbers.
- VALUE!: This error indicates that a non-numeric value has been provided as one of the arguments. Verify that all inputs are numerical.
- DIV/0!: This error may be shown when alpha or beta is set to zero. Both parameters must be greater than zero.