Tutorials › Statistical Methods for Single-Cell RNA Sequencing › Worked Comparison of Three Abundance Models

Differential Abundance and Compositional Effects · Tutorial 564 of 700

Worked Comparison of Three Abundance Models

Compare three abundance models on the same donor-level counts, calculate their estimates and uncertainty, and connect model choice to the scientific question and its assumptions.

Advanced 12 min read

What You'll Learn

  • Fit a binomial model to pooled cell counts and calculate a standard error for a proportion difference.
  • Explain how beta-binomial variation represents donor-to-donor heterogeneity beyond binomial sampling.
  • Calculate moment estimates of beta-binomial overdispersion from donor-level counts.
  • Fit a multinomial model to mutually exclusive cell-type counts and interpret the full composition.
  • Compare model uncertainty, assumptions, diagnostics, and scientific targets using one hypothetical example.

One Count Table, Three Models

A cell-type proportion can be summarized in more than one way, and the model determines what counts as independent information. Treating every captured cell as an independent replicate can produce much narrower uncertainty than treating donors as the biological replicates. A multinomial model also addresses a different question from a model of one cell type versus all remaining cells: it describes the composition across all categories together.

The example throughout this tutorial is hypothetical. Three control donors and three treated donors each contribute 100 cells, classified into mutually exclusive categories A, B, and Other. The table gives the observed counts for each donor.

ConditionDonorCategory ACategory BOtherTotal
Control152570100
Control2103060100
Control3153550100
Treated1103060100
Treated2203050100
Treated3303040100

For every model below, the observed proportion of category A is 0.10 in control (30 of 300 cells) and 0.20 in treated (60 of 300). The difference in observed proportions is therefore 0.10, or 10 percentage points. What differs is the sampling model and, consequently, how much uncertainty is assigned to that difference.

Binomial Model: Cells as Independent Trials

Definition: Under a binomial model for a condition, the count \(K\) of cells in a target category among \(N\) sampled cells satisfies \(K\sim\operatorname{Binomial}(N,p)\). Each cell is assumed to have the same probability \(p\) of belonging to the target category, and the cell classifications are independent conditional on \(p\). For comparing conditions, this model is fitted separately within each condition unless a different structure is specified.

This model directly targets the proportion of cells in one chosen category. Its assumptions are strong when the biological samples are donors: cells from the same donor may share biology and processing conditions, so they need not behave like independent observations from one common probability. A binomial fit to pooled counts does not represent that donor-to-donor variation.

Worked Example: Pooled Binomial Comparison for Category A

Pool the counts within each condition and fit one binomial proportion per condition. Control has \(K_C=30\) category-A cells among \(N_C=300\); treated has \(K_T=60\) among \(N_T=300\).

The maximum-likelihood estimate of a binomial proportion is the observed count divided by the total:

$$ \hat{p}_C=\frac{30}{300}=0.10,\qquad \hat{p}_T=\frac{60}{300}=0.20,\qquad \hat{p}_T-\hat{p}_C=0.10. $$

Under independent binomial sampling, the estimated variance of a proportion is \(\hat{p}(1-\hat{p})/N\). For independent condition samples, the variance of the difference is the sum of the two estimated variances. Thus:

$$ SE(\hat{p}_T-\hat{p}_C) =\sqrt{\frac{0.20(0.80)}{300}+\frac{0.10(0.90)}{300}} =\sqrt{0.0008333} =0.02887. $$

A normal-approximation 95% interval is \(0.10\pm1.96(0.02887)\), or approximately 0.0434 to 0.1566. Under the binomial assumptions, this interval represents uncertainty in the treated-minus-control difference in category-A proportions, measured in proportion units. It is not an interval for an absolute cell-number difference. More importantly, its precision is conditional on treating the 300 cells per condition as independent trials; it does not incorporate the observed donor clustering.

Beta-Binomial Model: Allowing Donors to Differ

Definition: In a beta-binomial model, donor \(i\) has a latent category probability \(P_i\), with \(P_i\sim\operatorname{Beta}(a,b)\), and the observed target count satisfies \(K_i\mid P_i\sim\operatorname{Binomial}(N_i,P_i)\). Donors are assumed independent, while cells within a donor are conditionally independent given that donor's probability. The marginal mean probability is \(p=a/(a+b)\); the within-donor intraclass correlation is \(\rho=1/(a+b+1)\).

