STANDARDIZE
Updated 2024-03-13 13:23:18.363000
Syntax
SELECT [westclintech].[wct].[STANDARDIZE] (
<@X, float,>
,<@Mean, float,>
,<@Standard_dev, float,>)
Description
Use the scalar function STANDARDIZE to calculate a normalized value from a distribution characterized by mean and standard deviation:
Z=\frac{X-\mu}{\sigma}
Arguments
@Mean
is the arithmetic mean of the distribution. @Mean is an expression of type float or of a type that can be implicitly converted to float.
@X
is the value to be normalized. @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 the distribution. @Standard_dev is an expression of type float or of a type that can be implicitly converted to float.
Return Type
float
Remarks
If @Standard_dev = 0, STANDARDIZE returns an error.
Examples
Select wct.STANDARDIZE(-4.6159, 10, 5);
This produces the following result.
{"columns":[{"field":"column 1","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"}],"rows":[{"column 1":"-2.92318"}]}