Tutorials › High-Dimensional Genomic Data Analysis › Common, Trended, And Gene-Wise Dispersion

Count-Based Differential Expression for RNA-seq · Tutorial 434 of 795

Common, Trended, And Gene-Wise Dispersion

You will distinguish three ways to represent negative-binomial dispersion across genes and understand what each estimate captures and where it can fail.

Intermediate 10 min read

What You'll Learn

  • Define dispersion in the negative-binomial mean–variance relationship used for RNA-seq counts.
  • Distinguish one common dispersion from a dispersion that varies with mean expression.
  • Explain how gene-wise dispersion estimates represent separate genes.
  • Calculate and compare count variances under common, trended, and gene-wise dispersion.
  • Identify assumptions and warning signs for each representation.

Why Dispersion Has More Than One Across-Gene Representation

RNA-seq genes can have very different expected counts and different amounts of variability beyond the variation expected from their means. A count model therefore needs to describe not only the expected count for each gene and sample, but also how variability is represented across genes. A single dispersion value is a simple summary; a mean-dependent trend allows dispersion to change systematically with expression; and gene-wise estimates allow each gene its own value.

These are distinct representations of dispersion, not three names for the same calculation. Their differences matter because the assumed dispersion determines the count variance used by the negative-binomial model. In this tutorial, estimates are considered after specifying a count model with an appropriate design and library-size offsets, as covered in the earlier material on negative-binomial GLMs and gene-wise dispersion estimation.

Definition: For gene \(g\) in sample \(j\), let \(Y_{gj}\) be the count and \(\mu_{gj}\) its fitted expected count under the specified design and offset. Under the negative-binomial mean–dispersion parameterization used here, $$ E(Y_{gj})=\mu_{gj}, \qquad \operatorname{Var}(Y_{gj})=\mu_{gj}+\alpha_g\mu_{gj}^{2}, $$ where \(\alpha_g\geq 0\) is the dispersion for gene \(g\). Dispersion measures the extra variance beyond the Poisson variance \(\mu_{gj}\). A larger \(\alpha_g\) means greater variance at the same expected count.

The conditional mean may differ between samples because of library sizes, experimental groups, or other modeled covariates. Dispersion describes the count variability relative to those fitted means; it is not a substitute for modeling systematic differences in the mean. The three representations below differ in how the dispersion parameter is allowed to vary from one gene to another.

Three Representations of Dispersion

RepresentationAcross-gene assumptionWhat it captures
Common dispersionAll genes share one value, \(\alpha_g=\alpha\).A shared level of extra-Poisson variability across the analyzed genes.
Trended dispersionDispersion follows a function of gene-level mean expression, \(\alpha_g=f(\bar{\mu}_g)\).A systematic relationship between expression level and dispersion.
Gene-wise dispersionEach gene has its own value, \(\alpha_g\).Gene-specific variability, including differences not explained by mean expression alone.

Here \(\bar{\mu}_g\) denotes a summary of the fitted means for gene \(g\) across the samples, such as their average. The precise summary and the procedure for estimating a smooth trend depend on the analysis method. The important distinction is conceptual: a common estimate is one value for all genes, a trended estimate assigns values according to mean expression, and a gene-wise estimate is fitted separately for each gene.

A common dispersion is generally estimated by pooling likelihood information across genes under the shared-dispersion assumption. It is not necessarily the arithmetic average of separately estimated gene-wise values: the genes can contribute different amounts of information, and the common value is defined by the fitting procedure. A trended dispersion is obtained by estimating a relationship across genes and evaluating that relationship at each gene’s mean expression. A gene-wise dispersion is estimated from that gene’s counts and fitted means alone. When replicate information is limited, the data for an individual gene may contain little information about its own dispersion, so its estimate can be imprecise.

Why the Mean–Variance Relationship Matters

The negative-binomial variance formula shows directly what each dispersion representation changes. Dividing the variance by the mean gives the variance-to-mean ratio; dividing by the squared mean gives the squared coefficient of variation (when \(\mu_{gj}>0\)). Both calculations separate the Poisson contribution from the dispersion contribution.

