Tutorials › Statistical Methods for Single-Cell RNA Sequencing › Power Analysis for Differential-Abundance Studies

Differential Abundance and Compositional Effects · Tutorial 543 of 700

Power Analysis for Differential-Abundance Studies

Use a donor-level model to estimate differential-abundance power and understand why increasing cells per donor cannot replace adding independent donors.

Advanced 12 min read

What You'll Learn

  • Define power for a specified differential-abundance effect and significance threshold.
  • Calculate donor-level proportion variance from baseline proportion, cell count, and between-donor variability.
  • Estimate two-group power using a normal approximation.
  • Plan donor numbers for a target power and effect size.
  • Explain why the benefit of additional cells approaches a limit as cell count grows.
  • Identify assumptions that can make a power calculation optimistic or misleading.

Why Power Depends on Donors as Well as Cells

A differential-abundance study can contain thousands of cells and still provide limited evidence about a condition difference if it includes few independent donors. Cells from the same donor share biological and technical influences, so treating them as independent replicates exaggerates the information available. Power planning must therefore distinguish the number of donors from the number of cells measured per donor.

This tutorial develops a transparent planning calculation for one cell type versus the rest in two independent groups. It connects baseline proportions, between-donor variability, cells per donor, and the expected difference to the probability of detecting that difference. The calculation is an approximation for planning, not a guarantee about the result of a fitted model.

Definition: For a specified alternative effect and testing procedure, power is the probability of rejecting \(H_0\) when that alternative is true. It equals \(1-\beta\), where \(\beta\) is the probability of a Type II error under the specified alternative. Power depends on the effect, donor-level variability, sample size, significance level \(\alpha\), and the analysis procedure.

A Donor-Level Variance Model

Consider one cell type in two independent conditions, indexed by \(g=0,1\). For donor \(i\) in condition \(g\), let \(q_{ig}\) be that donor's underlying proportion of the cell type, and let \(Y_{ig}\) be the observed proportion among \(m\) sampled cells. Thus \(Y_{ig}=K_{ig}/m\), where \(K_{ig}\) is the observed cell count for that type. The condition-level mean proportion is \(p_g=E(q_{ig})\).

Use a beta-binomial-style model as a planning approximation: donor proportions vary around \(p_g\), with \(\operatorname{Var}(q_{ig})=\rho p_g(1-p_g)\), and conditional on \(q_{ig}\), \(K_{ig}\) follows a binomial distribution with size \(m\) and probability \(q_{ig}\). Here \(\rho\) is the intradonor correlation, between zero and one. It summarizes how much donor-level heterogeneity remains after accounting for ordinary cell-sampling variation. Donors are assumed independent, and for this calculation each donor contributes the same number of cells.

By the law of total variance, the variance of a donor's observed proportion is

$$ \begin{aligned} \operatorname{Var}(Y_{ig}) &= \operatorname{Var}\{E(Y_{ig}\mid q_{ig})\} + E\{\operatorname{Var}(Y_{ig}\mid q_{ig})\}\\ &= \operatorname{Var}(q_{ig}) + E\{q_{ig}(1-q_{ig})/m\}\\ &= p_g(1-p_g)\left\{\rho+\frac{1-\rho}{m}\right\}. \end{aligned} $$

The last equality follows because \(E(q_{ig}^2)=p_g^2+\rho p_g(1-p_g)\), so \(E\{q_{ig}(1-q_{ig})\}=p_g(1-p_g)(1-\rho)\). This decomposition separates between-donor variation, \(\rho p_g(1-p_g)\), from cell-sampling variation, which decreases as \(m\) increases.

Suppose there are \(n\) independent donors in each condition, and the target contrast is the difference in mean proportions, \(\Delta=p_1-p_0\). The standard error for the difference in donor-level means is approximated by

$$ SE(\widehat{\Delta})= \sqrt{ \frac{p_0(1-p_0)\{\rho+(1-\rho)/m\}}{n} + \frac{p_1(1-p_1)\{\rho+(1-\rho)/m\}}{n} }. $$

For a two-sided Wald test at significance level \(\alpha\), approximate the standardized estimate under the alternative by a normal distribution with mean \(\lambda=\Delta/SE(\widehat{\Delta})\) and variance one. If \(\Phi\) is the standard normal cumulative distribution function and \(z_{1-\alpha/2}\) is its \(1-\alpha/2\) quantile, the approximate power is

$$ \operatorname{Power}\approx \Phi(-z_{1-\alpha/2}-\lambda) + \Phi(\lambda-z_{1-\alpha/2}). $$

