Next: cumstu()
Up: MacAnova Help File
Previous: cumnor()
Contents
Usage:
cumpoi(x,mu [,upper:T or lower:F]), x and mu REAL, elements of mu > 0
|
Keywords:
probabilities
cumpoi(Val,mu) computes the probability that a Poisson random variable
with mean mu is <= the elements of the vector, matrix or array Val.
When Val is not integral, the result is the same as cumpoi(floor(Val),
mu).
When Val and mu are both not scalars, they must be the same size and
shape which will also be the size and shape of the result.
All elements of mu must be non-negative
cumpoi(Val,mu,upper:T) and cumpoi(Val,mu,lower:F) compute the
probability that the Poisson random variable is >= elements of Val.
This is mathematically the same as 1-cumpoi(ceiling(Val-1),mu), not
1-cumpoi(Val,mu).
Note that when Val is an integer, P(x = Val) is included in both
cumpoi(Val,mu) and cumpoi(Val,mu,upper:T).
If x_obs is an observed value of a Poisson random variable with mean mu,
you can use cumpoi() to compute P-values for a test of H_0: mu = mu_0 as
follows:
H_a P-value
mu > mu_0 cumpoi(x_obs,mu_0,upper:T)
mu < mu_0 cumpoi(x_obs,mu_0)
mu != mu_0 2*min(cumpoi(x_obs,mu_0),cumpoi(x_obs,mu_0,upper:T))
Example:
Cmd> 1 - cumpoi(13,9.5) # P(x > 13) = 1 - P(x <= 13), mu = 9.5
(1) 0.10186
Cmd> cumpoi(14,9.5, upper:T) # same
(1) 0.10186
See also cumbin(). See invgamma:"poisson_confidence_interval" for
information on computing a confidence interval for a Poisson mean.
Gary Oehlert
2003-01-15