Tutorials › Statistical Methods for Single-Cell RNA Sequencing › Factorial Designs for Multiple Conditions

Multi-Sample and Multi-Condition Study Designs · Tutorial 573 of 700

Factorial Designs for Multiple Conditions

Learn to build and assess factorial allocations that represent every planned combination of conditions and support interpretable main-effect comparisons.

Advanced 12 min read

What You'll Learn

  • Define factorial factors, levels, and treatment combinations for a single-cell study.
  • Distinguish the experimental unit from the cells measured within each unit.
  • Allocate replicates across all combinations to support comparisons without relying on missing-cell assumptions.
  • Calculate balanced marginal means and main effects from hypothetical data.
  • Diagnose incomplete allocation, unequal weighting, and condition–batch overlap.
  • Compare factorial allocation with one-factor-at-a-time approaches.

Why Arrange Conditions Factorially?

A study that changes several conditions can answer more than one question, but only if its allocation makes the relevant comparisons possible. For example, investigators might study two stimulation states and two drug conditions. A factorial design includes the combinations of stimulation and drug, rather than varying just one factor while holding the other at a single level. That arrangement lets the study represent each combination and compare factor levels across the levels of the other factor.

In single-cell RNA sequencing, the experimental units are usually biological samples such as donors or independently prepared specimens, not the many cells measured from each sample. The allocation should therefore be described in terms of those units. Cells within a sample provide measurements on that sample; they do not turn one donor into many independent biological replicates. A design can have a large number of cells and still have too few independent units in a condition.

Definition: A factor is a study characteristic with specified levels, such as drug condition (vehicle or drug) or stimulation (unstimulated or stimulated). A factorial design includes the planned combinations of levels across two or more factors. Each combination is a treatment combination or factor combination. A replicate is an independent experimental unit allocated to a combination; in a donor-based study, it is generally a donor or other independently sampled biological unit, not an individual cell.

With two factors, A and B, containing \(a\) and \(b\) levels, respectively, there are \(ab\) possible combinations. With more factors, the number of combinations is the product of the numbers of levels. A full factorial allocation includes every planned combination. Replication means allocating more than one independent unit to combinations, so that observed outcomes are not represented by a single unit alone.

A main effect describes a comparison between levels of one factor averaged over levels of the other factor. The averaging rule matters. In a balanced design, the natural marginal mean gives equal weight to each level of the other factor. In an unbalanced design, an investigator should define the target weights in advance; simply pooling all observations can make combinations with more replicates dominate the comparison. If the effect of one factor differs across levels of another, an overall average may conceal that variation. The observed combination means should therefore remain visible when reporting marginal comparisons.

Conditions for Interpretable Comparisons

The allocation is the foundation for comparisons, but it does not by itself guarantee valid inference. A simple model for a donor-level outcome \(Y_{ijk}\), measured for replicate \(k\) at level \(i\) of factor A and level \(j\) of factor B, is

$$ Y_{ijk} = \mu_{ij} + \varepsilon_{ijk}. $$

Here \(\mu_{ij}\) is the mean outcome for combination \((i,j)\), and \(\varepsilon_{ijk}\) is the replicate's deviation from that mean. For the usual simple comparisons, assume independent experimental units, errors with mean zero, and a variance model appropriate to the analysis. A conventional pooled-variance analysis also assumes a common variance across combinations; normal errors are additionally used for exact small-sample \(t\)- or \(F\)-based inference. The allocation principle—having observed units in each combination—does not require normality, but distributional and variance assumptions matter when attaching standard errors and tests.

If the same donor contributes samples to multiple combinations, those observations are not independent. The design can still be factorial, but analysis must account for the within-donor dependence rather than treating each aliquot or cell as an independent donor. Likewise, if a condition combination is processed only in a unique batch, the condition comparison can be entangled with processing. The design should distribute combinations across relevant sources of variation where feasible; a factorial label cannot repair a lack of independent allocation.

Key design principle: To estimate unrestricted means for every planned factor combination directly, include independent experimental units in every combination. This supports comparisons among observed combination means without substituting an unobserved mean or imposing an additive model to predict it. Replication within combinations supports assessment of unit-to-unit variability; it does not replace coverage of the combinations.

How Balanced Marginal Comparisons Work

Suppose there are two levels of A and two levels of B, with \(r\) independent replicates in each combination. Let \(\bar{Y}_{ij}\) be the sample mean for combination \((i,j)\). The equal-weight marginal mean for level \(i\) of A is the average of its two combination means. Its expectation is the corresponding average of the combination means because each cell mean is unbiased for its cell mean under the model.

