If x
contains any missing (NA
), undefined (NaN
) or
infinite (Inf
, -Inf
) values, they will be removed prior to
performing the estimation.
Let \(\underline{x} = (x_1, x_2, \ldots, x_n)\) be a vector of
\(n\) observations from a Poisson distribution with
parameter lambda=
\(\lambda\). It can be shown (e.g., Forbes et al., 2009)
that if \(y\) is defined as:
$$y = \sum_{i=1}^n x_i \;\;\;\; (1)$$
then \(y\) is an observation from a Poisson distribution with parameter
lambda=
\(n \lambda\).
Estimation
The maximum likelihood, method of moments, and minimum variance unbiased estimator
(mle/mme/mvue) of \(\lambda\) is given by:
$$\hat{\lambda} = \bar{x} \;\;\;\; (2)$$
where
$$\bar{x} = \frac{1}{n} \sum_{i=1}^n x_i = \frac{y}{n} \;\;\;\; (3)$$
Confidence Intervals
There are three possible ways to construct a confidence interval for
\(\lambda\): based on the exact distribution of the estimator of
\(\lambda\) (ci.type="exact"
), based on an approximation of
Pearson and Hartley (ci.type="pearson.hartley.approx"
), or based on the
normal approximation
(ci.type="normal.approx"
).
Exact Confidence Interval (ci.method="exact"
)
If ci.type="two-sided"
, an exact \((1-\alpha)100\%\) confidence interval
for \(\lambda\) can be constructed as \([LCL, UCL]\), where the confidence
limits are computed such that:
$$Pr[Y \ge y \| \lambda = LCL] = \frac{\alpha}{2} \;\;\;\; (4)$$
$$Pr[Y \le y \| \lambda = UCL] = \frac{\alpha}{2} \;\;\;\; (5)$$
where \(y\) is defined in equation (1) and \(Y\) denotes a Poisson random
variable with parameter lambda=
\(n \lambda\).
If ci.type="lower"
, \(\alpha/2\) is replaced with \(\alpha\) in
equation (4) and \(UCL\) is set to \(\infty\).
If ci.type="upper"
, \(\alpha/2\) is replaced with \(\alpha\) in
equation (5) and \(LCL\) is set to 0.
Note that an exact upper confidence bound can be computed even when all
observations are 0.
Pearson-Hartley Approximation (ci.method="pearson.hartley.approx"
)
For a two-sided \((1-\alpha)100\%\) confidence interval for \(\lambda\), the
Pearson and Hartley approximation (Zar, 2010, p.587; Pearson and Hartley, 1970, p.81)
is given by:
$$[\frac{\chi^2_{2n\bar{x}, \alpha/2}}{2n}, \frac{\chi^2_{2n\bar{x} + 2, 1 - \alpha/2}}{2n}] \;\;\;\; (6)$$
where \(\chi^2_{\nu, p}\) denotes the \(p\)'th quantile of the
chi-square distribution with \(\nu\) degrees of freedom.
One-sided confidence intervals are computed in a similar fashion.
Normal Approximation (ci.method="normal.approx"
)
An approximate \((1-\alpha)100\%\) confidence interval for \(\lambda\) can be
constructed assuming the distribution of the estimator of \(\lambda\) is
approximately normally distributed. A two-sided confidence interval is constructed
as:
$$[\hat{\lambda} - z_{1-\alpha/2} \hat{\sigma}_{\hat{\lambda}}, \hat{\lambda} + z_{1-\alpha/2} \hat{\sigma}_{\hat{\lambda}}] \;\;\;\; (7)$$
where \(z_p\) is the \(p\)'th quantile of the standard normal distribution, and
the quantity
$$\hat{\sigma}_{\hat{\lambda}} = \sqrt{\hat{\lambda} / n} \;\;\;\; (8)$$
denotes the estimated asymptotic standard deviation of the estimator of
\(\lambda\).
One-sided confidence intervals are constructed in a similar manner.