Why Compare More Than the Mean?
A count model can reproduce the average number of transcripts per cell and still describe the data poorly. In single-cell RNA sequencing, cells with no observed counts for a gene are common, and counts may vary more from cell to cell than a simple Poisson model predicts. Comparing the mean alone will not reveal these differences. A useful first comparison asks whether each fitted model can account for the observed mean, variance, and fraction of zeros.
The comparison here uses one gene measured across cells with comparable exposure, represented by a small hypothetical dataset. The calculations use moment matching because it makes the models’ predictions transparent. Moment matching is not the same as maximum-likelihood fitting; a real analysis may estimate parameters by maximizing the full likelihood, especially when covariates or cell-specific exposures are included.
Model Assumptions and Predictions
For a Poisson model, counts are assumed to be independent observations from the same distribution, with a common rate \(\lambda\) for the cells being compared. This implies equidispersion: the model variance equals its mean. Given \(\lambda\), its zero probability is \(e^{-\lambda}\).
The NB model relaxes equidispersion by allowing variance greater than the mean. We use the parameterization \(\operatorname{Var}(X)=\mu+\alpha\mu^2\). One corresponding probability mass function is
Under this parameterization, the probability of zero is \((1+\alpha\mu)^{-1/\alpha}\). As \(\alpha\) approaches zero, the NB distribution approaches the Poisson distribution with mean \(\mu\). An NB fit can therefore represent overdispersion without positing a separate structural-zero state.
In a ZIP model, let \(S=1\) indicate the structural-zero state, with \(P(S=1)=\pi\). If \(S=1\), the count is zero; otherwise \(X\) follows a Poisson distribution with mean \(\lambda\). Its zero probability is \(\pi+(1-\pi)e^{-\lambda}\). Its mean and variance are
The ZIP mean is not generally \(\lambda\): \(\lambda\) is the mean within the Poisson component, while the overall mean includes the structural-zero component. Keeping those means distinct is essential when comparing models.
A Hypothetical Dataset
Worked Example: Summarizing Counts Across Cells
Suppose a hypothetical gene has the following observed counts in 20 comparable cells. The table gives the number of cells at each listed count; counts of five are absent.
| Count \(x\) | Number of cells |
|---|---|
| 0 | 8 |
| 1 | 4 |
| 2 | 4 |
| 3 | 2 |
| 4 | 1 |
| 6 | 1 |
The total count is \(4(1)+4(2)+2(3)+1(4)+1(6)=28\), so the observed mean is \(\bar{x}=28/20=1.4\) counts per cell. The sum of squared counts is \(4(1^2)+4(2^2)+2(3^2)+1(4^2)+1(6^2)=90\). For method-of-moments fitting, use the empirical variance with divisor \(n\):
The conventional sample variance, which uses divisor \(n-1\), is \(50.8/19\approx2.674\ \text{counts}^2\). We use \(v_n\), rather than that sample variance, in the moment calculations below. There are 8 observed zeros, so the observed zero fraction is \(8/20=0.400\), or 40.0%.
Fit the Models by Moment Matching
For this illustration, the Poisson rate is estimated by the sample mean. The NB parameters are chosen to match the empirical mean and variance. For ZIP, match those same two moments. These choices make the comparison direct, but they do not guarantee that any model matches the full distribution or maximizes the likelihood.
Worked Example: Calculating the Three Fits
For the Poisson fit, set \(\hat{\lambda}=\bar{x}=1.4\) counts per cell. Its predicted variance is \(1.4\ \text{counts}^2\), and its predicted zero probability is
Thus it predicts \(20(0.2466)\approx4.932\) zero-count cells, compared with 8 observed.
For the NB fit, match the mean \(\hat{\mu}=1.4\) and set \(\hat{\alpha}\) so that \(\hat{\mu}+\hat{\alpha}\hat{\mu}^2=v_n\):
The fitted NB variance is \(1.4+0.5816(1.4^2)\approx2.54\ \text{counts}^2\). Its predicted zero probability and expected number of zero-count cells are
For the ZIP fit, write its overall mean as \(\mu=(1-\pi)\lambda\). Its variance can then be written as \(\mu+\{\pi/(1-\pi)\}\mu^2\). Matching the observed mean and variance gives
The Poisson-component mean is \(\hat{\lambda}=\bar{x}/(1-\hat{\pi})=1.4/(1-0.3677)\approx2.214\) counts per cell. The ZIP variance matches \(v_n=2.54\ \text{counts}^2\) by construction. Its predicted zero probability is
or \(20(0.4368)\approx8.736\) zero-count cells. The fitted parameters are rounded for display; the calculations use the unrounded moment estimates. For example, using the displayed rounded values, the ZIP variance is \(1.4+\{0.3677/(1-0.3677)\}(1.96)\approx2.540\ \text{counts}^2\).
What the Moment Comparison Shows
The ZIP and NB fits both match the observed mean and variance because those quantities were used to fit them. They differ in predicted zero frequency: the NB model predicts about 7.18 zeros, while ZIP predicts about 8.74. The Poisson fit predicts only about 4.93 and also has a variance below the empirical \(v_n\). In this dataset, the observed 8 zeros lie between the NB and ZIP predictions, whereas the Poisson prediction is substantially lower.
| Fit | Fitted mean (counts per cell) | Predicted variance (counts squared) | Predicted zero fraction | Expected zeros among 20 cells |
|---|---|---|---|---|
| Poisson | 1.400 | 1.400 | 0.2466 | 4.932 |
| NB, by moments | 1.400 | 2.540 | 0.3591 | 7.182 |
| ZIP, by moments | 1.400 | 2.540 | 0.4368 | 8.736 |
Interpreting the Fits and Checking Their Limits
A comparison of these three summaries is a diagnostic starting point, not a verdict about the mechanism generating the counts. A fitted ZIP model’s structural-zero component is a modeling assumption. Its higher predicted zero fraction does not show that the zero-count cells were truly in a distinct gene-off state. Likewise, an NB fit can accommodate extra variance and produce more zeros than a Poisson fit without a separate structural-zero component. The model summaries alone cannot identify why a count is zero.
The moment fits also leave much of the distribution unexamined. Two models can have the same fitted mean and variance yet differ in the probabilities of counts 1, 2, or larger counts. A useful first diagnostic is to compare observed frequencies across count values with each model’s predicted frequencies, not just its predicted zeros. Large discrepancies in several categories, or a fitted parameter at an inadmissible boundary, can signal that the assumed model is inadequate. Here, for instance, the observed frequency at count 6 is one cell; a comparison focused only on the mean, variance, and zeros could miss whether the models describe that upper tail well.
Moment matching has additional limitations. The NB estimate above requires \(v_n\geq\bar{x}\) to give a nonnegative dispersion estimate. If \(v_n<\bar{x}\), these moments do not produce a valid overdispersed NB fit with \(\alpha\geq0\); the result is not evidence that a negative dispersion should be used. The ZIP moment solution likewise requires a nonnegative inflation probability, which in this setup entails \(v_n\geq\bar{x}\). Small datasets can make both the empirical variance and zero fraction unstable.
In practice, parameters are often estimated by maximizing a likelihood rather than by matching moments. Likelihood fitting uses the full count distribution, but does not remove the need to check assumptions or compare observed and predicted patterns. The models also differ in structure: Poisson is a limiting special case of NB, while ZIP and NB are generally not nested in one another. A simple likelihood comparison between non-nested models does not by itself establish which biological mechanism is correct. Any comparison should account for the number of fitted parameters and the suitability of the model assumptions.
Common Pitfall
Correction: A Poisson fit with a common rate may predict too few zeros because counts are overdispersed or because cells differ in their effective exposure. An NB model can predict additional zeros through its broader count distribution. ZIP is one candidate model, not a conclusion forced by excess zeros. Compare the fitted models’ predicted means, variances, zero frequencies, and broader count patterns; do not equate a statistical fit with proof of a latent biological state.
A Practical Comparison Sequence
For the cells being compared, calculate the mean, an explicitly defined variance, and the observed zero fraction. Confirm that cells have comparable exposures or that exposure differences are represented in the model.
Use a Poisson fit as a baseline, then evaluate whether its equidispersion and zero-frequency predictions are plausible for these data.
Fit NB and, where substantively justified, ZIP. State the estimation method and distinguish the ZIP component mean from its overall mean.
Compare predicted and observed zeros, variance, and frequencies across counts. Treat disagreement as a reason to investigate model adequacy, not as automatic evidence for a particular biological explanation.
Worked Example: Making a Cautious Comparison
For the hypothetical dataset, the observed mean is 1.4 counts per cell, \(v_n=2.54\ \text{counts}^2\), and the zero fraction is 0.400. The Poisson model matches the mean but predicts a variance of only \(1.4\ \text{counts}^2\) and a zero fraction of 0.2466. It therefore misses both the observed variance and zero frequency in this summary comparison.
NB and ZIP each match the mean and variance under the stated moment-fitting procedure. Their predicted zero fractions, 0.3591 and 0.4368, are on either side of the observed 0.400. These calculations do not establish that either model is a correct description: the data have only 20 cells, the two moment fits were constructed to match the first two moments, and the remaining count frequencies still need examination. A careful conclusion is that the Poisson baseline does not capture these summaries, while NB and ZIP are plausible alternatives worth comparing further; the summaries do not select a definitive mechanism.
Check Your Understanding
Answer the questions, then compare your reasoning with the solutions.
- If a Poisson model is fitted with mean 2 counts per cell, what variance and zero probability does it predict?
- Suppose an NB model has \(\mu=2\) counts per cell and \(\alpha=0.5\). Calculate its variance and zero probability.
- In a ZIP model with \(\pi=0.25\) and \(\lambda=4\), calculate the overall mean and zero probability. Is the overall mean 4 counts per cell?
- Why does a ZIP fit with a predicted zero fraction close to the observed fraction not prove that the observed zeros are structural zeros?
Solutions. (1) The Poisson variance equals its mean, so it is \(2\ \text{counts}^2\). Its zero probability is \(e^{-2}\approx0.1353\). (2) The variance is \(2+0.5(2^2)=4\ \text{counts}^2\). The zero probability is \((1+0.5(2))^{-1/0.5}=2^{-2}=0.25\). (3) The overall mean is \((1-0.25)(4)=3\) counts per cell, not 4; 4 is the Poisson-component mean. The zero probability is \(0.25+0.75e^{-4}\approx0.2637\). (4) A close zero-frequency prediction only indicates agreement with that one summary under the assumed model. Other models may also predict similar zeros, and matching the observed fraction does not establish the latent cause of any cell’s zero count.