Logo

GAMMAP

Updated 2024-03-08 16:02:12.403000

Syntax

SELECT [westclintech].[wct].[GAMMAP] (
  <@A, float,>
 ,<@X, float,>)

Description

Use the scalar function GAMMAP to calculate the regularized 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.

@X

a value to be passed to the function. @X is an expression of type float or of a type that can be implicitly converted to float.

Return Type

float

Remarks

If @A <0 or @X is < 0, GAMMAP returns an error.

GAMMAP(@A, @X) + GAMMAQ(@A, @X) = 1.

Examples

Select wct.GAMMAP(5, 2);

This produces the following result.

{"columns":[{"field":"column 1","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"}],"rows":[{"column 1":"0.0526530172876507"}]}

See Also

GAMMAQ - upper regularized gamma function

INVGAMMAP - Calculate the inverse of the incomplete gamma functionP(a,x).

GAMMADIST - gamma distribution

GAMMAINV - inverse gamma function

BETADIST - beta distribution

CHIDIST - chi-square distribution

GAMMA - complete gamma function

GAMMAINC - incomplete gamma function

GAMMALN - natural logarithm of the complete gamma function