Tutorials › Statistical Methods for Single-Cell RNA Sequencing › Unequal Cell Counts and Donor Influence

Biological Replication and Donor-Level Inference · Tutorial 442 of 700

Unequal Cell Counts and Donor Influence

Learn when cell counts improve the precision of a donor’s summary, when they alter the estimand, and how to measure the influence of donors with unequal numbers of sampled cells.

Advanced 10 min read

What You'll Learn

  • Distinguish precision of a within-donor summary from the number of biological replicates.
  • Derive how cell count affects the variance of a donor mean under stated assumptions.
  • Explain why cell-weighted and donor-weighted averages respond differently to unequal counts.
  • Calculate leave-one-donor-out changes to assess sensitivity to influential donors.
  • Diagnose when unequal counts or cell dependence make simple precision calculations unreliable.
  • Compare equal donor weighting with cell weighting and precision weighting.

Why Unequal Cell Counts Need Care

A single-cell dataset may contain many cells from one donor and far fewer from another. More cells can make a donor’s measured summary more precise, but they do not create additional biological replicates. Unequal counts can also affect an analysis in a different way: if donors are weighted in proportion to their cell counts, a donor with many cells can have much more influence on the reported average.

These are distinct issues. Precision concerns how variable a donor’s summary would be across repeated cell sampling from that donor. Influence concerns how much a donor’s inclusion, exclusion, or weight changes an overall estimate. Neither is the same as biological replication, which is determined by the number of independently sampled donors relevant to the question.

Definition: Let \(D\) be the number of donors, \(n_i\) the number of sampled cells from donor \(i\), and \(y_i\) a summary calculated for donor \(i\). A donor-weighted average assigns each donor equal weight, \(D^{-1}\sum_{i=1}^D y_i\). A cell-weighted average assigns donor \(i\) weight proportional to \(n_i\), giving \(\sum_{i=1}^D n_i y_i \big/ \sum_{i=1}^D n_i\). These averages generally describe different targets when the \(n_i\) differ.

The donor-weighted average describes the average donor summary in the sampled donor population, giving each donor the same contribution. The cell-weighted average describes an average that gives more representation to donors contributing more sampled cells. Which is appropriate depends on the estimand—the quantity the analysis is intended to describe—not on which average happens to be more convenient.

What More Cells Can—and Cannot—Make More Precise

Consider a fixed donor and a quantitative cell-level measurement \(X_{ij}\), where \(j=1,\ldots,n_i\) indexes the sampled cells from donor \(i\). If, conditional on that donor, the cells are independent draws with common mean \(\mu_i\) and variance \(\sigma_i^2\), then the donor’s sample mean \(\bar X_i\) has expectation \(\mu_i\) and variance \(\sigma_i^2/n_i\). Under these assumptions, increasing \(n_i\) reduces the cell-sampling variance of that donor’s mean.

That result is conditional on the donor. It describes repeat sampling of cells from that same donor; it does not describe variation between donors or increase the number of independently sampled donors. The independence assumption also matters. Cells from one donor may be correlated, so the variance need not decrease as quickly as \(\sigma_i^2/n_i\).

Key result: For \(n_i\) measurements with common marginal variance \(\sigma_i^2\) and common pairwise covariance \(c_i\) within a donor, the variance of their mean is \(c_i+(\sigma_i^2-c_i)/n_i\). When \(c_i=0\), this reduces to \(\sigma_i^2/n_i\). When \(c_i>0\), the variance approaches \(c_i\), rather than zero, as the cell count grows.

This expression follows by expanding the variance of a sum. Each of the \(n_i\) cells contributes variance \(\sigma_i^2\), and each of the \(n_i(n_i-1)\) ordered pairs contributes covariance \(c_i\). Dividing the variance of the sum by \(n_i^2\) gives:

$$ \operatorname{Var}(\bar X_i) =\frac{n_i\sigma_i^2+n_i(n_i-1)c_i}{n_i^2} =\frac{\sigma_i^2}{n_i}+\frac{n_i-1}{n_i}c_i =c_i+\frac{\sigma_i^2-c_i}{n_i}. $$

