![]() |
![]() |
|
PLS_Toolbox Documentation: gammadf | < expdf | gumbeldf > |
gammadf
Purpose
Gamma distribution.
Synopsis
prob = gammadf(function,x,a,b)
Description
Estimates cumulative distribution function (cumulative, cdf), probability density function (density, pdf), quantile (inverse of cdf), or random numbers for a Gamma distribution.
This distribution is commonly used to measure lifetime data (like the exponential distribution). The variance may be smaller, equal, or larger than the mean for this distribution and may also be symmetric or asymmetric. Negative values in the sample are ignored.
INPUTS:
Note: If inputs (x, a, and b) are not equal in size, the function will attempt to resize all inputs to the largest input using the RESIZE function.
Note: Functions will typically allow input values outside of the acceptable range to be passed but such values will return NaN in the results.
Examples
Cumulative:
>> prob = gammadf('c',0.99,0.5)
prob =
0.8406
>> x = [0:0.1:10];
>> plot(x,gammadf('c',x,2),'b-',x,gammadf('c',x,0.5),'r-')
Density:
>> prob = gammadf('d',0.99,0.5)
prob =
0.2107
>> x = [0:0.1:10];
>> plot(x,gammadf('d',x,2),'b-',x,gammadf('d',x,0.5),'r-')
Quantile:
>> prob = gammadf('q',0.99,0.5)
prob =
3.3174
Random:
>> prob = gammadf('r',[4 1],2)
ans =
0.4549
0.4638
0.3426
0.5011
See Also
betadf, cauchydf, chidf, expdf, gumbeldf, laplacedf, lognormdf, logisdf, normdf, paretodf, raydf, triangledf, unifdf, weibulldf
< expdf | gumbeldf > |