$$ \frac{\operatorname{Var}(Y_{gj})}{\mu_{gj}} = \frac{\mu_{gj}+\alpha_g\mu_{gj}^{2}}{\mu_{gj}} =1+\alpha_g\mu_{gj}, \qquad \frac{\operatorname{Var}(Y_{gj})}{\mu_{gj}^{2}} = \frac{1}{\mu_{gj}}+\alpha_g. $$

Thus, even with a common dispersion, the variance-to-mean ratio increases with the expected count when \(\alpha>0\). A trended dispersion adds another possibility: the extra-Poisson component itself may differ systematically between low- and high-expression genes. Gene-wise dispersion allows still more flexibility, because genes with similar means can have different dispersions. These are properties of the model representation; the data must provide enough evidence to support a more flexible representation.

Worked Example: Comparing Variances Under Three Choices

Suppose a hypothetical gene has fitted mean \(\mu_{gj}=10\) counts in one sample. Consider three illustrative dispersion values: common dispersion \(0.08\), trended dispersion \(0.12\) at this gene’s mean, and gene-wise dispersion \(0.05\). These values are hypothetical and are used only to compare the variance formula.

With the common dispersion, the variance is $$ 10+0.08(10^{2})=10+8=18 \text{ counts}^{2}. $$ With the trended dispersion, it is $$ 10+0.12(10^{2})=10+12=22 \text{ counts}^{2}. $$ With the gene-wise dispersion, it is $$ 10+0.05(10^{2})=10+5=15 \text{ counts}^{2}. $$

All three calculations use the same fitted mean. The difference in variance comes only from the dispersion assigned by each representation. The Poisson component is 10 counts squared in each calculation; the additional component is respectively 8, 12, or 5 counts squared.

What Across-Gene Patterns Each Estimate Can Describe

A common dispersion is useful as a compact baseline when genes have broadly similar extra-Poisson variability, or when the data do not support a more detailed pattern. It imposes a strong simplifying assumption: after accounting for the fitted means, the same dispersion applies to every gene. It cannot represent systematic changes in dispersion with mean or unusual gene-specific variability.

A trended dispersion relaxes the common-dispersion assumption in a structured way. It captures a smooth, systematic change in dispersion across the range of average expression. For example, if low-expression genes tend to have larger dispersion than high-expression genes, the trend can assign them different values. But the trend does not, by itself, describe every gene-specific departure from that pattern. Two genes at similar mean expression receive similar trend-based dispersion even if their individual observed variability differs.

Gene-wise dispersion estimates remove the shared-pattern restriction: each gene is allowed to have its own dispersion. This can describe genuine differences between genes at comparable mean expression. The trade-off is that each estimate uses information from one gene, so it may be noisy, especially when there are few biological replicates or counts provide little information about variability. An extreme gene-wise estimate can therefore reflect limited information as well as real excess variability.

Worked Example: Reading Hypothetical Estimates Across Genes

Imagine three hypothetical genes with average fitted means of 4, 25, and 100 counts. Suppose separate gene-wise fits give dispersions \(0.18\), \(0.07\), and \(0.04\), respectively. A common-dispersion fit gives \(0.08\) for all three genes. A fitted mean-dependent trend gives \(0.15\), \(0.08\), and \(0.045\) at those three means. These are illustrative fitted values, not observations from a real experiment.

For the gene with mean 4, the gene-wise variance at that mean is $$ 4+0.18(4^{2})=4+2.88=6.88 \text{ counts}^{2}. $$ The common-dispersion variance is \(4+0.08(16)=5.28\) counts squared, and the trend-based variance is \(4+0.15(16)=6.40\) counts squared. The trend reflects the higher dispersion associated with low mean expression, while the gene-wise estimate is higher still for this particular gene.

For the gene with mean 25, the gene-wise and trend dispersions are both \(0.07\) and \(0.08\), respectively. Their variances are $$ 25+0.07(25^{2})=68.75 \text{ counts}^{2}, \qquad 25+0.08(25^{2})=75 \text{ counts}^{2}. $$ The common-dispersion variance is also \(75\) counts squared because the common value is \(0.08\). At this mean, the trend and common estimate happen to agree; that agreement is not a requirement of either representation.

