Logo

EXPINV

Updated 2024-03-07 21:32:05.467000

Syntax

SELECT [westclintech].[wct].[EXPINV] (
  <@CDF, float,>
 ,<@Lambda, float,>)

Description

Use the scalar function EXPINV to calculate the inverse of the cumulative distribution function of the exponential distribution.

The equation for the cumulative distribution function is:

F(x;\lambda) = \begin{cases} 1-e^{-\lambda x} & x \ge 0, \\ 0 & x < 0. \end{cases}

Arguments

@Lambda

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

@CDF

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

Return Type

float

Remarks

@P must be greater than or equal to zero and less than on (0 <= @P < 1).

@Lambda must be greater than zero (0 < @Lambda).

Examples

Calculate the cumulative distribution function:

SELECT wct.EXPONDIST(0.75, 9.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.999195266989875"}]}

Calculate the inverse:

SELECT wct.EXPINV(0.999195266989875, 9.5);

This produces the following result.

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