Tutorials › Statistical Theory I - Probability and Distribution Theory › Zero-Inflated Count Distributions

Mixtures, Compounding, and Truncation · Tutorial 652 of 994

Zero-Inflated Count Distributions

Learn how an extra structural-zero mechanism changes a baseline count distribution and how to calculate the resulting probabilities, moments, and generating function.

Advanced 9 min read

What You'll Learn

  • Define a zero-inflated count law using a structural-zero probability and a baseline count distribution
  • Distinguish structural zeros from zeros already present in the baseline law
  • Derive the zero probability, mean, and variance of the mixture
  • Obtain the probability-generating function from the baseline generating function
  • Calculate zero-inflated Poisson and binomial probabilities and moments
  • Recover the structural-zero probability when the baseline zero probability is known

Why Zero Inflation Is a Distinct Count Model

A count distribution may assign probability to zero because zero is an ordinary outcome of the count-generating process. In some settings, however, a second mechanism can also produce zeros: for example, some units may be unable to experience the event during the observation period, while the remaining units follow a count model that itself permits zero. A zero-inflated distribution represents these two routes to zero in one probability law.

The key distinction is between a structural zero, supplied by a separate point-mass component, and a baseline zero, produced by the ordinary count distribution. Both are observed simply as zero; the mixture specifies their probabilities without asserting that the source of any particular observed zero is known.

Definition and Basic Probability Formula

Definition: Let \(Y\) have a baseline count distribution on \(\{0,1,2,\ldots\}\), with probability mass function \(f(k)=P(Y=k)\). Let \(C\) be independent of \(Y\), with \(P(C=1)=\pi\) and \(P(C=0)=1-\pi\), where \(0\leq \pi\leq 1\). The zero-inflated count variable is \(X=(1-C)Y\). When \(C=1\), the structural-zero component is selected and \(X=0\); when \(C=0\), \(X\) follows the baseline law. The parameter \(\pi\) is the structural-zero probability.

For \(k\geq 1\), the baseline outcome \(Y=k\) must be selected, so its probability is multiplied by \(1-\pi\). At zero there are two ways to obtain the observed value: select the structural-zero component, or select the baseline component and have \(Y=0\). Therefore,

$$ P(X=0)=\pi+(1-\pi)f(0),\qquad P(X=k)=(1-\pi)f(k),\quad k\geq 1. $$

These probabilities sum to one: the zero probability plus the positive-count probabilities is \(\pi+(1-\pi)f(0)+(1-\pi)\sum_{k\geq1}f(k)=\pi+(1-\pi)=1\). Thus the zero probability is at least the baseline zero probability \(f(0)\), since their difference is \(\pi[1-f(0)]\geq0\). The increase is strict when \(\pi>0\) and the baseline has positive probability of a nonzero count.

Worked Example: A Zero-Inflated Poisson Distribution

Let the baseline count be Poisson with parameter \(\lambda=2\), and let the structural-zero probability be \(\pi=0.3\). The baseline mass function is \(f(k)=e^{-2}2^k/k!\).

At zero, the structural and baseline contributions are \(P(X=0)=0.3+0.7e^{-2}\). Since \(e^{-2}\approx0.135335\), this is \(0.3+0.7(0.135335)=0.394735\), approximately.

For a positive count, \(P(X=k)=0.7e^{-2}2^k/k!\). For example, \(P(X=1)=0.7e^{-2}(2)=0.189469\), and \(P(X=2)=0.7e^{-2}(2)=0.189469\).

The baseline mean and variance are both \(2\). The zero-inflated mean is \((1-0.3)2=1.4\), and the variance, using the formula derived below, is \(0.7(2)+0.3(0.7)(2^2)=1.4+0.84=2.24\). The mean is lower than the baseline mean, while the variance is larger than this zero-inflated mean.

Mean and Variance

