Logo

NORMSINV

Updated 2024-03-13 13:00:35.373000

Syntax

SELECT [westclintech].[wct].[NORMSINV] (
   <@P, float,>)

Description

Use the scalar function NORMSINV to calculate the inverse of the standard normal cumulative distribution function. The equation for the cumulative distribution function is:

\Phi(x) = \frac 1 {\sqrt{2\pi}} \int_{-\infty}^x e^{-t^2/2} \, dt

Arguments

@P

is a probability corresponding to standard normal distribution. @P is an expression of type float or of a type that can be implicitly converted to float.

Return Type

float

Remarks

If @P < 0 or @P > 1, NORMSINV returns an error.

NORMSINV uses root-finding algorithms and iteration to solve for NORMSDIST(NORMINV(@Probability)) - @Probability = 0 to eight decimal places.

Examples

select wct.NORMSINV(0.841344746068543);

This produces the following result.

{"columns":[{"field":"column 1","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"}],"rows":[{"column 1":"1"}]}
select round(wct.NORMSDIST(wct.NORMSINV(0.841344746068543)) - 0.841344746068543, 

          9);

This produces the following result.

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

See Also

NORMSDIST - standard normal distribution

NORMDIST - Normal distribution

NORMINV - Inverse of the normal distribution

NORMAL - probability density function of the standard normal distribution

STANDARDIZE - normalized value from a distribution for a specified mean and standard deviation

ZTEST - one-tailed probability-value of a z-test (SQL Server 2008 and 2012 version)

ZTEST - one-tailed probability-value of a z-test (SQL Server 2008 and 2012 version)

BIVAR - bi-variate normal distribution

BLACKSCHOLESMERTON - price, delta, gamma, theta, vega, rho or lambda of a European option using the Black-Scholes-Merton option pricing formula