The random probability allows donors to have different underlying category proportions. The resulting count variance is larger than the binomial variance when \(\rho>0\). This model still focuses on one category versus its complement; it does not describe how the remaining cells divide among B and Other.

A useful justification follows from the law of total variance. Since the conditional mean and variance are \(E(K_i\mid P_i)=N_iP_i\) and \(\operatorname{Var}(K_i\mid P_i)=N_iP_i(1-P_i)\), respectively:

$$ \begin{aligned} \operatorname{Var}(K_i) &=E\{\operatorname{Var}(K_i\mid P_i)\} +\operatorname{Var}\{E(K_i\mid P_i)\}\\ &=N_i E\{P_i(1-P_i)\}+N_i^2\operatorname{Var}(P_i)\\ &=N_i p(1-p)\{1+(N_i-1)\rho\}. \end{aligned} $$

The multiplier \(1+(N_i-1)\rho\) is the overdispersion factor relative to a binomial count with the same mean. Even modest positive donor correlation can matter when many cells are observed per donor. The model assumes the beta distribution is an adequate description of donor probabilities and that donors are independent; with few donors, the dispersion estimate can be unstable.

Worked Example: Estimating Donor Overdispersion

For control, the category-A counts are 5, 10, and 15 out of 100 per donor. The mean count is 10, so the estimated mean proportion is \(\hat{p}_C=10/100=0.10\). The sample variance of counts is:

$$ s_K^2=\frac{(5-10)^2+(10-10)^2+(15-10)^2}{3-1} =\frac{50}{2}=25. $$

The beta-binomial variance formula, evaluated at \(N=100\) and \(\hat{p}_C=0.10\), is \(100(0.10)(0.90)\{1+99\rho\}=9(1+99\rho)\). Equating this model variance to the observed sample variance gives the method-of-moments estimate:

$$ \hat{\rho}_C=\frac{25/9-1}{99}=0.01796. $$

For treated donors, the counts are 10, 20, and 30, with mean 20 and sample variance \(\{(10-20)^2+(20-20)^2+(30-20)^2\}/2=100\). Here \(\hat{p}_T=0.20\), so the binomial component of the variance is \(100(0.20)(0.80)=16\). Equating \(100=16(1+99\rho)\) gives \(\hat{\rho}_T=(100/16-1)/99=0.05303\). Both moment estimates indicate more donor variation than the independent-cell binomial model allows. These estimates are illustrative: with only three donors per condition, they are imprecise and do not establish that the conditions truly differ in dispersion.

A transparent donor-level summary also shows how that heterogeneity affects uncertainty. Control donor proportions are 0.05, 0.10, and 0.15, with sample standard deviation 0.05; treated proportions are 0.10, 0.20, and 0.30, with sample standard deviation 0.10. The standard error of the difference between their donor means, using independent donors, is:

$$ SE=\sqrt{\frac{0.05^2}{3}+\frac{0.10^2}{3}}=0.06455. $$

This is much larger than the pooled-binomial standard error of 0.02887 because the donor-level calculation retains the observed variability between donors. It is a small-sample descriptive standard error, not a substitute for fitting and checking a fully specified inferential model. In particular, three donors per group provide little information about the shape of a random-effects distribution.

Multinomial Model: The Whole Composition

Definition: A multinomial model represents counts in \(J\) mutually exclusive and exhaustive categories. For one sample with total \(N\), the count vector \((K_1,\ldots,K_J)\) satisfies \((K_1,\ldots,K_J)\sim\operatorname{Multinomial}(N;\pi_1,\ldots,\pi_J)\), where \(\sum_{j=1}^J\pi_j=1\). Each cell belongs to exactly one category, and cells are assumed independent with the same category-probability vector within the modeled sample.

A multinomial model can answer questions about the full relative composition, rather than just the probability of A. For example, it distinguishes a change in A from a redistribution between B and Other. Its standard form still assumes cells within each modeled sample are independent and share one composition vector; fitting it to pooled counts does not automatically account for donors.

Worked Example: Fitting the Three-Category Composition

Summing the same table gives control totals \((30,90,180)\) and treated totals \((60,90,150)\), in the order A, B, Other. Under a separate multinomial model for each condition, the maximum-likelihood estimate of each category probability is its count divided by the condition total:

$$ \hat{\boldsymbol{\pi}}_C=(30/300,90/300,180/300)=(0.10,0.30,0.60), \qquad \hat{\boldsymbol{\pi}}_T=(60/300,90/300,150/300)=(0.20,0.30,0.50). $$

The fitted compositions each sum to one. Category A rises by 0.10, B is unchanged, and Other falls by 0.10. This joint account makes the compositional constraint explicit: the estimated proportions cannot all increase because their sum remains one. The estimates describe relative shares among the captured cells, not absolute numbers of cells in the tissue.

Within one multinomial sample, the estimated covariance between two distinct category proportions is negative. For A and B, its model value is \(-\pi_A\pi_B/N\), because an increase in one category's count, with the total held fixed, leaves fewer counts available for the other categories. This covariance is one reason not to fit separate independent binomial models to every category and then interpret them as a coherent full composition.

Comparing Assumptions and Choosing the Scientific Target

ModelPrimary targetKey sampling assumptionWhat it leaves out
BinomialOne category's proportionIndependent cells with a common probability within conditionDonor heterogeneity and the subdivision of the complement
Beta-binomialOne category's proportion with donor variationIndependent donors; donor probabilities follow a beta distribution; conditional binomial sampling within donorsThe separate proportions of categories within the complement
MultinomialThe full vector of category proportionsIndependent cells with one common category-probability vector within conditionDonor heterogeneity unless modeled separately

The model should match both the scientific question and the sampling structure. If the target is a single cell type's share and donors are the independent biological replicates, a beta-binomial formulation can represent donor-level variation in that share. If the target is how the entire observed composition differs, the multinomial formulation expresses the joint categories and their sum constraint. A pooled binomial or multinomial analysis may be a useful reference, but should not be presented as donor-aware merely because donor labels were present in the original table.

These models also rely on the observed categories being defined consistently and the totals being meaningful for the target comparison. They concern relative abundance among sampled cells. As the earlier material on capture bias and absolute cell number establishes, observed proportions alone do not identify absolute abundance in the source tissue. No one of these likelihoods repairs biased capture or an inappropriate sampling frame.

Diagnostics should address the assumptions that distinguish the models. Compare donor-specific proportions or compositions to fitted expectations; large between-donor variation relative to binomial sampling signals a problem for an independent-cell model. Check whether observed category counts are compatible with the chosen distribution, whether totals and categories have been recorded consistently, and whether a few donors dominate the pooled counts. Posterior predictive checks for compositional models provide a formal way to compare replicated data with observed patterns. With very few donors, however, diagnostics and dispersion estimates have low power; apparent agreement is not strong evidence that overdispersion is absent.

A common mistake is to say, “There are 300 cells in each condition, so the effective sample size is 300.” That conclusion assumes independent cell-level trials. In this example, the three donor proportions visibly vary, and donors—not the cells nested within them—carry the independent biological replication. A larger number of cells per donor can improve measurement of each donor's composition, but it does not create additional independent donors.

Key takeaway: The binomial and multinomial models describe cell-level sampling under a common condition-specific probability or composition; the beta-binomial adds donor-level variation for a target category. Their estimates can agree while their uncertainty differs substantially. Match the model to the estimand and replicate structure, and report the assumptions that make its uncertainty meaningful.

Check Your Understanding

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

  1. In the hypothetical table, what are the pooled control and treated proportions of category A, and their difference?
  2. Why does the beta-binomial model generally give a larger count variance than a binomial model with the same mean?
  3. For control, verify the moment estimate of \(\rho\) using the observed count variance of 25.
  4. What additional information does the multinomial model retain compared with a model for A versus all other cells?
  5. Why does counting 300 cells per condition not establish 300 independent biological replicates?

Solutions. (1) Control is \(30/300=0.10\), treated is \(60/300=0.20\), and the difference is 0.10, or 10 percentage points. (2) The variance is multiplied by \(1+(N-1)\rho\), which exceeds one when \(\rho>0\); the shared donor probability induces within-donor dependence. (3) \(25=9(1+99\rho)\), so \(\rho=(25/9-1)/99=0.01796\). (4) It represents the proportions of A, B, and Other jointly, including the constraint that they sum to one. (5) Cells from one donor may be correlated; the independent biological units in this example are the six donors, three per condition.

Clinical Biostats