Thus, even if many cells yield a stable estimate of a particular donor’s summary, those cells do not supply the between-donor information needed to characterize a donor population. They can improve measurement within a donor, subject to dependence and other sources of error, while the biological replication remains the number of donors.

Worked Example: Comparing Cell-Sampling Precision

Suppose, hypothetically, that a gene-expression summary has within-donor cell-level standard deviation 2 units for each of two donors. Assume independent cell measurements within each donor. One donor contributes 25 cells and the other contributes 100 cells. What are the standard errors of their sample means under this model?

For independent observations, the standard error of a sample mean is the cell-level standard deviation divided by the square root of the cell count. For the donor with 25 cells:

$$ SE_1=\frac{2}{\sqrt{25}}=\frac{2}{5}=0.4000\text{ units}. $$

For the donor with 100 cells:

$$ SE_2=\frac{2}{\sqrt{100}}=\frac{2}{10}=0.2000\text{ units}. $$

Under the stated independence and equal-variance assumptions, the 100-cell mean has half the standard error of the 25-cell mean. This comparison concerns precision of each donor’s cell mean, not the number of biological replicates: there are still two donors.

If the within-donor cell measurements are positively correlated, these standard errors are too small for the stated cell counts. The independent-cell calculation should therefore not be used without considering whether its assumption is plausible.

Unequal Counts Change Weighting and Influence

A cell-weighted average can give a donor greater influence simply because that donor contributed more cells. This may be appropriate if the target is explicitly the average across all sampled cells. It is not automatically appropriate for a donor-population target: donors with more cells then represent a larger part of the estimate, whether or not they should represent a larger part of the population.

The effect can be seen directly from the formula. If donor \(i\) has summary \(y_i\) and cell count \(n_i\), the cell-weighted average is a weighted sum in which the weight for that donor is \(n_i/\sum_j n_j\). A change in \(y_i\) therefore changes the cell-weighted estimate in proportion to that weight. In contrast, the donor-weighted average assigns each donor weight \(1/D\), regardless of \(n_i\).

Worked Example: Correcting for the Effect of Removing a Donor

Consider a hypothetical four-donor dataset. The donor summaries are 2, 3, 4, and 8 score units, and the corresponding cell counts are 100, 100, 20, and 10. Calculate both averages, then calculate the change in each when the donor with summary 8 is omitted.

The donor-weighted average is:

$$ \frac{2+3+4+8}{4}=\frac{17}{4}=4.250\text{ score units}. $$

The cell-weighted average is:

$$ \frac{100(2)+100(3)+20(4)+10(8)}{100+100+20+10} =\frac{660}{230}=2.8696\text{ score units}. $$

After omitting the donor with summary 8, the donor-weighted average of the remaining three donors is \((2+3+4)/3=3.000\) score units. Its change from the original donor-weighted average is \(3.000-4.250=-1.250\) score units.

The remaining cell-weighted average is:

$$ \frac{100(2)+100(3)+20(4)}{100+100+20} =\frac{580}{220}=2.6364\text{ score units}. $$

The exact change in the cell-weighted average is:

$$ \frac{580}{220}-\frac{660}{230} =\frac{29}{11}-\frac{66}{23} =-\frac{59}{253} \approx -0.2332\text{ score units}. $$

The change is small because the omitted donor contributed only 10 of 230 cells, despite having the largest summary. The donor-weighted average changes more because each donor has equal weight there. Neither change is a measure of biological replication; both are sensitivity calculations that show how the chosen summary responds to omitting a donor.

Measuring Donor Influence

A useful descriptive diagnostic is the leave-one-donor-out change: calculate the estimate with all donors, then recalculate it after omitting each donor in turn. For an equal-weight donor average \(\bar y_D=D^{-1}\sum_i y_i\), the leave-one-out average for donor \(i\) is \(\bar y_{D,-i}=\sum_{j\ne i}y_j/(D-1)\). The signed change from the full estimate to the leave-one-out estimate is:

$$ \bar y_D-\bar y_{D,-i}=\frac{y_i-\bar y_{D,-i}}{D}. $$

To verify this, write \(\bar y_D=((D-1)\bar y_{D,-i}+y_i)/D\), then subtract \(\bar y_{D,-i}\). The change is large when donor \(i\)'s summary is far from the average of the other donors; with equal weighting, it is not made larger merely by having more cells.

