Why Partial Confounding Needs Careful Accounting
A study may include some batches containing both biological conditions, alongside other batches containing only one condition. The overlap matters: samples from both conditions in the same batch allow a direct comparison that is not mixed up with that batch’s overall expression level. A comparison across two condition-exclusive batches does not have that protection. Its observed difference can reflect the condition, the batch, or both.
The central task is therefore not simply to ask whether both conditions appear somewhere in the study. It is to identify which comparisons are made within a batch and which cross batch boundaries. This distinction clarifies what a batch-adjusted condition estimate is drawing on, and what assumptions would be needed to use between-batch comparisons as additional evidence.
An Additive Model and Its Assumptions
This model treats batches as fixed differences to be adjusted for, rather than assuming that their effects are random draws independent of condition assignment. To give the coefficients a unique interpretation, one batch effect is set to zero (a reference-batch coding), or an equivalent constraint is imposed. The value of \(\beta\) is a difference on the scale of \(y\), such as log-expression units if the response is log expression.
The additive form also assumes the condition difference is the same in every batch. A within-batch difference can be interpreted as evidence about this common \(\beta\) only if the samples are comparable, the response scale is appropriate, and the shared-effect assumption is reasonable. Replicate samples, not individual cells treated as independent replicates, must define the independent units when the biological design is sample-based.
What a Within-Batch Contrast Cancels
For a batch \(j\) containing samples under both conditions, subtract the condition-0 mean expression from the condition-1 mean expression. Under the additive model, the batch effect appears in both means and cancels:
This cancellation is the basic reason an overlapping batch is informative about the condition difference in a fixed-batch model. By contrast, if one condition is observed only in batch \(j\) and the other only in batch \(k\), the difference in their means contains \(\gamma_j-\gamma_k\) as well as \(\beta\). Without additional assumptions or information, those components cannot be separated by that cross-batch comparison alone.
Worked Example: A Shared Batch Amid Condition-Exclusive Batches
Suppose hypothetical log-expression values for one gene are as follows. Batch A contains both conditions; batch B contains only condition 0; and batch C contains only condition 1.
| Batch | Condition 0 | Condition 1 |
|---|---|---|
| A | 4, 5 | 7, 8 |
| B | 10, 12 | — |
| C | — | 20, 22 |
In batch A, the condition means are \((4+5)/2=4.5\) and \((7+8)/2=7.5\). The within-batch contrast is therefore \(7.5-4.5=3.0\) log-expression units. Under the fixed-batch additive model, this contrast estimates the condition difference without including batch A’s overall level.
The pooled condition means, ignoring batch, are \((4+5+10+12)/4=7.75\) for condition 0 and \((7+8+20+22)/4=14.25\) for condition 1. Their difference is \(14.25-7.75=6.50\), not 3.00. The pooled difference mixes the direct contrast in A with differences in the batches represented by each condition. B and C do not provide their own within-batch condition contrasts, because each contains only one condition.
Thus the pooled value is not a substitute for the within-batch estimate under a fixed-batch interpretation. It answers a different, unadjusted comparison that is vulnerable to the unequal batch composition.
Precision Within an Overlapping Batch
The number of samples in each condition affects the uncertainty of a within-batch difference. If the model errors are independent with common variance \(\sigma^2\), the variance of the difference between two sample means in batch \(j\) is
where \(n_{j1}\) and \(n_{j0}\) are the sample counts in that batch for conditions 1 and 0. This follows because the two means use independent errors, with variances \(\sigma^2/n_{j1}\) and \(\sigma^2/n_{j0}\); the variance of their difference is the sum. If \(\sigma\) is known, the standard error is the square root of this expression. In practice, it is generally estimated from the model residuals.
Worked Example: Unequal Counts in an Overlapping Batch
In a hypothetical batch, a gene has condition-0 values 3, 4, and 5, and condition-1 values 5 and 7, all in log-expression units. Suppose, for illustration, that the error variance is known to be \(\sigma^2=1.44\) square log-expression units.
The means are \(\bar{y}_{j0}=(3+4+5)/3=4.00\) and \(\bar{y}_{j1}=(5+7)/2=6.00\). The within-batch contrast is \(6.00-4.00=2.00\) log-expression units.
Its variance under the stated model is $$ 1.44\left(\frac{1}{2}+\frac{1}{3}\right) =1.44\left(\frac{5}{6}\right)=1.20, $$ so its standard error is \(\sqrt{1.20}=1.095\) log-expression units. This calculation depends on independent sample errors and the stated common variance. It describes uncertainty in this contrast under those assumptions; it does not establish that the assumed variance or the common condition effect is appropriate for a real study.
Why Between-Batch Comparisons Need More Assumptions
A difference between condition-exclusive batches can be written directly from the model. If batch \(j\) contributes only condition 1 and batch \(k\) contributes only condition 0, then the expected difference is
The data give one observed difference, while its interpretation involves both the condition effect and the difference in batch effects. A fixed-batch analysis does not assume that \(\gamma_j-\gamma_k\) is zero. Consequently, such a comparison cannot by itself isolate \(\beta\).
Worked Example: The Same Cross-Batch Difference, Different Explanations
Suppose a condition-1-only batch has mean expression 12 and a condition-0-only batch has mean expression 8. The observed cross-batch difference is \(12-8=4\) log-expression units.
That difference is compatible with a condition effect of 4 and no batch difference: \(\beta=4\), \(\gamma_j-\gamma_k=0\). It is also compatible with a condition effect of 1 and a batch difference of 3: \(\beta=1\), \(\gamma_j-\gamma_k=3\). In both cases, \(\beta+\gamma_j-\gamma_k=4\).
The observed values alone do not distinguish these explanations. A model that uses this comparison to estimate the condition effect must bring in an assumption about batch effects, such as treating them as random and independent of condition allocation. That is a different basis for inference from the direct cancellation in an overlapping batch, and it is not guaranteed by the observed difference.
Reading the Design and Choosing an Approach
Before fitting a model, inspect the condition composition of every batch. Mark each batch as overlapping, condition-0-only, or condition-1-only. Then ask what the intended estimate relies on. Under a fixed-batch additive model, the direct condition evidence comes from the batches where both conditions occur. Condition-exclusive batches can help describe their batch-specific levels, but they do not create a direct within-batch comparison.
The main alternatives differ in their assumptions and target comparisons:
| Approach | What it compares | Key limitation or assumption |
|---|---|---|
| Fixed-batch adjustment | Condition differences after accounting for separate batch levels | Requires overlap for direct condition evidence and assumes a common additive condition effect |
| Unadjusted pooled comparison | All observed condition-1 samples against all observed condition-0 samples | Can mix condition differences with batch composition when conditions are unevenly distributed across batches |
| Random-batch model | Condition difference while modeling batch effects as draws from a distribution | Uses distributional assumptions about batch effects; it does not make condition allocation independent of batch by itself |
A numerical optimizer may return a coefficient even when much of the design is condition-exclusive. That does not mean all observations provide equally direct evidence for that coefficient. Interpret the fitted estimate in light of the design and the model assumptions, rather than treating a computed result as proof that the design supports every comparison.
Diagnostics, Failure Modes, and Limits
Several checks help reveal when the analysis is leaning too heavily on unsupported comparisons:
- Tabulate samples by batch and condition. Identify which batches actually contain both conditions and record their sample counts.
- Compare raw and batch-adjusted results. A large change in the estimated difference can signal that condition and batch composition are entangled; it is not, on its own, proof that either estimate is correct.
- Check the expression scale and residual behavior. Extreme values, unequal residual spread, or strong departures from the assumed error pattern can make the model-based uncertainty unreliable.
- Look for inconsistent overlapping-batch contrasts. Markedly different contrasts across shared batches may make a single common condition effect a poor summary. A sparse design may also leave too little information to judge this consistency well.
A fixed-batch estimate in a partially overlapping design is not automatically a study-wide biological effect. Its interpretation depends on comparable samples, adequate measurement, and the assumption that one additive condition difference is meaningful across the represented batches. If only one batch overlaps, the direct contrast is especially dependent on that batch; other batches cannot independently validate it through within-batch comparisons.
Common Mistake
Correction: The relevant question is whether both conditions occur within the same batches. An overlapping batch supplies a direct contrast under the additive model. A condition-exclusive batch supplies no within-batch contrast; using its comparison with another batch requires additional assumptions about batch differences.
A related mistake is to report the pooled difference as a batch-adjusted condition effect. The pooled difference is calculated without separating batch levels. State which comparison was calculated and which assumptions support its interpretation.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions.
- A batch has condition-0 mean 6 and condition-1 mean 9. What is the within-batch contrast, and what component cancels under the additive model?
- Batch A contains only condition 0 and batch B only condition 1. Their means are 5 and 11. Can their difference alone identify the condition effect under a fixed-batch model? Why?
- In one overlapping batch, condition-0 values are 2 and 4, while condition-1 values are 5, 7, and 9. Calculate the within-batch contrast.
- Name one assumption needed to interpret a condition coefficient from a fixed-batch additive model.
Solutions. 1. The contrast is \(9-6=3\) expression units; the common batch effect cancels when the two within-batch means are subtracted. 2. No. The observed difference is \(11-5=6\), but it includes both the condition effect and the difference between batch effects. 3. The means are \((2+4)/2=3\) and \((5+7+9)/3=7\), so the contrast is \(7-3=4\) expression units. 4. One valid answer is that the condition effect is additive and common across batches; the model also requires an appropriate error structure and independent sample units.