Tutorials › Statistical Methods for Single-Cell RNA Sequencing › Confidence Intervals With Donor-Level Data

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

Confidence Intervals With Donor-Level Data

Build donor-level confidence intervals and judge what their width can—and cannot—tell you when donor counts are small.

Advanced 10 min read

What You'll Learn

  • Define the donor-population mean targeted by a confidence interval.
  • Construct a one-sample t interval from donor-level summaries.
  • Construct a Welch interval for a difference between independent group means.
  • Calculate standard errors, degrees of freedom, margins of error, and endpoints.
  • Explain why large cell counts do not eliminate uncertainty from having few donors.
  • Diagnose assumptions and choose between Welch, pooled-variance, and large-sample intervals.

Why the Number of Donors Shapes an Interval

A single-cell experiment may measure thousands of cells, but the target of an analysis can be a mean across donors. If the scientific question concerns that donor population, a confidence interval must reflect variation across donors—not treat every cell as an independent biological replicate. Many cells can make each donor’s summary more stable; they do not, by themselves, provide more independent donors.

Here, suppose each donor has a defined summary, such as the mean expression score for a gene in a specified cell type. The target \( \mu \) is the mean of that summary in the donor population of interest. A confidence interval uses the observed donor summaries to express sampling uncertainty about this target. For two independent groups, the target may instead be the difference between their donor-population means.

Definition: A donor-level confidence interval is an interval for a parameter defined across donors, calculated using donors as the independent observational units. A nominal 95% procedure has 95% coverage in repeated sampling under its assumptions: over repeated samples, about 95% of intervals constructed this way would contain the fixed target parameter. It does not mean there is a 95% probability that the parameter lies in one already-computed interval.

One-Sample t Interval for a Donor-Population Mean

Let \(X_i\) be the summary for donor \(i\), for \(i=1,\ldots,n\). The sample mean is \( \bar{x} \), and the sample standard deviation is \(s\). When donors are independent draws from a population with mean \( \mu \), and the donor-level values are normally distributed, the statistic \( (\bar{x}-\mu)/(s/\sqrt{n}) \) follows a t distribution with \(n-1\) degrees of freedom. This gives the following two-sided interval:

$$ \bar{x}\ \pm\ t_{1-\alpha/2,\,n-1}\frac{s}{\sqrt{n}}. $$

Here \(t_{1-\alpha/2,\,n-1}\) is the \(1-\alpha/2\) quantile of the t distribution. For a 95% interval, \( \alpha=0.05 \). The quantity \(SE=s/\sqrt{n}\) estimates the standard deviation of the sample mean across repeated samples of donors. The t critical value accounts for estimating the population standard deviation from the same donors; with fewer donors, it is larger.

Worked Example: A Mean Expression Score Across Donors

Suppose eight hypothetical donors have the following donor-level expression scores, in a prespecified score unit: 1, 2, 2, 3, 3, 4, 4, and 5. Assume these donors are independent and reasonably representative of the target donor population. The values are symmetric, with no extreme observation; for this small sample, the normality assumption remains important.

The sample mean is \( \bar{x}=24/8=3.00 \) score units. The sum of squared deviations from 3 is \(12\), so \(s^2=12/(8-1)=1.7143\) and \(s=\sqrt{1.7143}=1.3093\) score units. Thus:

$$ SE=\frac{1.3093}{\sqrt{8}}=0.4629\ \text{score units}. $$

For a 95% interval with \(df=7\), the critical value is approximately \(t_{0.975,7}=2.365\). The margin of error is \(2.365(0.4629)=1.095\) score units. Therefore:

$$ 3.00\pm1.095=[1.905,\ 4.095]\ \text{score units}. $$

Under the stated sampling and distribution assumptions, this procedure has 95% coverage for the donor-population mean. The interval is fairly wide relative to the mean, reflecting that only eight donors were observed.

The t interval is exact when donor summaries are independent and normally distributed with a common mean and variance. With a small \(n\), strong skewness, heavy tails, or an influential outlier can make that model unreliable. A larger cell count within each donor does not make the distribution of donor summaries normal, nor does it increase \(n\).

Interval for a Difference Between Independent Groups

For two groups of independent donors, let \( \bar{x}_1,\bar{x}_2 \) be the sample means, \(s_1,s_2\) the sample standard deviations, and \(n_1,n_2\) the donor counts. The target difference is \( \mu_1-\mu_2 \). Without assuming equal population variances, the Welch interval estimates the standard error by combining the two sample-mean variances:

$$ SE=\sqrt{\frac{s_1^2}{n_1}+\frac{s_2^2}{n_2}}, \qquad df\ \approx\ \frac{\left(s_1^2/n_1+s_2^2/n_2\right)^2} {\left(s_1^2/n_1\right)^2/(n_1-1)+\left(s_2^2/n_2\right)^2/(n_2-1)}. $$

The approximate degrees of freedom in this formula are the Welch–Satterthwaite degrees of freedom. They can be non-integer. The resulting interval is:

$$ (\bar{x}_1-\bar{x}_2)\ \pm\ t_{1-\alpha/2,\,df}\,SE. $$

This method requires independent donors within and between groups. For small samples, each group’s donor-level distribution should be reasonably compatible with normality and not dominated by severe outliers. Unlike the pooled two-sample t interval, Welch’s method does not require equal population variances. Its degrees of freedom are approximate, so coverage can still be imperfect in very small or highly non-normal samples.

Worked Example: A Difference Between Two Groups

