Logo

LAPLACEINV

Updated 2024-03-08 20:49:49.807000

Syntax

SELECT [westclintech].[wct].[LAPLACEINV] (
  <@P, float,>
 ,<@A, float,>
 ,<@B, float,>)

Description

Use the scalar function LAPLACEINV to calculate the inverse lower cumulative distribution of the LaPlace distribution.

The inverse cumulative distribution function is given by

F^{-1}(p)=\mu-b\text{ sgn}(p-0.5)\ln(1-2|p-0.5|)

Arguments

@A

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

@P

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

@B

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

Return Type

float

Remarks

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

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

Examples

Calculate the inverse of the lower cumulative distribution function:

SELECT wct.LAPLACEINV(0.696734670143683, 0, 1);

This produces the following result.

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