Write \(\mu=E[Y]\) and \(\sigma^2=\operatorname{Var}(Y)\), assuming these moments are finite. The structural-zero mechanism scales the mean by the probability of selecting the baseline component. For the variance, both the baseline variability and the variation in whether the baseline component is selected contribute.

Theorem: If \(E[Y^2]<\infty\), then the zero-inflated variable \(X=(1-C)Y\), with \(C\) independent of \(Y\) and \(P(C=1)=\pi\), satisfies \[ E[X]=(1-\pi)\mu,\qquad \operatorname{Var}(X)=(1-\pi)\sigma^2+\pi(1-\pi)\mu^2. \]

Proof. Since \(C\) and \(Y\) are independent and \(1-C\) is either zero or one,

$$ E[X]=E[(1-C)Y]=E[1-C]E[Y]=(1-\pi)\mu. $$

Also, \(X^2=(1-C)Y^2\), so \(E[X^2]=(1-\pi)E[Y^2]=(1-\pi)(\sigma^2+\mu^2)\). Subtract the square of the mean:

$$ \begin{aligned} \operatorname{Var}(X) &=(1-\pi)(\sigma^2+\mu^2)-(1-\pi)^2\mu^2\\ &=(1-\pi)\sigma^2+\bigl[(1-\pi)-(1-\pi)^2\bigr]\mu^2\\ &=(1-\pi)\sigma^2+\pi(1-\pi)\mu^2. \end{aligned} $$

The second term is nonnegative and reflects variation from switching between the structural-zero and baseline components. The assumptions matter: independence gives the factorization of expectations, and the finite second moment ensures the variance calculation is defined. \(\square\)

Worked Example: Zero-Inflated Binomial Counts

Suppose the baseline count is \(Y\sim\operatorname{Binomial}(3,0.4)\), and \(\pi=0.25\). The baseline mean is \(\mu=3(0.4)=1.2\), and its variance is \(\sigma^2=3(0.4)(0.6)=0.72\).

The baseline probability of zero is \(f(0)=0.6^3=0.216\). Thus the zero-inflated zero probability is \(0.25+0.75(0.216)=0.412\). For example, \(P(X=1)=0.75\binom31(0.4)(0.6)^2=0.324\).

The mean is \(E[X]=0.75(1.2)=0.9\). The variance is

$$ \operatorname{Var}(X) =0.75(0.72)+0.25(0.75)(1.2)^2 =0.54+0.27 =0.81. $$

As a check, the second moment is \(E[X^2]=\operatorname{Var}(X)+E[X]^2=0.81+0.81=1.62\). Directly, it is \(0.75E[Y^2]=0.75(0.72+1.2^2)=0.75(2.16)=1.62\), in agreement.

Probability-Generating Function

For a nonnegative integer-valued random variable \(Y\), its probability-generating function is \(G_Y(s)=E[s^Y]=\sum_{k=0}^{\infty}f(k)s^k\), for \(|s|\leq1\). The convention \(s^0=1\) includes the zero outcome. The zero-inflated law has a simple generating function because its distribution is a mixture of a point mass at zero and the baseline law.

Theorem: For \(|s|\leq1\), the probability-generating function of \(X\) is \[ G_X(s)=\pi+(1-\pi)G_Y(s). \]

Proof. Condition on \(C\). If \(C=1\), then \(X=0\) and \(s^X=1\). If \(C=0\), then \(X=Y\). Consequently,

$$ G_X(s)=E[s^X] =P(C=1)\cdot 1+P(C=0)E[s^Y] =\pi+(1-\pi)G_Y(s). $$

Equivalently, the coefficient of \(s^0\) is \(\pi+(1-\pi)f(0)\), while each coefficient of \(s^k\), \(k\geq1\), is \((1-\pi)f(k)\), matching the probability formula. The expectation is well-defined for \(|s|\leq1\), since \(|s^X|\leq1\). \(\square\)

Worked Example: Recovering the Structural-Zero Probability

Suppose the baseline distribution is Poisson with known mean \(\lambda=1\), and the observed zero probability under the zero-inflated model is \(r=0.6\). Find the structural-zero probability \(\pi\).