$$ E\left(\frac{\bar{Y}_{i1}+\bar{Y}_{i2}}{2}\right) = \frac{E(\bar{Y}_{i1})+E(\bar{Y}_{i2})}{2} = \frac{\mu_{i1}+\mu_{i2}}{2}. $$

Thus, subtracting the marginal mean for A level 1 from that for A level 2 estimates the equal-weight average difference between those levels across B. This interpretation follows from the allocation and the stated weighting rule; it does not assert that the difference is identical at both B levels. In a balanced design, each cell contributes equally to the corresponding marginal average. In an unbalanced design, the same target can be calculated from cell means with prespecified weights, but raw pooled averages may target a different quantity.

Worked Example: A Balanced Two-Factor Allocation

Suppose 32 hypothetical independent donors are randomly allocated equally to a \(2 \times 2\) study of drug (vehicle or drug) and stimulation (off or on). Each of the four combinations receives eight donors. For illustration, suppose the donor-level mean expression summaries, in a specified normalized expression unit, are:

Drug conditionStimulation offStimulation on
Vehicle8 units12 units
Drug10 units18 units

The equal-weight marginal mean under drug is \((10+18)/2=14\) units. Under vehicle it is \((8+12)/2=10\) units. The marginal drug-minus-vehicle comparison is therefore \(14-10=4\) units. Because both stimulation levels are represented equally in both drug groups, this comparison averages over the same two stimulation conditions.

The stimulation-on marginal mean is \((12+18)/2=15\) units, while the stimulation-off mean is \((8+10)/2=9\) units. The marginal on-minus-off comparison is \(15-9=6\) units. The four cell means remain important context: the drug-versus-vehicle difference is \(10-8=2\) units with stimulation off and \(18-12=6\) units with stimulation on. A single marginal comparison averages these differences; it should not be described as the difference at each stimulation level.

This example concerns allocation and interpretation, not evidence of a real drug effect. The numerical summaries are hypothetical, and no uncertainty or statistical significance can be assessed from cell means alone. The stated design has eight independent donors per combination, but an analysis would still need donor-level variability and an appropriate model.

More Than Two Levels

Factorial allocation is not limited to two-level factors. A factor with three levels crossed with a factor with two levels has six combinations. To make equal-weight marginal comparisons, each level of the first factor should be represented at each level of the second; equal replication across all six combinations also makes the allocation straightforward to summarize. When the allocation is unequal, define which combinations receive equal weight in the target comparison rather than letting sample counts silently determine the scientific question.

Worked Example: A Two-by-Three Allocation

Consider a hypothetical study of two drug doses (low and high) crossed with three stimulation settings (none, mild, and strong). Suppose 36 independent donors are randomized equally, with six donors in each of the six combinations. The hypothetical mean donor-level outcome, in assay units, is:

Drug doseNoneMildStrong
Low479
High81015

The equal-weight high-dose marginal mean is \((8+10+15)/3=11\) assay units. The low-dose marginal mean is \((4+7+9)/3=20/3=6.667\) assay units. The equal-weight high-minus-low marginal comparison is therefore \(11-6.667=4.333\) assay units, or equivalently \(\{(8-4)+(10-7)+(15-9)\}/3=(4+3+6)/3=4.333\) assay units.

All three stimulation settings contribute equally to this defined comparison because the design is balanced and the target uses equal weights. The individual dose differences (4, 3, and 6 assay units) are not identical. The marginal comparison summarizes their average; interpreting it as a constant dose difference at every stimulation setting would go beyond the calculation.

When a Combination Is Missing

A design may fail to include one or more combinations because of limited recruitment, feasibility constraints, or a planning error. In that case, some combination means are unobserved. If the scientific target requires equal-weight averages over all levels, a missing combination prevents direct calculation of those marginal means from observed data alone. An additive model might predict a missing mean by assuming that one factor's effect does not vary over the other factor, but that is an additional modeling assumption, not a result supplied by the allocation.

Worked Example: An Incomplete Two-by-Two Allocation

Suppose a hypothetical study plans drug (vehicle or drug) crossed with stimulation (off or on), but allocates donors only to three combinations. Assume the observed donor-level means are 5 units for vehicle/off, 9 units for vehicle/on, and 7 units for drug/off; no donor receives drug/on.

The equally weighted vehicle marginal mean is available: \((5+9)/2=7\) units. The equally weighted drug marginal mean would require \((7+\mu_{\text{drug,on}})/2\), but \(\mu_{\text{drug,on}}\) has no observed cell mean. Therefore the equal-weight drug-minus-vehicle marginal comparison cannot be calculated directly from the observed combination means.