This expression counts both rejection tails. It uses the planning standard error as if it were known; with small donor numbers, uncertainty in variance estimation and the actual model's degrees of freedom can make this normal approximation inaccurate.

Worked Power Calculations

Worked Example: Eight Donors per Condition

Suppose a hypothetical study plans \(n=8\) donors per condition, with \(m=300\) cells per donor, \(\rho=0.05\), baseline proportions \(p_0=0.20\) and \(p_1=0.25\), and a two-sided \(\alpha=0.05\). Assume the donor-level model above is a reasonable approximation and the donors are independent. The expected difference is \(\Delta=0.25-0.20=0.05\), or 5 percentage points.

The cell-count factor is \(0.05+0.95/300=0.0531667\). The two baseline variance terms sum to \(0.20(0.80)+0.25(0.75)=0.16+0.1875=0.3475\). Therefore,

$$ SE(\widehat{\Delta})= \sqrt{\frac{0.3475(0.0531667)}{8}} =\sqrt{0.00230943} \approx 0.04806. $$

Thus \(\lambda=0.05/0.04806\approx1.040\). With \(z_{0.975}=1.960\), approximate power is

$$ \Phi(-1.960-1.040)+\Phi(1.040-1.960) =\Phi(-3.000)+\Phi( -0.920) \approx 0.1801. $$

Under these assumptions, the study has about 18.01% power to detect this 5-percentage-point difference using the specified two-sided test. The low power reflects the small donor count relative to the donor-level variability; it does not mean there is an 18.01% probability that the difference is real.

Worked Example: Increasing Cells per Donor

Keep the preceding hypothetical design unchanged except increase the number of cells per donor from 300 to 3,000. The donors remain the independent replicates, so \(n=8\); assume the same \(\rho\), baseline proportions, effect, and test.

Now the cell-count factor is \(0.05+0.95/3000=0.0503167\). Hence

$$ SE(\widehat{\Delta})= \sqrt{\frac{0.3475(0.0503167)}{8}} =\sqrt{0.00218563} \approx 0.04675, \qquad \lambda=\frac{0.05}{0.04675}\approx1.070. $$

The two-sided power is

$$ \Phi(-1.960-1.070)+\Phi(1.070-1.960) =\Phi(-3.030)+\Phi(-0.890) \approx 0.1880. $$

Increasing cells tenfold raises estimated power only from about 0.1801 to 0.1880. The reason is visible in the variance factor: as \(m\) grows, \(\rho+(1-\rho)/m\) approaches \(\rho=0.05\), rather than zero. More cells reduce sampling noise within each donor, but do not remove genuine differences among donors.

Choosing a Donor Count

The same calculation can be rearranged to plan \(n\). A convenient approximation for a two-sided test with target power \(1-\beta\) is to choose \(n\) so that the noncentrality is about \(z_{1-\alpha/2}+z_{1-\beta}\). This neglects the usually small probability in the opposite rejection tail, so the resulting donor count is a starting point that should be checked by evaluating the full power expression and, when needed, by simulation.

Worked Example: Planning for Approximately 80% Power

For a hypothetical study, suppose \(p_0=0.20\), \(p_1=0.30\), \(\rho=0.05\), \(m=500\) cells per donor, and \(\alpha=0.05\). The target effect is \(\Delta=0.10\). Assume equal group sizes and independent donors. The cell-count factor is \(0.05+0.95/500=0.0519\), and the sum of the two proportion terms is \(0.20(0.80)+0.30(0.70)=0.16+0.21=0.37\). Thus the squared standard error is \(0.37(0.0519)/n=0.019203/n\).

For 80% target power, \(z_{0.80}\approx0.8416\). The approximate donor count per condition is

$$ n\approx \frac{0.019203\{z_{0.975}+z_{0.80}\}^2}{0.10^2} = \frac{0.019203(1.960+0.8416)^2}{0.0100} \approx 15.08. $$

Round up to 16 donors per condition. Checking with the full normal approximation, \(SE=\sqrt{0.019203/16}\approx0.03464\), so \(\lambda=0.10/0.03464\approx2.887\). The power is \(\Phi(-1.960-2.887)+\Phi(2.887-1.960)\approx0.823\). At 15 donors per condition, the corresponding power is approximately \(0.798\), just below 80%. This check supports the rounded plan, subject to the assumptions and approximation.

Assumptions, Diagnostics, and Alternatives

A useful calculation requires inputs that describe the planned analysis and the intended population. The baseline proportions should be plausible for the study population; the effect should be specified in the same scale as the test (here, an absolute proportion difference); and \(\rho\) should reflect donor-to-donor heterogeneity for that cell type and setting. The calculation also assumes comparable cell counts, independent donors, and no unmodeled design features such as pairing, clustering, or major covariate adjustment. If group sizes or cell counts vary, use the planned allocation and a model that represents that variation rather than inserting a single average without checking its adequacy.

