Tutorials › Statistical Methods for Single-Cell RNA Sequencing › Mean-Variance Relationships in Single-Cell Counts

Highly Variable Genes and Feature Selection · Tutorial 110 of 700

Mean-Variance Relationships in Single-Cell Counts

Learn to read gene-wise mean-versus-variance plots by separating ordinary Poisson sampling, exposure heterogeneity, and extra count variation.

Intermediate 10 min read

What You'll Learn

  • Define a gene-wise mean-versus-variance plot and its units.
  • Explain why sparse Poisson counts can contain many zeros while variance still equals the mean.
  • Derive how differing cell exposures inflate the pooled variance.
  • Compare Poisson and negative-binomial reference patterns using simulated counts.
  • Diagnose when a plot may reflect library size, mixtures, or outliers rather than gene-specific variation.

Why Count Variance Depends on Mean

In single-cell RNA sequencing, genes with higher average counts often also have higher variance across cells. This is not automatically evidence that a gene varies unusually from cell to cell. Count sampling alone creates a mean-dependent variance, and differences in cell exposure can add still more variation. A mean-versus-variance plot makes these features visible: each point represents a gene, with its average count across cells on the horizontal axis and its variance across cells on the vertical axis.

The central reference is the Poisson count model. Under that model, a count with mean \(\mu\) also has variance \(\mu\). Thus a gene with a larger mean is expected to have a larger variance even if its counts follow an ordinary Poisson distribution. Single-cell counts are often sparse: many observations are zero, especially for genes with small means. Sparsity and the mean-variance relationship are linked, but a high zero fraction by itself does not establish that a gene has unusual variability.

Definition: For gene \(g\), let \(Y_{ig}\) be its count in cell \(i\), for \(i=1,\ldots,n\). Its empirical mean is \(\bar{Y}_g=n^{-1}\sum_i Y_{ig}\), and its empirical sample variance is \(s_g^2=(n-1)^{-1}\sum_i(Y_{ig}-\bar{Y}_g)^2\). A gene-wise mean-versus-variance plot places \(\bar{Y}_g\) on the horizontal axis and \(s_g^2\) on the vertical axis. The mean is in counts per cell; the variance is in squared counts per cell.

These summaries are most directly comparable when cells have similar exposure and are drawn from a population in which the gene’s count-generating rate is reasonably stable. In a sequencing experiment, exposure reflects factors such as library size. Earlier material on normalization explains why counts from cells with different library sizes may not be directly comparable. A plot of raw counts can therefore mix biological variability with technical exposure differences. Even after normalization, the scale and model used to obtain the values matter: normalized values need not be integer counts, and their variance should not be interpreted as though it were necessarily a raw-count Poisson variance.

The Poisson Reference and Sparsity

Suppose a gene’s count in each comparable cell follows a Poisson distribution with rate \(\mu\), independently across cells. The Poisson distribution has probability \(P(Y=y)=e^{-\mu}\mu^y/y!\) for nonnegative integers \(y\), and both its expected count and its variance equal \(\mu\). Its zero probability is \(P(Y=0)=e^{-\mu}\). When \(\mu\) is small, this probability is large, so many cells have zero counts even though the model has no extra variance beyond Poisson sampling.

Worked Example: Sparse Counts Under Poisson Sampling

Consider three hypothetical genes, each simulated in many comparable cells from a Poisson model. Their true means are \(0.2\), \(2\), and \(8\) counts per cell. For a Poisson variable, the theoretical variance equals the mean, so the expected mean-variance points are \((0.2,0.2)\), \((2,2)\), and \((8,8)\), with the second coordinate measured in squared counts per cell.

For the low-mean gene, the zero probability is \(e^{-0.2}\approx0.8187\). Thus about 81.9% of cells are expected to have zero observed counts, despite the model being exactly Poisson. For the gene with mean \(2\), the zero probability is \(e^{-2}\approx0.1353\); for the gene with mean \(8\), it is \(e^{-8}\approx0.0003355\).

The plot would show the variance increasing along with the mean, while the low-mean gene remains highly sparse. This illustrates why “many zeros” and “variance greater than the mean” are not interchangeable diagnoses: the first is expected for a low Poisson mean, while the second concerns the variance relative to that mean.