One could impose an additive assumption that the drug difference is the same with stimulation off and on. Under that assumption, the observed drug-minus-vehicle difference with stimulation off is \(7-5=2\) units, and the unobserved drug/on mean would be predicted as \(9+2=11\) units. But 11 is a model-based prediction, not a measured combination mean. Without that assumption or additional data, the missing combination remains unsupported. The appropriate design remedy, when feasible, is to allocate independent donors to drug/on as well.

Diagnostics, Alternatives, and Limitations

Before data collection, make a table with one row per planned combination and record the intended number of independent experimental units in each. Check that every scientifically relevant combination is represented, that replication is not merely a large cell count from a small number of donors, and that the target marginal comparisons have a clearly stated weighting rule. After allocation, compare planned and actual donor counts by combination. Examine whether missing specimens or exclusions have left a combination empty or very sparsely represented.

Also check whether combinations overlap with collection or processing factors. For instance, if all drug-treated samples are processed in one batch and all vehicle samples in another, the observed difference may reflect either condition or batch. This is a design limitation, not something that more cells from the same samples can resolve. The detailed diagnosis of condition–batch confounding requires a separate allocation assessment.

ApproachWhat it providesMain limitation
Full factorial allocationObserved means for every planned combination; supports marginal comparisons using stated weights.Requires resources across all combinations; adequate independent replication still matters.
One-factor-at-a-time allocationCan compare levels of one factor while other conditions are held fixed.Does not directly represent combinations across multiple changing factors; may miss differences in effects across conditions.
Incomplete combination allocationCan provide data for selected combinations when some are infeasible.Some combination means and target marginal comparisons may require assumptions or remain unavailable.

A factorial design is not automatically the best design for every study. A large number of factors or levels can create many combinations and strain recruitment or laboratory capacity. If the study deliberately omits combinations, investigators must identify which comparisons remain supported and which rely on assumptions. Nor does a balanced allocation guarantee precise estimates: precision depends on independent replication and variability, as well as the analysis. The purpose of factorial planning is to make the intended comparisons structurally possible, not to promise a particular statistical result.

Common Mistakes

  • Counting cells as independent replicates. Thousands of cells from a donor do not equal thousands of independent donors. Count and allocate the biological experimental units.
  • Reporting a marginal effect as universal. An average across levels of another factor does not establish that the comparison is identical at every level. Keep combination-level results available.
  • Allowing sample size to define the estimand accidentally. In an unbalanced design, a pooled average can weight combinations unequally. State the target weights and calculate accordingly.
  • Assuming an empty combination is harmless. A missing cell mean cannot be recovered from the allocation alone. Any model-based substitute depends on added assumptions.
  • Equating full crossing with adequate design quality. Every combination can be represented while replication is too sparse, units are dependent, or condition is entangled with batch.
Key takeaway: List the levels of each factor, enumerate their combinations, and allocate independent biological units across those combinations. Then define the marginal comparisons and their weights. A factorial allocation makes the observed combination means available; the scientific interpretation still depends on replication, dependence, variability, and the assumptions of the analysis.

Check Your Understanding

Answer each question, then compare with the concise solutions below.

  1. A study crosses two drug conditions with three stimulation levels. How many combinations are planned in a full factorial allocation?
  2. In a balanced two-by-two allocation, the cell means for A-low are 6 and 10 units; for A-high they are 9 and 13 units, across the two levels of B. Calculate the equal-weight marginal A-high-minus-A-low comparison.
  3. Why do 5,000 cells from one donor not constitute 5,000 independent biological replicates?
  4. In an unbalanced study, why might the pooled mean across all observed samples differ from an equal-weight marginal mean across factor combinations?
  5. One combination in a planned two-by-two design has no donors. What can be concluded about calculating the full equal-weight marginal comparison from observed cell means alone?

Solutions. (1) \(2 \times 3=6\) combinations. (2) The A-low marginal mean is \((6+10)/2=8\) units; the A-high mean is \((9+13)/2=11\) units; the comparison is \(11-8=3\) units. (3) The cells are nested measurements from the same biological unit and share donor-level influences; they do not provide independent donor replication. (4) Pooling weights observations or combinations according to their sample counts, whereas an equal-weight marginal mean gives each specified combination equal weight. (5) The missing combination mean is unobserved, so the full equal-weight marginal comparison is not directly calculable without additional data or an explicit model assumption.

Clinical Biostats