STDEVPA

function STDEVPA(args: number | string | boolean | number[] | ApiRange = null): number | string | boolean

Description

Calculates standard deviation based on an entire population, including logical values and text. Text and the false logical value have the value 0; the true logical value has the value 1.

Parameters

argsnumber | string | boolean | number[] | ApiRangedefault: null

Up to 255 values for which the standard deviation will be calculated. The first argument is required, subsequent arguments are optional.

Returns

number | string | boolean

Try It


const oWorksheet = Api.GetActiveSheet();

var valueArr = [1, 0, 0, false, 5, 1, 0, 0, 2, true, 6, 7, 6, 8, 10, 12];

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

var oFunction = Api.GetWorksheetFunction();
var ans = oFunction.STDEVPA(1, 0, 0, false, 5, 1, 0, 0, 2, true, 6, 7, 6, 8, 10, 12); //includes logical values

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).