In a finite dataset, the plotted values will not lie exactly on the theoretical relationship. The sample mean and sample variance fluctuate from one simulated dataset to another. Such scatter is especially noticeable with few cells, very low means, or a small number of unusually large counts. The Poisson relationship is therefore a reference pattern, not a requirement that every observed gene land exactly on a line.

Why Unequal Exposure Can Inflate Variance

A key complication is that cells can have different exposure factors. Let \(S_i\) denote the exposure for cell \(i\), and suppose that conditional on \(S_i\), a gene follows a Poisson model with mean \(S_i\lambda\), where \(\lambda\) is the gene’s rate per unit exposure. Conditional on exposure, the variance is also \(S_i\lambda\). If counts are pooled across cells with different exposures, however, the pooled variance includes both the Poisson sampling variance within exposure levels and the variation in expected counts across exposure levels.

The justification follows from the law of total variance: \(\operatorname{Var}(Y)=E[\operatorname{Var}(Y\mid S)]+\operatorname{Var}(E[Y\mid S])\). Substituting the conditional Poisson mean and variance gives the relationship below.

$$ E(Y)=\lambda E(S), \qquad \operatorname{Var}(Y)=\lambda E(S)+\lambda^2\operatorname{Var}(S). $$

The first term in the variance is the average conditional Poisson variance. The second term is nonnegative and arises because expected counts differ with exposure. Thus the pooled variance can exceed the pooled mean even when every cell follows a Poisson model conditional on its exposure. This is why a raw-count variance above the raw-count mean does not, by itself, show extra biological variation beyond Poisson sampling.

Worked Example: Exposure Differences Mimic Extra Variation

Suppose a hypothetical gene follows \(Y_i\mid S_i\sim\operatorname{Poisson}(S_i\lambda)\) with \(\lambda=2\). Four equally common exposure values are \(0.5\), \(1\), \(2\), and \(4\). The largest exposure divided by the smallest is \(4/0.5=8\), so exposures differ eightfold from smallest to largest.

The mean exposure is \(E(S)=(0.5+1+2+4)/4=1.875\). The mean squared exposure is \(E(S^2)=(0.25+1+4+16)/4=5.3125\), so \(\operatorname{Var}(S)=5.3125-(1.875)^2=1.796875\).

The pooled expected count is \(E(Y)=2(1.875)=3.75\). Its variance is \(\operatorname{Var}(Y)=2(1.875)+2^2(1.796875)=3.75+7.1875=10.9375\). The pooled variance is nearly 2.92 times the pooled mean. Yet conditional on each exposure value, the count is Poisson and its conditional variance equals its conditional mean. The excess in the pooled variance is explained by exposure heterogeneity, not by evidence from this calculation of additional variation after accounting for exposure.

The same logic applies when cells differ because they belong to distinct biological states or batches: pooling groups with different expected counts can increase the overall variance. In that setting, the increase may reflect genuine population structure, a technical effect, or both. A single mean-variance point cannot identify which explanation is correct.

Overdispersion Relative to a Count Model

Counts can also vary more than the Poisson model predicts after exposure differences have been accounted for. One standard model for such counts is the negative binomial. With mean \(\mu\) and positive size parameter \(k\), its variance is \(\mu+\mu^2/k\). This is larger than \(\mu\) for finite \(k\), and approaches the Poisson variance as \(k\) grows without bound. The negative-binomial model is useful as a reference for extra count variation; observing a high sample variance alone does not prove that this model is appropriate.

Worked Example: Comparing Poisson and Negative-Binomial References

Consider a hypothetical gene with mean \(\mu=2\) counts per comparable cell. Under a Poisson model, its variance is \(2\), and its zero probability is \(e^{-2}\approx0.1353\). Under a negative-binomial model with \(k=2\), the variance is \(2+2^2/2=4\). Its zero probability is \((k/(k+\mu))^k=(2/4)^2=0.25\).

For this same mean, the negative-binomial reference has twice the variance of the Poisson reference and a larger zero probability. A hypothetical simulated dataset from the negative-binomial model would therefore tend to show a point near mean \(2\) and variance \(4\), along with more zeros and more count variation than the Poisson reference predicts. The exact empirical point would vary across simulations; it need not equal \((2,4)\).

This comparison is model-based, not a claim that every excess zero requires a negative-binomial explanation. Heterogeneous cell exposures, mixtures of cell states, batch effects, and occasional extreme observations can also alter the observed pattern. The mean-variance plot signals where a simple Poisson reference may be inadequate; additional context and diagnostics are needed to understand why.

