Logo

NORMAL

Updated 2024-03-13 12:38:40.687000

Syntax

SELECT [westclintech].[wct].[NORMAL] (
   <@X, float,>)

Description

Use the scalar function NORMAL to calculate the probability density function for the standard normal distribution.

The probability density function of the standard normal distribution is:

\varphi(x) = \frac{e^{-z^2/2}}{\sqrt{2\pi}}

Arguments

@X

is any real number. @X is an expression of type float or of a type that implicitly converts to float.

Return Type

float

Examples

SELECT wct.NORMAL(1);

This produces the following result.

{"columns":[{"field":"column 1","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"}],"rows":[{"column 1":"0.241970724519143"}]}
SELECT wct.NORMAL(-1);

This produces the following result.

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

You can use the SeriesFloat function from the XLeratorDB/math library to generate a dataset which can be pasted into EXCEL to generate a graph of the function.

SELECT SeriesValue,

       wct.NORMAL(SeriesValue) as [f(x)]

FROM wct.SeriesFloat(-5, 5, .1, NULL, NULL);

This is an EXCEL-generated graph of the results:

http://westclintech.com/Portals/0/images/doc_stats_NORMAL_img1.jpg

See Also

NORMSINV - Inverse of the standard normal distribution

NORMDIST - Normal distribution

NORMINV - Inverse of the normal distribution

NORMSDIST - 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