This function evaluates the inverse of the gamma cumulative distribution function.
GAMIN — Function
value. (Output)
The probability that a gamma random variable
takes a value less than or equal to GAMIN is P.
P — Probability
for which the inverse of the gamma cumulative distribution function is to be
evaluated. (Input)
P must be in the open
interval (0.0, 1.0).
A — The shape
parameter of the gamma distribution. (Input)
This parameter must
be positive.
Generic: GAMIN (P, A)
Specific: The specific interface names are S_GAMIN and D_GAMIN.
Single: GAMIN (P, A)
Double: The double precision name is DGAMIN.
Function GAMIN evaluates the inverse distribution function of a gamma random variable with shape parameter a, that is, it determines x (= GAMIN(P, A)), such that
where Γ(⋅) is the gamma function. The probability that the random variable takes a value less than or equal to x is P. See the documentation for routine GAMDF for further discussion of the gamma distribution.
Function GAMIN uses bisection and modified regula falsi to invert the distribution function, which is evaluated using routine GAMDF.
Informational error
Type Code
4 1 Over 100 iterations have occurred without convergence. Convergence is assumed.
In this example, we find the 95-th percentage point for a gamma random variable with shape parameter of 4.
USE UMACH_INT
USE GAMIN_INT
IMPLICIT NONE
INTEGER NOUT
REAL A, P, X
!
CALL UMACH (2, NOUT)
A = 4.0
P = 0.95
X = GAMIN(P,A)
WRITE (NOUT,99999) X
!
99999 FORMAT (' The 0.05 gamma(4) critical value is ', F6.3, &
'.')
!
END
The 0.05 gamma(4) critical value is 7.754.
PHONE: 713.784.3131 FAX:713.781.9260 |