In a hypothetical study, group 1 has \(n_1=4\) donors, mean score \(5.00\), and sample variance \(s_1^2=1.4317\) score units squared. Group 2 has \(n_2=5\) independent donors, mean score \(3.50\), and sample variance \(s_2^2=1.6269\) score units squared. These are donor-level summaries; suppose the donor observations within each group show no severe outliers. We seek a 95% interval for \( \mu_1-\mu_2 \).

The observed difference is \(5.00-3.50=1.50\) score units. The two estimated variance contributions are:

$$ \frac{1.4317}{4}=0.357925, \qquad \frac{1.6269}{5}=0.325380. $$

Therefore \(SE=\sqrt{0.357925+0.325380}=\sqrt{0.683305}=0.8266\) score units. The Welch degrees of freedom are:

$$ df\approx \frac{0.683305^2}{0.357925^2/3+0.325380^2/4} \approx 6.75. $$

The 97.5th percentile of the t distribution with about 6.75 degrees of freedom is approximately 2.383. The margin of error is \(2.383(0.8266)=1.970\) score units, giving:

$$ 1.50\pm1.970=[-0.470,\ 3.470]\ \text{score units}. $$

The interval includes zero and is broad: the data are compatible with group 1 having a lower mean, little difference, or a higher mean. This does not establish that the means are equal. It indicates substantial uncertainty about their difference under the model and sampling assumptions.

Why Few Donors Can Mean a Wide Interval

The standard error reflects both variability among donor summaries and the number of independent donors. In the one-sample case, \(SE=s/\sqrt{n}\), while the t critical value also depends on \(n-1\). Thus, few donors affect an interval twice: they leave less information to estimate the mean precisely and require a larger critical value. Large numbers of cells per donor may improve the precision of an individual donor’s summary, but the interval above is based on the observed spread across donor summaries.

Worked Example: Many Cells, Six Donors

Suppose six hypothetical donors each contribute 1,000 cells to a cell type, and their six donor-level scores have mean \(10.0\) units and standard deviation \(1.2\) units. Assume the donors are independent, the summaries have no severe outliers, and a normal model is reasonable for these six values. The donor-level standard error is:

$$ SE=\frac{1.2}{\sqrt{6}}=0.4899\ \text{units}. $$

For a 95% interval, \(df=5\) and \(t_{0.975,5}\approx2.571\). Hence the margin of error is \(2.571(0.4899)=1.259\) units, and the interval is \(10.0\pm1.259=[8.741,\ 11.259]\) units. The 6,000 cells do not change the donor count in this calculation: there are still six independent donor summaries. The width is governed by between-donor variation and the limited number of donors, not by the total number of cells alone.

If donor-level summaries themselves are noisy because few cells were captured for some donors, that within-donor estimation uncertainty may also matter. A simple t interval on the summaries does not automatically model it. The analysis should define the target and the data-generating process clearly rather than assume that every source of uncertainty disappears when cells are numerous.

Choosing and Checking an Interval

Welch’s interval is usually a sensible default for an independent two-group comparison when equal variances are not justified. A pooled-variance interval uses a shared variance estimate and is appropriate only when the group variances can reasonably be treated as equal; otherwise its standard error and coverage can be misleading. A normal-quantile interval substitutes a standard normal critical value, which can be useful with many independent donors, but can be too narrow with few donors because it does not account for estimating variability as fully as a t interval.

Before reporting an interval, check that the parameter matches the scientific question, that each donor contributes one appropriately defined summary, and that donors are the independent units for the intended inference. Inspect donor-level plots for skewness, outliers, batch patterns, and group differences in spread. With very few donors, such diagnostics have limited power: an unremarkable plot cannot verify normality. Report the number of donors per group, interval level, estimate, units, and method. Do not imply that the interval accounts for cell-level uncertainty unless the analysis explicitly incorporates it.

  • Pitfall: counting cells as replicates. “There are thousands of cells, so the interval must be narrow.” The correction is to use the number of independent donors for donor-population inference; cells nested within a donor do not become independent donors.
  • Pitfall: treating a 95% interval as a probability statement about the fixed parameter. The correction is that 95% describes the long-run coverage of the procedure under its assumptions.
  • Pitfall: interpreting an interval containing zero as proof of no group difference. The correction is that the interval shows a range of values compatible with the data and model; a wide interval can include both meaningful negative and positive differences.
Key takeaway: Donor-level confidence intervals quantify uncertainty for donor-population targets using donors as the replicates. Their width depends on donor-level variability and donor count; a large cell count alone cannot substitute for biological replication.

Check Your Understanding

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

  1. Seven independent donors have a mean summary of 4.0 units and a standard deviation of 1.4 units. What standard error is used in a one-sample t interval?
  2. For a 95% one-sample interval based on those seven donors, what are the degrees of freedom?
  3. Why is a Welch interval generally preferred to a pooled-variance interval when group variances may differ?
  4. A study has 20 donors per group and 50,000 cells per group. Which counts determine the donor-level standard error and why?
  5. A 95% interval for a group difference is \([-0.5, 2.0]\) units. Does this prove the groups have equal means? Explain.

Solutions. (1) \(SE=1.4/\sqrt{7}=0.5292\) units. (2) \(df=n-1=6\). (3) Welch’s standard error uses each group’s own variance and its degrees-of-freedom approximation, so it does not require equal population variances. (4) The 20 donors per group determine the donor-level sampling information; cells within donors are not independent biological replicates. (5) No. The interval includes zero, but also includes positive differences up to 2.0 units, so it does not establish equality and may leave meaningful differences plausible.

Clinical Biostats