A Poisson variable with mean one has baseline zero probability \(f(0)=e^{-1}\). The zero-probability equation is \(r=\pi+(1-\pi)e^{-1}\). Rearranging, \(r-e^{-1}=\pi(1-e^{-1})\), so

$$ \pi=\frac{r-e^{-1}}{1-e^{-1}} =\frac{0.6-0.367879}{1-0.367879} \approx\frac{0.232121}{0.632121} \approx0.3672. $$

This is a valid mixture probability because \(e^{-1}\approx0.3679\leq0.6\leq1\), which makes the numerator nonnegative and no larger than the denominator. The resulting mean is approximately \((1-0.3672)(1)=0.6328\). This calculation identifies \(\pi\) only because the baseline parameter was treated as known; the zero proportion alone need not separate an unknown baseline law from an unknown structural-zero probability.

Poisson Specialization and Interpretation

For a zero-inflated Poisson distribution with baseline mean \(\lambda>0\), the probability mass function is

$$ P(X=0)=\pi+(1-\pi)e^{-\lambda},\qquad P(X=k)=(1-\pi)e^{-\lambda}\frac{\lambda^k}{k!},\quad k\geq1. $$

Its mean, variance, and generating function follow by substituting the Poisson quantities into the general formulas:

$$ E[X]=(1-\pi)\lambda,\qquad \operatorname{Var}(X)=(1-\pi)\lambda+\pi(1-\pi)\lambda^2,\qquad G_X(s)=\pi+(1-\pi)e^{\lambda(s-1)}. $$

These expressions show why a zero-inflated Poisson model is not simply an ordinary Poisson model with a smaller mean. The positive-count probabilities are all rescaled from the baseline probabilities, while the zero probability receives an extra point-mass contribution. The resulting variance includes an additional term beyond the scaled baseline variance.

At the boundaries, \(\pi=0\) gives exactly the baseline distribution, and \(\pi=1\) gives a point mass at zero. If the baseline itself is concentrated at zero, then the observed law is also concentrated at zero for every \(\pi\); in that case the two mixture components cannot be distinguished from the distribution of \(X\).

Common Mistake: Counting the Baseline Zero Only Once

A frequent error is to write \(P(X=0)=\pi\), treating every observed zero as structural. That omits the baseline component's own zero probability. The correct expression is \(\pi+(1-\pi)f(0)\): the baseline zero probability is weighted by the chance \(1-\pi\) that the baseline component was selected.

A related mistake is to use \((1-\pi)\sigma^2\) as the whole variance. That is only the first term. The component-selection indicator varies from observation to observation, adding \(\pi(1-\pi)\mu^2\). For example, if the baseline is the constant \(Y=2\), then \(\sigma^2=0\), but the zero-inflated variable still varies between zero and two. Its variance is \(\pi(1-\pi)2^2\), which is positive whenever \(0<\pi<1\).

Key takeaway: A zero-inflated count law retains the baseline probabilities for positive counts up to a factor of \(1-\pi\), while the zero probability combines structural and baseline zeros. Its mean is \((1-\pi)\mu\), its variance is \((1-\pi)\sigma^2+\pi(1-\pi)\mu^2\), and its probability-generating function is \(\pi+(1-\pi)G_Y(s)\).

Check Your Understanding

Use the mixture definition and formulas to answer the following.

  1. A baseline count law has \(f(0)=0.2\), mean \(3\), variance \(5\), and structural-zero probability \(\pi=0.4\). Find the zero-inflated zero probability, mean, and variance.
  2. Explain why the zero-inflated zero probability is not generally equal to the structural-zero probability.
  3. If \(G_Y(s)\) is the baseline probability-generating function, write \(G_X(s)\) and identify its constant term.
  4. For what values of \(\pi\) does the zero-inflated law equal the baseline law, and when is it a point mass at zero?
  5. Why can the variance be positive when the baseline distribution has variance zero?