LOGNORMDIST
Updated 2023-11-03 21:08:37.070000
Syntax
SELECT [westclintech].[wct].[LOGNORMDIST] (
<@X, float,>
,<@Mean, float,>
,<@Standard_dev, float,>)
Description
Use the scalar function LOGNORMDIST to calculate the lognormal cumulative distribution function of x where ln(x) is normally distributed within the parameters mean and standard deviation.
Arguments
@Mean
is the mean of ln(x). @Mean is an expression of type float or of a type that can be implicitly converted to float.
@X
is the value at which to evaluate the function. @X is an expression of type float or of a type that can be implicitly converted to float.
@Standard_dev
is the standard deviation of ln(x). @Standard_dev is an expression of type float or of a type that can be implicitly converted to float.
Return Type
float
Remarks
If @X = 0, LOGNORMDIST returns an error.
If @Standard_dev = 0, LOGNORMDIST returns an error.
LOGNORMDIST = NORMSDIST((Log(@X) - @Mean) / @Standard_dev)
Examples
select wct.LOGNORMDIST(8, 5, 1.5);
This produces the following result.
{"columns":[{"field":"column 1","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"}],"rows":[{"column 1":"0.025765031270143"}]}
select wct.NORMSDIST((log(8) - 5) / 1.5);
This produces the following result.
{"columns":[{"field":"column 1","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"}],"rows":[{"column 1":"0.025765031270143"}]}