nag_prob_poisson_vector (g01skc) returns a number of the lower tail, upper tail and point probabilities for the Poisson distribution.
Let
denote a vector of random variables each having a Poisson distribution with parameter
. Then
The mean and variance of each distribution are both equal to
.
nag_prob_poisson_vector (g01skc) computes, for given
and
the probabilities:
,
and
using the algorithm described in
Knüsel (1986).
The input arrays to this function are designed to allow maximum flexibility in the supply of vector arguments by re-using elements of any arrays that are shorter than the total number of evaluations required. See
Section 2.6 in the g01 Chapter Introduction for further information.
- 1:
– IntegerInput
-
On entry: the length of the array
l.
Constraint:
.
- 2:
– const doubleInput
-
On entry: , the parameter of the Poisson distribution with , , for .
Constraint:
, for .
- 3:
– IntegerInput
-
On entry: the length of the array
k.
Constraint:
.
- 4:
– const IntegerInput
-
On entry: , the integer which defines the required probabilities with , .
Constraint:
, for .
- 5:
– doubleOutput
-
Note: the dimension,
dim, of the array
plek
must be at least
.
On exit: , the lower tail probabilities.
- 6:
– doubleOutput
-
Note: the dimension,
dim, of the array
pgtk
must be at least
.
On exit: , the upper tail probabilities.
- 7:
– doubleOutput
-
Note: the dimension,
dim, of the array
peqk
must be at least
.
On exit: , the point probabilities.
- 8:
– IntegerOutput
-
Note: the dimension,
dim, of the array
ivalid
must be at least
.
On exit:
indicates any errors with the input arguments, with
- No error.
- 9:
– NagError *Input/Output
-
The NAG error argument (see
Section 2.7 in How to Use the NAG Library and its Documentation).
nag_prob_poisson_vector (g01skc) is not threaded in any implementation.
The time taken by nag_prob_poisson_vector (g01skc) to calculate each probability depends on and . For given , the time is greatest when , and is then approximately proportional to .