Logo

NCTINV

Updated 2024-03-12 20:32:17.027000

Syntax

SELECT [westclintech].[wct].[NCTINV] (
  <@P, float,>
 ,<@DF, float,>
 ,<@Lambda, float,>)

Description

Use the scalar function NCTINV to calculate the inverse of the lower cumulative distribution function of the non-central T distribution.

The formula for the lower cumulative distribution function is:

F_{\nu,\mu}(x)=\begin{cases} \tilde{F}_{\nu,\mu}(x), & \mbox{if } x\ge 0; \\ 1-\tilde{F}_{\nu, -\mu}(x), &\mbox{if } x < 0,  \end{cases}

See NCTCDF for more information.

Arguments

@Lambda

is the non-centrality parameter. @Lambda is an expression of type float or of a type that implicitly converts to float.

@CDF

is cumulative distribution function. @CDF is an expression of type float or of a type that implicitly converts to float.

@DF

degrees of freedom. @DF is an expression of type float or of a type that implicitly converts to float.

Return Type

float

Remarks

@CDF must be greater than zero and less than one (0 < @CDF < 1).

@DF must be greater than zero (@DF > 0).

@Lambda must be greater than or equal to zero (@Lambda > 0).

Examples

Calculate the lower cumulative distribution function:

SELECT wct.NCTCDF(1, 3, 3);

This produces the following result.

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

Calculate the inverse:

SELECT wct.NCTINV(0.0270004801456948, 3, 3);

This produces the following result.

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