The model is deliberately for one cell type versus the rest. Cell-type proportions are compositional: changing one component constrains the others, and the biological interpretation of a proportion change is not automatically a change in absolute cell number. The power calculation targets a difference in the specified observed proportion, under its stated model. It does not establish that the observed proportion is an unbiased measure of the underlying absolute abundance.

Several checks help reveal when the approximation may be unreliable:

  • Compare the assumed baseline proportions and between-donor variability with relevant pilot data, while accounting for the uncertainty in those estimates.
  • Check whether the planned donor-level proportions are so sparse or unstable that a normal approximation is doubtful, especially for rare cell types or many zero counts.
  • Examine whether donors are independent and whether the groups have comparable cell yields. A large total cell count does not compensate for a small number of donors.
  • Repeat the calculation over a range of plausible effects, \(\rho\), and baseline proportions. A single power value can conceal substantial sensitivity to these inputs.

An analytic calculation is fast and makes the role of each input visible. A more flexible alternative is simulation: generate donor-level proportions and cell counts under a specified model, apply the intended analysis to each simulated study, and estimate power as the fraction of simulations that reject \(H_0\). Simulation can accommodate unequal cell counts, covariates, and more complex sampling, but it is only as credible as the data-generating model and fitted testing procedure. A naive binomial calculation that treats every cell as an independent replicate is not a valid substitute when cells within donors are correlated; it generally understates uncertainty and overstates power.

Why Donors Have a Long-Run Advantage

The limit as \(m\) increases makes the design trade-off precise. For each group, the variance of a donor-level proportion tends to \(\rho p_g(1-p_g)\), because \((1-\rho)/m\) tends to zero. Consequently, for equal donor counts, the variance of the difference tends to

$$ \operatorname{Var}(\widehat{\Delta}) \longrightarrow \frac{\rho\{p_0(1-p_0)+p_1(1-p_1)\}}{n} \quad\text{as }m\longrightarrow\infty. $$

This limit is positive whenever \(\rho>0\) and the proportions are not at the boundaries. In contrast, increasing the number of independent donors reduces the variance in proportion to \(1/n\), under the model. Thus increasing cells per donor can improve precision initially, but its benefit plateaus; adding donors continues to reduce uncertainty. This is a statistical distinction, not a claim that collecting more cells is never useful: additional cells may improve cell-type characterization or reduce sampling noise when cell counts are low.

Key takeaway: For differential-abundance power, plan around independent donors first. Cells per donor affect within-donor sampling variance, while between-donor heterogeneity creates a precision floor that more cells alone cannot eliminate.

Common Mistakes

  • Counting cells as independent replicates. The incorrect reasoning is that thousands of cells imply thousands of independent observations. The correction is to model donor clustering and use donors as independent replicates when treatment or condition is assigned at the donor level.
  • Assuming more cells always solve low power. This ignores the variance limit \(\rho p_g(1-p_g)\). Once within-donor sampling noise is small, additional independent donors are usually more informative for the condition contrast.
  • Reporting power without its assumptions. Power is not an intrinsic property of a study; it is conditional on an effect size, variance model, donor allocation, significance level, and analysis procedure.
  • Interpreting power as the probability the alternative is true. Power is the rejection probability under a specified alternative, not a posterior probability about the hypothesis after seeing data.

Check Your Understanding

Try each question, then compare your reasoning with the solutions.

  1. If \(m\) increases while \(n\), \(\rho\), and the effect remain fixed, what part of the donor-level variance decreases, and what part remains?
  2. With positive \(\rho\), why can adding cells not drive the variance of the estimated group difference to zero?
  3. Suppose a design has a larger expected \(|\Delta|\) but all other inputs are unchanged. What happens to \(|\lambda|\), and generally to two-sided power?
  4. Why is a cell-level binomial calculation that treats all cells as independent likely to overstate power?

Solutions. (1) The cell-sampling term \(p_g(1-p_g)(1-\rho)/m\) decreases; the between-donor term \(\rho p_g(1-p_g)\) remains. (2) As \(m\) tends to infinity, the group-difference variance tends to \(\rho\{p_0(1-p_0)+p_1(1-p_1)\}/n\), which is positive under the stated conditions. (3) The absolute noncentrality \(|\lambda|=|\Delta|/SE\) increases, so power generally increases for the same two-sided threshold. (4) Cells from one donor share donor-level variation and are correlated; treating them as independent omits that source of uncertainty and makes the standard error too small.

Clinical Biostats