Logo

NORM_S_DIST

Updated 2023-11-03 21:57:21.813000

Syntax

SELECT [westclintech].[wct].[NORM_S_DIST](
  <@X, float,>
 ,<@Cumulative, bit,>)

Description

Use the scalar function NORM_S_DIST to calculate the probability density or the lower cumulative probability of the standard normal distribution (mean = 0, standard deviation = 1).

Arguments

@X

The value of interest to be evaluated. @X must be of a type float or of type that intrinsically converts to float.

@Cumulative

A bit value indicating whether the probability density function ( 'False') or the cumulative distribution function ( 'True') should be returned.

Return Type

float

Examples

In this example we calculate the probability density function of the standard normal distribution at 1.96.

SELECT wct.NORM_S_DIST(   1.96,   --@X

                          'False' --@cumulative

                      ) as pdf;

This produces the following result.

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

Using the same data. we calculate the cumulative distribution function.

SELECT wct.NORM_S_DIST(   1.96,  --@X

                          'True' --@cumulative

                      ) as cdf;

This produces the following result.

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

See Also

NORMSINV - Inverse of the standard normal distribution

NORMDIST - Normal distribution

NORMINV - Inverse of the normal distribution