For the gene with mean 100, the gene-wise variance is \(100+0.04(10{,}000)=500\) counts squared, while the trend-based variance is \(100+0.045(10{,}000)=550\) counts squared. The common-dispersion variance is \(100+0.08(10{,}000)=900\) counts squared. The example shows how a common value can differ from a mean-dependent pattern, and how gene-wise estimates can depart from either. It does not establish that one representation is best: that depends on whether its assumptions are plausible and supported by the experiment.

Assumptions, Diagnostics, and Limitations

All three representations rely on an adequately specified mean model. If groups, covariates, or library-size offsets are handled incorrectly, systematic mean differences can appear as unexplained variability and distort dispersion estimates. The count model also assumes that the negative-binomial variance relationship is a reasonable description of the data. These assumptions should be considered before interpreting differences among dispersion estimates.

Useful warning signs include a clear systematic relationship between gene-wise estimates and mean expression, which makes a single common value questionable, or substantial scatter around a proposed trend, which shows that mean alone does not describe all gene-to-gene variation. A very imprecise or extreme gene-wise estimate should be treated cautiously, especially for genes with little replicate information. These signs motivate examining the fit and the data; they do not, by themselves, identify the cause of a discrepancy.

The main alternatives make different compromises. A common dispersion is simple and stable under its shared-value assumption, but may miss structure. A trended dispersion captures systematic mean dependence but cannot account for all gene-specific departures. Gene-wise estimates are flexible but may be highly variable. None of these representations proves that a difference in dispersion is biological, and none repairs an incorrect mean model, dependence between samples, or other departures from the assumed count distribution. They describe how dispersion is represented across genes, not the cause of that dispersion.

Worked Example: A Gene-Wise Departure From the Trend

Suppose two hypothetical genes have the same fitted mean of 40 counts. A mean-dependent trend assigns dispersion \(0.09\) at that mean, and the common estimate is \(0.08\). The two gene-wise estimates are \(0.04\) and \(0.20\). The corresponding variances at mean 40 are: $$ \begin{aligned} \text{First gene, gene-wise: }&40+0.04(40^{2})=40+64=104 \text{ counts}^{2},\\ \text{Second gene, gene-wise: }&40+0.20(40^{2})=40+320=360 \text{ counts}^{2},\\ \text{Trend: }&40+0.09(40^{2})=40+144=184 \text{ counts}^{2},\\ \text{Common: }&40+0.08(40^{2})=40+128=168 \text{ counts}^{2}. \end{aligned} $$

The trend and common representations assign the same dispersion to both genes because their means are equal; gene-wise estimation does not. Such a departure could reflect real gene-specific variability, but it could also result from limited information or a model issue. The calculation identifies the implication of the estimates, not which explanation is correct.

Common Mistake

Wrong reasoning: “The gene-wise estimate is specific to the gene, so it must be the most accurate dispersion for that gene.”

Correction: Specificity is not the same as precision. A gene-wise estimate is based on that gene’s information and can be unstable when replication is limited. A common estimate or a trend describes shared information across genes under its assumptions. The three values answer different modeling questions; no representation is automatically best for every gene.

Key takeaway: Common dispersion assigns one shared value across genes; trended dispersion assigns values through a mean-dependent relationship; gene-wise dispersion estimates a separate value for each gene. Their differences are assumptions about structure across genes, and each changes the negative-binomial variance through \(\alpha_g\mu_{gj}^{2}\).

Check Your Understanding

Answer each question, then compare your reasoning with the solutions below.

  1. At a fitted mean of 20 counts, calculate the variance under dispersion \(0.10\). What part of the variance is added beyond the Poisson component?
  2. What across-gene pattern can a trended dispersion represent that a common dispersion cannot?
  3. Two genes have the same mean but different gene-wise dispersions. Which of the three representations can assign them different variances, and why?
  4. Why might a gene-wise estimate be unreliable when an experiment has little replicate information?

Solutions. (1) The variance is \(20+0.10(20^{2})=20+40=60\) counts squared; the extra-Poisson component is 40 counts squared. (2) A trend can represent a systematic change in dispersion with mean expression, whereas the common value is fixed across genes. (3) Gene-wise dispersion can assign different variances because the genes may have different \(\alpha_g\); common and trend-based values are the same for genes with equal means under those representations. (4) A gene-wise estimate relies on information from that gene alone, and limited replication provides weak information about its variability, making the estimate potentially imprecise.

Clinical Biostats