Why the Donor Is the Replicate
A two-group comparison in single-cell RNA sequencing may involve thousands of cells but only a small number of biological replicates. If the scientific question concerns a difference between donor populations, the independent observations for inference are the donors, not the cells from those donors. First construct the specified summary for each donor—for example, a cell-type-specific mean expression value—and then compare those donor-level values across groups.
This tutorial considers two independent groups: each donor belongs to one group, and no donor contributes a paired observation to both. Let \(Y_{1i}\) be the summary for donor \(i\) in group 1 and \(Y_{2j}\) the summary for donor \(j\) in group 2. The group donor-population means are \(\mu_1\) and \(\mu_2\); the target difference is \(\Delta=\mu_1-\mu_2\). The sign of the difference follows the stated group order.
The choice of donor summary and target population matters: the mean of donor summaries is not automatically the same estimand as a cell-weighted mean. Here, each donor contributes one value with equal weight within its group. The introductory material on donor-level summaries and equal weighting explains those choices; the present focus is how to compare the resulting donor-level means.
Welch’s Two-Sample Procedure
Welch’s two-sample t procedure is a standard choice when comparing independent means without assuming that the two groups have equal variances. For each group, calculate the donor-level mean \(\bar{Y}_g\) and sample variance \(s_g^2\). The estimated difference is \(\bar{Y}_1-\bar{Y}_2\). Its standard error is estimated using the variance of each group mean:
Here \(\Delta_0\) is the difference specified by the null hypothesis, commonly zero. A two-sided test of no mean difference uses \(H_0:\Delta=0\) and \(H_a:\Delta\ne 0\). Welch’s approximate degrees of freedom are
The reference distribution is a t distribution with these approximate degrees of freedom. The two-sided p-value is the probability, under \(H_0\) and the procedure’s assumptions, of obtaining a t statistic at least as far from zero as the observed statistic. The degrees of freedom depend on donor counts and the two groups’ estimated variances; they are not calculated from the number of cells.
Why the Standard Error Has This Form
Suppose donors are independent within and across groups, with finite variances \(\sigma_1^2\) and \(\sigma_2^2\). The variance of a sample mean from group \(g\) is \(\sigma_g^2/n_g\). Independence means the variance of a difference is the sum of the two variances, so
Replacing the unknown population variances with the group sample variances gives the squared estimated standard error. Studentizing the difference—that is, dividing its deviation from the null value by this estimated standard error—produces the Welch t statistic. Because the variances are estimated separately, its reference degrees of freedom are approximated by the formula above. With normally distributed donor summaries and unequal variances, this approximation is generally not an exact t distribution; the procedure is an approximation whose quality can be limited when donor counts are small.
Worked Example: Testing a Difference With Five Donors Per Group
All numbers in this example are hypothetical. Suppose a specified cell-type expression summary, in normalized expression units, is calculated once for each donor. Group 1 has \(n_1=5\), mean \(\bar{Y}_1=4.0\), and variance \(s_1^2=0.7\). Group 2 has \(n_2=5\), mean \(\bar{Y}_2=4.6\), and variance \(s_2^2=0.7\). Assume the donors are independent and the summaries are comparable. Test \(H_0:\Delta=0\) against \(H_a:\Delta\ne0\).
The observed difference is \(4.0-4.6=-0.6\) normalized expression units. The estimated standard error is
Thus \(t=(-0.6-0)/0.5292\approx-1.134\). The Welch degrees of freedom are
For a two-sided test, the p-value is approximately \(0.2897\). At significance level \(\alpha=0.05\), this is not sufficient evidence to reject \(H_0\). The estimate is 0.6 units lower in group 1, but this small donor sample leaves substantial uncertainty about the population mean difference. The result does not establish that the group means are equal.
Worked Example: Unequal Variances and Unequal Donor Counts
All numbers are hypothetical. Suppose group 1 has 8 independent donors, with a mean summary of 2.4 units and sample standard deviation \(s_1=0.4\) units. Group 2 has 6 independent donors, with mean 1.8 units and \(s_2=0.6\) units. The donor summaries are comparable, and the two groups are independent. Test for a two-sided difference from zero.
The estimated difference is \(2.4-1.8=0.6\) units. The standard error is
The test statistic is \(t=0.6/0.2828\approx2.121\). The approximate degrees of freedom are
The two-sided p-value is approximately \(0.066\). At \(\alpha=0.05\), the result does not meet the rejection threshold. This does not mean the estimated difference is zero: the observed difference is 0.6 units, while the available donor-level evidence is not sufficiently precise to distinguish it from zero by this test.
Checking the Analysis and Choosing an Approach
Before interpreting a t test, inspect the donor-level values, not a plot in which every cell appears to be an independent observation. Look for data-entry or summary errors, extreme donors, strong skewness, and group-specific distribution shapes. With few donors, a single unusual donor can materially change a mean, standard deviation, and test statistic. A diagnostic plot cannot prove that assumptions hold, but it can reveal problems that make the normal approximation questionable.
Also verify that the design really is independent. If donors are matched, repeatedly measured, or contribute to both conditions, the independent-groups procedure does not represent the dependence structure. Do not create extra replicates by splitting one donor’s cells into subsets. Those subsets share the donor and are not independent biological replicates.
Welch’s procedure is often preferred over the pooled-variance two-sample t test when equal variances are not well supported. The pooled test assumes a common population variance and uses a pooled estimate; when that assumption is true, it can be efficient, but unequal variances—especially combined with unequal group sizes—can distort its uncertainty assessment. A paired analysis is appropriate for a genuinely paired design, not as a substitute for the independent-groups test. Other methods may be considered when donor-level distributions are severely non-normal or donor counts are very small, but they require their own assumptions and do not make cells independent.
| Approach | What it assumes or uses | Key caution |
|---|---|---|
| Welch two-sample t procedure | Independent donor summaries; estimates each group variance separately | Small donor counts and unusual distributions can make the approximation fragile |
| Pooled two-sample t procedure | Independent groups with a common population variance | Do not pool variances merely because a formal variance test is not significant |
| Paired procedure | A meaningful one-to-one pairing and inference on within-pair differences | Not appropriate for unrelated donors |
The procedure estimates a difference in group means; it does not by itself establish a causal effect. In observational data, group membership may be associated with other donor characteristics. Moreover, if many genes or cell types are tested, multiplicity requires attention beyond interpreting one unadjusted p-value. Most importantly, more cells can improve the precision of each donor summary, but biological replication and the uncertainty in a group comparison are governed by the number and variability of donors.
Common Mistakes and Limitations
- Counting cells as replicates. The wrong reasoning is that thousands of cells imply thousands of independent observations. The correction is to use one prespecified summary per donor for donor-population inference; cells within a donor are clustered.
- Reading a large p-value as proof of equality. A non-small p-value says the data do not provide strong evidence against the null under the model. It does not demonstrate that \(\Delta=0\); small donor samples may have low precision.
- Assuming equal variances without justification. The pooled test requires a common variance. Welch’s procedure avoids that requirement by estimating the two variances separately.
- Ignoring the direction of subtraction. State whether the estimate is group 1 minus group 2. Reversing the group order changes the sign, though not the two-sided p-value.
- Overstating generalizability. Inference to a donor population depends on how donors were sampled and on the target population. A statistically significant difference is not automatically causal or clinically important.
Worked Example: Distinguishing an Estimated Effect From Evidence
All values are hypothetical and in normalized expression units. Four independent donors in group 1 have mean 0.30 and standard deviation 0.20; four independent donors in group 2 have mean 0.10 and standard deviation 0.20. Assume comparable summaries, independent groups, and a common variance for this illustration. The estimated difference is \(0.20\) units.
The pooled variance is \(s_p^2=[(4-1)(0.20^2)+(4-1)(0.20^2)]/(4+4-2)=0.04\), so \(s_p=0.20\). The pooled standard error is
The statistic is \(t=0.20/0.1414\approx1.414\), with \(df=4+4-2=6\). The two-sided p-value is approximately \(0.207\). The estimate favors a higher mean in group 1, but this small sample does not provide strong evidence of a nonzero population difference at the 0.05 level. The magnitude of the estimate and the strength of evidence answer different questions.
Check Your Understanding
Try each question, then compare your reasoning with the solutions.
- Two independent groups have donor-level means 3.2 and 2.7 units. Which group difference is reported if the defined contrast is group 1 minus group 2?
- Why does adding cells to the same donors not increase \(n_1\) or \(n_2\) in donor-level inference?
- For \(n_1=4\), \(n_2=6\), \(s_1^2=1\), and \(s_2^2=4\), calculate the Welch standard error.
- A two-sided test gives \(p=0.18\) at \(\alpha=0.05\). What conclusion is justified, and what conclusion is not?
Solutions. (1) The contrast is \(3.2-2.7=0.5\) units; the sign is positive because group 1 has the larger sample mean. (2) The independent replicates are donors. More cells may improve each donor’s summary, but cells from the same donor are not additional independent donors. (3) \(SE=\sqrt{1/4+4/6}=\sqrt{0.9167}\approx0.9574\) units. (4) At the 0.05 level, the result does not provide sufficient evidence to reject the null. It does not prove the population means are equal or show that the null hypothesis is true.