INVGAMMAP
Updated 2024-03-08 16:38:52.673000
Syntax
SELECT [westclintech].[wct].[INVGAMMAP] (
<@P, float,>
,<@A, float,>)
Description
Use the scalar function INVGAMMAP to calculate the inverse of the incomplete gamma function P(a,x). The equation for this function is:
P(a,x)=\frac{\gamma(a,x)}{\Gamma(a)}
Where γ(a, x) is an incomplete gamma function and Γ(a) is the gamma function and where
\gamma(a,x)+\Gamma(a)=1
Arguments
@A
a value to be passed to the function. @A is an expression of type float or of a type that can be implicitly converted to float.
@P
a value to be passed to the function. @P is an expression of type float or of a type that can be implicitly converted to float.
Return Type
float
Remarks
If @A = 0, INVGAMMAP will return an error.
GAMMAP(@A,INVGAMMAP(@P, @A))-@P = 0
Examples
Select wct.INVGAMMAP(0.0526530172876507, 5);
This produces the following result.
{"columns":[{"field":"column 1","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"}],"rows":[{"column 1":"2"}]}
Select wct.GAMMAP(5, wct.INVGAMMAP(0.0526530172876507, 5)) - 0.0526530172876507;
This produces the following result.
{"columns":[{"field":"column 1","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"}],"rows":[{"column 1":"0"}]}
See Also
GAMMAP - lower regularized gamma function
GAMMAQ - upper regularized gamma function
GAMMADIST - gamma distribution
GAMMAINV - inverse gamma function
CHIDIST - chi-square distribution
GAMMA - complete gamma function