Reading the Plot and Checking Its Assumptions

A mean-variance plot should be read as a diagnostic summary, not as a stand-alone test of a biological hypothesis. A rising cloud of points is expected for count data because higher means generally bring higher variances. Points substantially above a Poisson reference may warrant investigation, but the reference is meaningful only if the counts being compared have suitable exposure and population definitions. A gene’s point also summarizes the entire set of included cells, so a mixture of cell types can conceal patterns that differ within each type.

Several checks help interpret the plot responsibly:

  • Check the count scale. Confirm whether the plotted values are raw counts, normalized values, or transformed values. A Poisson mean-variance reference applies to counts under the stated model, not automatically to logged or otherwise transformed data.
  • Check exposure variation. Compare the pattern for raw counts with summaries that account for library-size differences, and check whether high-variance points are associated with cells having unusually large exposures.
  • Check composition. Ask whether the cells combine distinct cell types, conditions, or batches with different average expression. If so, pooled variability may reflect those group differences.
  • Check influential observations and sample size. A few large counts can strongly affect a sample variance. Small numbers of cells also make gene-wise variance estimates unstable.
  • Check sparsity alongside variance. The zero fraction gives useful context, but does not replace the variance calculation or identify its cause.

Display choices can change what is easy to see. A linear-scale plot shows the Poisson reference relationship directly, but highly expressed genes can compress the low-mean region. Logarithmic axes can spread out that region, but zero means or variances cannot be shown on a log scale without a special plotting convention. Adding an arbitrary constant changes the visual positions and should be disclosed. Whatever the axes, state clearly whether the vertical coordinate is variance, standard deviation, or another summary; these are different quantities.

A mean-variance plot is also not a fair way to rank variability across genes with very different means. A gene with a high mean may have a high variance simply because of its count scale. Later feature-selection methods address how to compare variability after accounting for mean expression; here the aim is to understand the underlying relationship and its sources, not to define a ranking rule.

Common Mistake and Practical Limits

Wrong reasoning: “This gene’s raw-count variance is greater than its raw-count mean, so it must have extra biological variability beyond Poisson sampling.” This conclusion ignores that the cells may have different exposures or that the pooled cells may come from groups with different expected counts.

Correction: First specify the count model and the population being summarized. For equal-exposure cells with a common Poisson rate, variance equal to mean is the reference. With unequal exposures, pooled variance also contains the term \(\lambda^2\operatorname{Var}(S)\). With group mixtures, between-group differences can add variability as well. Only after considering these features should one interpret a discrepancy from the Poisson reference as evidence that the simple model may be inadequate.

The plot has further limits. It compresses each gene’s cell-level distribution into two numbers, cannot distinguish technical from biological sources by itself, and can be sensitive to outliers and cell composition. It is most useful as an exploratory check alongside information about normalization, experimental groups, and the distribution of counts across cells. It does not establish causation, identify a mechanism, or replace a model that accounts for the design.

Check Your Understanding

Use the models and distinctions in this tutorial to answer the questions. Brief solutions follow.

  1. A Poisson gene has mean \(0.1\) counts per cell. What are its theoretical variance and zero probability, approximately?
  2. Two groups of cells each follow Poisson counts, but have different exposure levels. Can their pooled variance exceed their pooled mean even if neither group is overdispersed relative to its conditional Poisson model? Explain.
  3. A gene has mean \(3\) and is modeled by a negative binomial with \(k=3\). What variance does the model predict, and how does it compare with the Poisson reference?
  4. Why is it insufficient to conclude that a gene is biologically variable merely because its raw-count variance is large?

Solutions. (1) The variance is \(0.1\), and \(P(Y=0)=e^{-0.1}\approx0.9048\); about 90.5% of counts are expected to be zero. (2) Yes. The pooled variance includes the additional nonnegative term \(\lambda^2\operatorname{Var}(S)\) when exposure varies. (3) The negative-binomial variance is \(3+3^2/3=6\), compared with a Poisson variance of \(3\). (4) Raw-count variance can reflect ordinary mean-dependent sampling, unequal exposures, pooled cell groups, or influential observations, as well as additional variation. The variance alone does not distinguish these explanations.

Clinical Biostats