STANDARDIZE

function STANDARDIZE(arg1: number = null, arg2: number = null, arg3: number = null): number

Description

Returns a normalised value from a distribution characterised by a mean and standard deviation.

Parameters

arg1numberdefault: null

The value to normalize.

arg2numberdefault: null

The arithmetic mean of the distribution.

arg3numberdefault: null

The standard deviation of the distribution, a positive number.

Returns

number

Try It


const oWorksheet = Api.GetActiveSheet();

var valueArr = [5, -2, 10];

// Place the numbers in cells
for (var i = 0; i < valueArr.length; i++) {
 oWorksheet.GetRange("A" + (i + 1)).SetValue(valueArr[i]);
}

// method params
var x = oWorksheet.GetRange("A1");
var mean = oWorksheet.GetRange("A2");
var stdDev = oWorksheet.GetRange("A3");

var oFunction = Api.GetWorksheetFunction();
var ans = oFunction.STANDARDIZE(x, mean, stdDev);

oWorksheet.GetRange("C1").SetValue(ans);

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).