POISSON
Returns the Poisson distribution.
Syntax
expression.POISSON(arg1, arg2, arg3);
expression - A variable that represents a ApiWorksheetFunction class.
Parameters
| Name | Required/Optional | Data type | Default | Description |
|---|---|---|---|---|
| arg1 | Required | ApiRange | ApiName | number | The number of events. | |
| arg2 | Required | ApiRange | ApiName | number | The expected numeric value, a positive number. | |
| arg3 | Required | ApiRange | ApiName | boolean | A logical value (true or false) that determines the function form. If it is true, the function returns the cumulative Poisson probability. If it is false, the function returns the Poisson probability mass function. |
Returns
number
Example
Calculate the probability using the Poisson distribution model in a spreadsheet.
// How do I use the Poisson distribution to find event probabilities in a spreadsheet?
// Get the likelihood of a certain number of events occurring in a fixed timeframe in a spreadsheet.
const worksheet = Api.GetActiveSheet();
//method params
let x = 9;
let mean = 12;
let cumulative = false;
let func = Api.WorksheetFunction;
let ans = func.POISSON(x, mean, cumulative);
worksheet.GetRange("C1").SetValue(ans);