POISSONINV
Updated 2024-03-13 13:21:11.440000
Syntax
SELECT [westclintech].[wct].[POISSONINV] (
<@P, float,>
,<@Mean, float,>)
Description
Use the scalar function POISSONINV to calculate the inverse of the cumulative distribution function of the Poisson distribution.
The formula for the cumulative distribution function is:
F(k; \lambda) =Q(\lfloor{k+1}\rfloor,\lambda)
Arguments
@P
the cumulative distribution function. @P is an expression of type float or of a type that implicitly converts to float.
@Mean
is the mean of the distribution. @Mean is an expression of type float or of a type that implicitly converts to float.
Return Type
float
Remarks
@P must be greater than zero and less than one (0 < @P < 1).
@Mean must be greater than or equal to zero (0 = @Mean).
Examples
Calculate the cumulative distribution function:
SELECT wct.POISSON(2, 5, 'True');
This produces the following result.
{"columns":[{"field":"column 1","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"}],"rows":[{"column 1":"0.124652019483081"}]}
Calculate the inverse:
SELECT wct.POISSONINV(0.124652019483081, 5);
This produces the following result.
{"columns":[{"field":"column 1","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"}],"rows":[{"column 1":"2"}]}