Why a Binomial Model May Be Too Certain
For a selected cell type, a donor contributes a count \(Y_i\) out of \(N_i\) cells, giving the observed proportion \(Y_i/N_i\). A binomial model treats those \(N_i\) cells as independent trials with a common probability. But donors can differ in their underlying abundance, even when they share a condition. When that variation is ignored, a binomial model can make the cell count look more precise than the independent donor replication supports.
A beta-binomial model represents this additional variation by allowing each donor to have a latent cell-type probability. Cells are independent conditional on that donor-specific probability, but are correlated after it is averaged out. The result is a count model with greater variance than a binomial model when \(N_i>1\) and the between-donor variation is positive. When \(N_i=1\), the count variance is unchanged from the binomial variance.
Write the mean donor probability as \(\mu_i=a_i/(a_i+b_i)\), and write \(\rho=1/(a_i+b_i+1)\). In a common regression model, \(\rho\) is shared across donors, while \(\mu_i\) depends on condition and any included covariates. The parameter \(\rho\) is nonnegative: \(\rho=0\) is the binomial limit, and larger values indicate more donor-level probability variation.
Deriving the Mean, Variance, and Count Distribution
The beta distribution has mean \(\mu_i\) and variance \(\mu_i(1-\mu_i)\rho\). Conditional on \(q_i\), the binomial count has mean \(N_iq_i\) and variance \(N_iq_i(1-q_i)\). Applying the laws of total expectation and total variance gives the beta-binomial moments.
The last line follows because \(E\{q_i(1-q_i)\}=\mu_i(1-\mu_i)-\operatorname{Var}(q_i)\) and \(\operatorname{Var}(q_i)=\mu_i(1-\mu_i)\rho\). The multiplier \(1+(N_i-1)\rho\) is the variance inflation relative to the binomial model with the same \(N_i\) and \(\mu_i\). It equals one when \(N_i=1\); for positive \(\rho\), it is greater than one when \(N_i>1\).
The same latent probability also induces correlation between two distinct cell indicators from the same donor. If \(Z_{ij}\) and \(Z_{ik}\) indicate membership for two cells, then their covariance is \(\operatorname{Var}(q_i)\). Since each has marginal variance \(\mu_i(1-\mu_i)\), their correlation is \(\rho\). This explains why collecting many more cells from one donor does not provide as much independent information as collecting the same number across additional donors.
Worked Example: Quantifying Variance Inflation
Suppose a hypothetical donor has \(N_i=100\) sampled cells, mean cell-type probability \(\mu_i=0.10\), and overdispersion \(\rho=0.05\). The binomial variance would be \(100(0.10)(0.90)=9\).
Under the beta-binomial model, the variance is $$ 100(0.10)(0.90)\{1+(100-1)(0.05)\} =9(5.95)=53.55. $$
Thus the count standard deviation is \(\sqrt{53.55}=7.318\) cells, compared with \(\sqrt{9}=3\) cells under the binomial model. This does not change the expected count, \(100(0.10)=10\); it reflects extra variation around that mean across donors.
For contrast, if \(N_i=1\) with the same \(\mu_i\) and \(\rho\), the variance is \(1(0.10)(0.90)\{1+(1-1)(0.05)\}=0.09\), exactly the binomial variance. There cannot be within-donor correlation between two distinct cells when only one cell is observed.
Worked Example: A Beta-Binomial Count Probability
Suppose a hypothetical donor has \(N_i=2\), \(\mu_i=0.20\), and \(\rho=0.20\). Then \(a_i+b_i=1/\rho-1=4\), so \(a_i=0.20(4)=0.8\) and \(b_i=0.80(4)=3.2\). For two target cells out of two, the beta-binomial probability is $$ P(Y_i=2)=\binom{2}{2}\frac{B(2.8,3.2)}{B(0.8,3.2)} =\frac{0.8(1.8)}{4(5)}=0.072. $$
A binomial model with probability \(0.20\) instead gives \(P(Y_i=2)=(0.20)^2=0.040\). The beta-binomial assigns greater probability to this high count because both cells share the same latent donor probability. The full beta-binomial probabilities are \(P(Y_i=0)=3.2(4.2)/20=0.672\) and \(P(Y_i=1)=2(0.8)(3.2)/20=0.256\); they sum with \(0.072\) to one.
Estimating Condition Effects
For differential abundance of one cell type versus the rest, a usual regression specification is
Here \(\mathbf{x}_i\) contains the donor's condition and any other modeled predictors. The regression coefficients and dispersion parameter can be estimated by maximizing the product of the beta-binomial probabilities across independent donors. In a two-condition model with treatment indicator \(T_i\), the coefficient \(\beta_1\) is the difference in log odds of the modeled mean donor proportion between treatment and reference condition. Its exponent, \(\exp(\beta_1)\), is the ratio of those odds. This is an effect on \(\mu_i\), the mean donor probability under the model; it is not the average of donor-specific odds.
For a fitted model, a Wald test divides an estimated coefficient by its standard error and compares the result with a reference distribution; a likelihood-ratio test compares the maximized likelihoods under models with and without the condition effect. Both tests rely on independent donor-level observations and an adequate model. Inference about the condition coefficient is not made more reliable simply by treating every cell as an independent experimental replicate.
Worked Example: A Donor-Level Condition Contrast
Consider hypothetical data for four donors per condition, each contributing 100 cells. The observed target-cell proportions are \(0.04, 0.08, 0.12, 0.16\) in the reference condition and \(0.08, 0.12, 0.16, 0.20\) in treatment. The mean proportions are \(0.10\) and \(0.14\), respectively. In this balanced example, use the group means as method-of-moments estimates of the condition means.
The estimated log-odds contrast is $$ \widehat{\beta}_1 =\log\left(\frac{0.14}{0.86}\right) -\log\left(\frac{0.10}{0.90}\right) = -1.81529-(-2.19722)=0.38193. $$ The corresponding odds ratio is \(\exp(0.38193)=1.465\). Thus the estimated odds of the mean donor proportion are about 1.465 times as large in treatment as in the reference condition; this is an association in these hypothetical data, not by itself evidence of a causal effect.
To show how donor variability affects uncertainty, estimate the sample variance of the four donor proportions in each group. In both groups, the deviations from the group mean are \(-0.06,-0.02,0.02,0.06\), so $$ s^2=\frac{0.06^2+0.02^2+0.02^2+0.06^2}{4-1} =\frac{0.008}{3}=0.002667. $$ A donor-level delta-method standard error for the log-odds contrast is $$ SE\approx\sqrt{\frac{0.002667}{4(0.10^2)(0.90^2)} +\frac{0.002667}{4(0.14^2)(0.86^2)}}=0.3582. $$ The approximate Wald statistic is \(0.38193/0.3582=1.066\), giving a two-sided normal-approximation p-value of approximately \(0.2863\). The data do not provide strong evidence against a zero log-odds contrast at the 0.05 level. This transparent donor-level approximation is not the beta-binomial maximum-likelihood fit; in a formal regression, the coefficient and its standard error come from the beta-binomial likelihood.
For comparison, treating all cells as independent gives the binomial log-odds standard error $$ \sqrt{\frac{1}{40}+\frac{1}{360}+\frac{1}{56}+\frac{1}{344}}=0.2203. $$ That smaller standard error gives a statistic of \(0.38193/0.2203=1.734\) and an approximate two-sided p-value of \(0.0829\). The contrast between the two calculations illustrates why donor-to-donor variation can materially change uncertainty and testing.
Assumptions, Diagnostics, and Alternatives
The beta-binomial model is most defensible when donors are independent sampling units, each donor's denominator \(N_i\) is defined consistently with the abundance question, and cells within a donor can reasonably be treated as exchangeable conditional on one latent probability. The model also assumes the beta distribution is an adequate description of donor-level probability variation and that the chosen mean model captures systematic differences among donors. If donors are paired, repeatedly measured, or otherwise dependent, a model that represents that design is needed rather than pretending the donors are independent.
Useful checks include comparing observed donor proportions with fitted means, examining whether variability changes with the fitted mean or denominator, and checking whether observed counts—especially unusually extreme counts—are reasonably represented by fitted beta-binomial probabilities. A fitted \(\rho\) near zero suggests little estimated extra-binomial variation, but uncertainty can be large when there are few donors. A boundary estimate near zero, large standard errors, or strong residual patterns can indicate that the data do not support a stable dispersion estimate or that the mean and distributional assumptions need reconsideration. More cells per donor do not fix a shortage of independent donors.
| Approach | What it assumes or captures | Important limitation |
|---|---|---|
| Binomial regression | Cells are independent Bernoulli trials given modeled predictors. | Can understate uncertainty when donors vary beyond binomial sampling. |
| Beta-binomial regression | Donors are independent, with beta-distributed latent probabilities and a regression model for their mean. | Uses a particular distribution for donor heterogeneity and generally summarizes one cell type versus the rest. |
| Donor-level proportion analysis | Donors, rather than cells, supply the independent observations. | Can be straightforward, but needs a suitable method for proportions and may not use the count denominator as efficiently. |
The beta-binomial is not a remedy for every modeling problem. It does not automatically account for omitted donor covariates, dependence between distinct donors, uncertainty from cell-type classification, or every feature of a compositional outcome. Its strength is narrower: it gives a tractable count model for one cell type versus the rest while allowing extra-binomial donor-level variation.
Common Pitfall
- Wrong reasoning: “There are thousands of cells, so the condition comparison has thousands of independent replicates.”
- Correction: Cells from one donor share a donor-level probability and are correlated marginally under this model. The independent units for condition-level replication are donors. A beta-binomial likelihood uses the cell counts while representing extra variation across donors; it does not turn cells into independent donors.
- Also avoid: claiming that positive \(\rho\) inflates count variance when \(N_i=1\). The variance multiplier is \(1+(N_i-1)\rho\), which equals one in that case.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions below.
- For \(N_i=20\), \(\mu_i=0.15\), and \(\rho=0.02\), calculate the beta-binomial variance and the binomial variance.
- In the beta-binomial model, what does \(\rho\) represent, and why can cells from the same donor be correlated?
- A fitted condition coefficient is \(\widehat{\beta}_1=0.30\). State its odds-ratio interpretation for the modeled mean donor proportions.
- Why does adding many cells from one donor not necessarily substitute for adding independent donors?
Solutions. (1) The binomial variance is \(20(0.15)(0.85)=2.55\). The beta-binomial variance is \(2.55\{1+(20-1)(0.02)\}=2.55(1.38)=3.519\). (2) \(\rho\) is the intradonor correlation between distinct cell indicators induced by the shared latent probability \(q_i\); donors with different \(q_i\) have correlated cell outcomes after that probability is averaged over. (3) The odds ratio is \(\exp(0.30)=1.350\): the modeled odds of the mean donor proportion are 1.350 times as large in the condition coded one as in the reference condition, holding other modeled covariates fixed. (4) Cells within a donor share latent probability and are not marginally independent; additional donors contribute independent replication that helps estimate between-donor variation and condition effects.