NORMSDIST
Returns the standard normal cumulative distribution (has a mean of zero and a standard deviation of one).
Syntax
expression.NORMSDIST(arg1);
expression
- A variable that represents a ApiWorksheetFunction class.
Parameters
Name | Required/Optional | Data type | Default | Description |
---|---|---|---|---|
arg1 | Required | ApiRange | ApiName | number | The value for which the distribution will be returned. |
Returns
number
Example
- Code
- Result
const worksheet = Api.GetActiveSheet();
let valueArr = [0.34, 7, 3];
// Place the numbers in cells
for (let i = 0; i < valueArr.length; i++) {
worksheet.GetRange("A" + (i + 1)).SetValue(valueArr[i]);
}
//method params
let probability = worksheet.GetRange("A1").GetValue();
let mean = worksheet.GetRange("A2").GetValue();
let standardDeviation = worksheet.GetRange("A3").GetValue();
let func = Api.GetWorksheetFunction();
let inv = func.NORM_INV(probability, mean, standardDeviation);
worksheet.GetRange("C1").SetValue(inv);