KSQINV
Updated 2024-03-08 17:01:53.150000
Syntax
SELECT [westclintech].[wct].[KSQINV] (
<@Q, float,>)
Description
Use the scalar function KSQINV to calculate the inverse of the complementary Kolmogorov-Smirnov (KS) cumulative distribution function, Qks = 1 - Pks. The equation for the cumulative distribution function is:
\operatorname{P}_{ks}(z)=1-2\sum_{j=1}^\infty (-1)^{j-1} e^{-2j^2 z^2}
Arguments
@Q
is the value at which to evaluate the function. @Q is an expression of type float or of a type that can be implicitly converted to float.
Return Type
float
Remarks
@Q must greater than zero and less than or equal to one.
Qks(0) = 1.
Qks(∞) = 0.
Examples
SELECT wct.KSQINV(0.269999671677355) as KSQINV;
This produces the following result.
{"columns":[{"field":"KSQINV","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"}],"rows":[{"KSQINV":"1"}]}