LOGNORM_DIST
function LOGNORM_DIST(
arg1: number = null,
arg2: number = null,
arg3: number = null,
arg4: boolean = null,
): number
Description
Returns the lognormal distribution of x, where ln(x) is normally distributed with the specified parameters.
Parameters
- arg1
number
null The value at which to evaluate the function, a positive number.
- arg2
number
null The mean of ln(x).
- arg3
number
null The standard deviation of ln(x), a positive number.
- arg4
boolean
null A logical value (true or false) that determines the function form. If it is true, the function returns the cumulative distribution function. If it is false, the function returns the probability density function.
Returns
number
Try It
const oWorksheet = Api.GetActiveSheet();
//configure function parameters
var numbersArr = [4, 3.5, 1.2];
//set values in cells
for (var i = 0; i < numbersArr.length; i++) {
oWorksheet.GetRange("A" + (i + 1)).SetValue(numbersArr[i]);
}
//get parameters
var xValue = oWorksheet.GetRange("A1");
var mean = oWorksheet.GetRange("A2");
var standardDeviation = oWorksheet.GetRange("A3");
var cummulative = true;
//invoke LOGNORM.DIST method
var oFunction = Api.GetWorksheetFunction();
var ans = oFunction.LOGNORM_DIST(xValue, mean, standardDeviation, cummulative);
//print answer
oWorksheet.GetRange("C1").SetValue(ans);