Gamma cumulative distribution function
[p,plo,pup] = gamcdf(x,a,b,pcov,alpha)
[p,plo,pup] = gamcdf(___,'upper')
gamcdf(x,a,b) returns the gamma cdf at each of the
x using the corresponding shape parameters in
a and scale parameters in
b can be vectors,
matrices, or multidimensional arrays that all have the same size. A scalar input is
expanded to a constant array with the same dimensions as the other inputs. The
b must be positive, and the
x must lie on the interval
[p,plo,pup] = gamcdf(x,a,b,pcov,alpha) produces
confidence bounds for
p when the input parameters
pcov is a 2-by-2 matrix containing the
covariance matrix of the estimated parameters.
a default value of 0.05, and specifies
arrays of the same size as
p containing the lower
and upper confidence bounds.
[p,plo,pup] = gamcdf(___,'upper') returns
the complement of the gamma cdf at each value in
using an algorithm that more accurately computes the extreme upper
tail probabilities. You can use the
with any of the previous syntaxes.
The gamma cdf is
The result, p, is the probability that a single observation from a gamma distribution with parameters a and b will fall in the interval [0 x].
gammainc is the gamma distribution with b fixed
The mean of the gamma distribution is the product of the parameters, ab. In this example, the mean approaches the median as it increases (i.e., the distribution becomes more symmetric).
a = 1:6; b = 5:10; prob = gamcdf(a.*b,a,b)
prob = 1×6 0.6321 0.5940 0.5768 0.5665 0.5595 0.5543
This function fully supports GPU arrays. For more information, see Run MATLAB Functions on a GPU (Parallel Computing Toolbox).