Worked Example: Separating Count Influence From Donor Influence

Suppose, hypothetically, five donors have summaries 1, 2, 3, 4, and 10 units. Their cell counts are 10, 10, 10, 10, and 100, respectively. Compare the equal-weighted and cell-weighted estimates, and assess the impact of omitting the donor with summary 10.

The equal-weighted average is \((1+2+3+4+10)/5=4.000\) units. Omitting the donor with summary 10 gives \((1+2+3+4)/4=2.500\) units, a change of \(4.000-2.500=1.500\) units from the full estimate to the leave-one-out estimate.

The cell-weighted average is:

$$ \frac{10(1)+10(2)+10(3)+10(4)+100(10)}{10+10+10+10+100} =\frac{1100}{140}=7.857\text{ units}. $$

After omitting that donor, the cell-weighted estimate is \((10+20+30+40)/40=2.500\) units. Its change from the full cell-weighted estimate is \(2.500-7.857=-5.357\) units. The donor’s high value affects both summaries, but its 100 cells give it much greater weight in the cell-weighted estimate.

Diagnostics, Alternatives, and Limitations

Report the distribution of cell counts alongside donor-level summaries. Useful checks include plotting \(n_i\) against \(y_i\), identifying donors with unusually large counts, and calculating leave-one-donor-out changes under the intended weighting scheme. A strong relationship between count and summary warrants investigation: it may reflect biology, sample quality, capture efficiency, or another feature of the sampling process. The association alone does not establish its cause.

Common approaches answer different questions:

ApproachWhat receives more weight?Main caution
Equal donor weightingEvery donor contributes equallyDoes not account for differences in precision of donor summaries
Cell weightingDonors with more sampled cellsCan change the target and let high-count donors dominate
Precision weightingDonors estimated with greater precisionRequires defensible variance estimates and a target that justifies these weights

Precision weighting is not interchangeable with cell weighting. Cell count alone is not generally a complete measure of a donor summary’s precision, particularly when cells are dependent or donors differ in variability. Nor does assigning a weight based on estimated precision automatically make a donor-population average the right estimand. State the target first, then choose a method that matches it.

A count imbalance is a warning to examine the analysis, not proof that the result is biased. Conversely, similar counts do not make cell-level observations independent or turn cells into biological replicates. Donor-level conclusions remain limited by the number and representativeness of the donors; a large cell count cannot repair a small or unrepresentative donor sample.

Common mistake: “This donor supplied five times as many cells, so it counts as five biological replicates.” This confuses within-donor measurement with independent biological replication. More cells may improve the precision of that donor’s summary, under appropriate assumptions, but the donor still contributes one biological replicate. If the donor is given extra influence, that must be justified by the estimand or a specified precision-based method—not by treating the cells as separate donors.

Check Your Understanding

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

  1. Under independent within-donor sampling with standard deviation 3 units, what is the standard error of a donor mean based on 36 cells? What does it describe?
  2. Two donors have summaries 2 and 8 units, with 10 and 90 cells, respectively. Calculate the donor-weighted and cell-weighted averages.
  3. Why can a high cell count fail to make a donor summary arbitrarily precise?
  4. In an equal-weight average of four donor summaries, one donor is far above the other three. What diagnostic would show how much the overall average depends on that donor?
  5. Does a cell-weighted average always estimate the average donor summary? Explain.

Solutions. (1) \(SE=3/\sqrt{36}=0.5000\) units. It describes cell-sampling precision for that donor’s mean under the stated independence model, not uncertainty across donors. (2) The donor-weighted average is \((2+8)/2=5.000\) units. The cell-weighted average is \((10(2)+90(8))/100=740/100=7.400\) units. (3) Within-donor dependence can leave positive covariance among cells, so the variance of the mean can approach a positive value rather than zero as the count increases. (4) Recalculate the equal-weight average after omitting that donor and report the leave-one-donor-out change. (5) No. Unless all donors have equal cell counts, cell weighting gives more contribution to donors with more cells and generally targets a cell-weighted quantity rather than the average donor summary.

Clinical Biostats