# Is there an equation for the median and percentile of a zero-inflated Poisson?

This question gives answer to the mean and variance of the zero inflated Poisson distribution, but is there an equation for the median or the percentile?

Somewhat surprisingly, it seems like we don't have anything on quantiles for zero-inflated distributions, so I'll answer the more general question.

Assume you have a zero-inflated discrete distribution, i.e., your observation is zero with probability $$\pi$$ and comes from some other specified "vanilla" discrete distribution with probability $$1-\pi$$, so the probability mass function is

$$f_\pi(y) = \begin{cases} \pi+(1-\pi)f_0(0), & \text{if }y=0 \\ (1-\pi)f_0(y), & \text{if }y=1,2.... \end{cases}$$

where $$f_0$$ denotes the PMF of the discrete "vanilla" distribution.

Consider a percentage $$0\leq p<1$$. Then the $$p$$-th quantile of the zero-inflated distribution is

$$q_\pi(p) = \begin{cases} 0, & \text{if } p\leq \pi+(1-\pi)f_0(0) \\ q_0\big(\frac{p-\pi}{1-\pi}\big), & \text{if } p> \pi+(1-\pi)f_0(0), \end{cases}$$ where $$q_0(p)$$ denotes the $$p$$-th quantile of the "vanilla" distribution.

In your specific case, the "vanilla" distribution is a Poisson distribution with parameter $$\lambda$$. There does not seem to be a closed form for the quantile of a "vanilla" Poisson distribution (R's ?qpois uses a search), so I would not expect there to be one for the more complicated zero-inflated case, either.

To see this, note first that if your target percentage $$p$$ fulfills $$p\leq \pi+(1-\pi)f_0(0)$$, then your percentile $$q_\pi(p)$$ is obviously zero.

So let us assume that $$p>\pi+(1-\pi)f_0(0)$$. We just follow the definition of a quantile:

\begin{align} q_\pi(p) = & \min\Big\{y\,|\,\sum_{x=0}^y f_\pi(y)\geq p\Big\} \\ = & \min\Big\{y\,|\,\pi+(1-\pi)f_0(0)+ (1-\pi)\sum_{x=1}^yf_0(x)\geq p\Big\} \\ = & \min\Big\{y\,|\,\pi+(1-\pi)\sum_{x=0}^yf_0(x)\geq p\Big\} \\ = & \min\Big\{y\,|\,\sum_{x=0}^yf_0(x)\geq \frac{p-\pi}{1-\pi}\Big\} \\ = & q_0\big(\frac{p-\pi}{1-\pi}\big), \end{align} as claimed.

• Ok this is really helpful, but could you walk through the calculation with a specific example? Commented Jun 22, 2021 at 15:28