What the Observed Difference Can—and Cannot—Tell You
Suppose every control sample is processed in Batch A and every treated sample is processed in Batch B. If expression differs between the two observed groups, the difference could reflect biology, the processing batch, or both. The central issue is not simply that the data are noisy or that a method has failed to adjust them. The two potential explanations are tied to exactly the same grouping in the data.
This tutorial follows the additive two-way model used in the earlier material on batch-condition confounding. The focus here is the consequence for interpretation: when the two factors are perfectly aligned, the observed expression difference does not, by itself, say how much is a condition effect and how much is a batch effect. The examples use hypothetical expression values for one gene. A value \(y\) can be a normalized, transformed expression measurement; the argument applies to any scale on which the stated additive model is appropriate.
The Additive Model and Its Limit
For observation \(i\), write the model for a particular gene as
Here \(y_i\) is the expression measurement, \(\mu\) is the mean for the reference batch and reference condition, \(\tau\) is the condition effect, \(\beta\) is the batch effect, and \(\varepsilon_i\) is the remaining deviation. The indicators \(C_i\) and \(B_i\) equal 1 for the treated condition and Batch B, respectively, and 0 otherwise. The additive model assumes that the effects are constant on the chosen expression scale and that there is no batch-by-condition interaction. For a simple mean-based interpretation, the errors are assumed to have mean zero within groups; standard errors additionally require an appropriate model for their variance and dependence.
Under perfect confounding, \(C_i=B_i\) for every observation. Substitution gives
The data can therefore reveal the combined change \(\tau+\beta\) between the two observed groups, subject to sampling variation. They do not separately reveal \(\tau\) and \(\beta\). This distinction remains even if the observed group means are measured with negligible error.
Why the Decomposition Is Not Identified
The ambiguity can be shown directly. If a pair of effects \((\tau,\beta)\) produces a given fitted value for every observation, then for any number \(a\), the pair
produces the same fitted values. For observations with \(C_i=B_i\),
Thus infinitely many allocations of the combined difference to condition and batch agree with the observed design. The same result applies to the likelihood: if the distribution of the errors is otherwise unchanged, these parameter pairs give the same model predictions and the same likelihood. This is a lack of identification, not merely a wide confidence interval. More precise measurement of the same two groups cannot select one decomposition from the others.
Worked Example: One Difference, Several Explanations
In a hypothetical experiment, control samples are all processed in Batch A and treated samples are all processed in Batch B. The mean log expression for a gene is 2.1 in the control group and 5.4 in the treated group. Assume the additive model is a reasonable description on this scale, and let \(\mu\) be the Batch A/control mean.
The observed difference is
Because the treated samples are all in Batch B, the model says \(3.3=\tau+\beta\). For example, \(\tau=3.3\) and \(\beta=0\) fit the two means: \(2.1+3.3+0=5.4\). So do \(\tau=0\) and \(\beta=3.3\): \(2.1+0+3.3=5.4\). A third compatible allocation is \(\tau=1.0\) and \(\beta=2.3\), since \(2.1+1.0+2.3=5.4\). All three produce the same expected means in the observed groups.
The data establish a 3.3-unit difference between these observed groups. They do not establish that treatment increased expression by 3.3 units, nor that batch accounts for any particular part of that difference. Calling the entire 3.3-unit change a condition effect would require an additional assumption, such as \(\beta=0\), which the confounded observations cannot check.
Sampling Precision Does Not Resolve the Cause
It is useful to separate two questions. The first asks how precisely the observed group difference is estimated. The second asks whether that difference can be attributed to condition rather than batch. Replication can help with the first. Under perfect confounding, it does not answer the second.
Worked Example: A Precise Combined Difference
Suppose the hypothetical control and treated groups each contain 40 independent biological samples. The observed means are 2.1 and 5.4, as above, and both groups have sample standard deviation \(s=0.6\) log-expression units. For this calculation, assume independent samples and a common within-group variance. The standard error for the difference in means is
The observed difference divided by its standard error is
This calculation indicates that the two observed group means are very far apart relative to their estimated sampling variability, under the stated assumptions. It concerns the combined group difference \(\tau+\beta\). It does not show that \(\tau\) is large, because the same difference can still be decomposed into condition and batch effects in multiple ways.
The independence assumption matters in single-cell studies. Cells from the same biological sample are usually not independent biological replicates. Treating many cells from a small number of samples as independent can understate uncertainty. Correcting that dependence would improve the uncertainty calculation, but would not change the perfect alignment of batch and condition.
Worked Example: More Replicates, Same Identification Problem
Consider two hypothetical designs, each still perfectly confounded. In both, the observed group means differ by 1.5 log-expression units and the within-group sample standard deviation is 0.8 units. First, suppose there are 10 independent samples per group. Under the equal-variance standard-error formula,
Now suppose there are 40 independent samples per group, with the same observed difference and standard deviation:
The larger sample gives a smaller standard error for the observed group difference. In both designs, however, that difference remains the sum of the condition and batch effects. More samples improve precision for the combined contrast; they do not create observations that compare conditions within the same batch or batches within the same condition.
Why Common Analysis Choices Cannot Supply the Missing Information
A comparison that ignores batch reports the difference between the observed groups. Under perfect confounding, that is the combined difference, not a batch-free condition effect. Including both batch and condition as separate predictors does not solve the problem: their indicator columns are identical, so the data cannot determine separate coefficients. A software package may drop a column, impose a constraint, or return one particular parameterization. Such a computational choice does not add evidence that distinguishes the effects.
Likewise, producing an adjusted expression matrix or integrated representation cannot, from these observations alone, establish which component of the difference was technical and which was biological. An adjustment can reflect assumptions built into the procedure. If it removes the difference, that is not proof that the removed part was all batch effect; if it preserves the difference, that is not proof that it was all condition effect. The missing distinction comes from the design and available information, not from a choice of software.
Separation may be possible if information beyond the confounded comparison is available. Examples include a design that processes both conditions within batches, validated technical controls that constrain batch effects, or external calibration information. Each source contributes a new comparison or an explicit assumption. Without such information, a condition-specific interpretation should be presented as conditional on an assumption, not as a conclusion identified by the observed data.
This is also why biological interpretation needs care. A large expression difference may be important for describing the two groups as measured. But if treatment status and processing batch always coincide, an association between expression and treatment status is also an association with batch. The observed association alone cannot determine which factor explains it.
Diagnostics and Common Pitfalls
A practical first check is to tabulate sample counts by batch and condition. If every control is in one batch and every treated sample in another, there is no overlap to support a within-batch condition comparison. In a model matrix, identical batch and condition columns provide the corresponding algebraic warning. Software messages about singular fits or dropped predictors can reveal the issue, but the design table itself is the clearest explanation.
- Pitfall: interpreting a small p-value as proof of a condition effect. A test of the two observed group means concerns their combined difference. A small p-value does not assign that difference to condition rather than batch.
- Pitfall: assuming many cells repair the design. More cells can improve measurement of the observed groups, but they do not change which conditions were processed in which batches. The biological replication and the batch-condition allocation both matter.
- Pitfall: treating a software coefficient as uniquely supported. A reported coefficient can depend on which redundant predictor the software removes or which constraint it imposes. Inspect the model and design; do not interpret a chosen coefficient as independently identified without justification.
- Pitfall: assuming no batch effect because it was not detected. In a perfectly confounded design, the separate batch effect cannot be tested from the same comparison. Failure to distinguish effects is not evidence that one of them equals zero.
The additive model is already enough to show the problem. If the condition effect also varies by batch, an interaction introduces further unknown components, and this design does not provide observations to separate them. Thus, relaxing the additive assumption does not rescue the condition-specific interpretation.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions.
- In an additive model, all controls are in Batch A and all treated samples in Batch B. If the observed treated-minus-control difference is 2.4 units, what combination of effects does this difference represent?
- Give two distinct pairs of condition and batch effects that are compatible with an observed difference of 2.4 units.
- Suppose the standard error of the observed group difference becomes smaller after adding more samples. What has improved, and what remains unresolved?
- Why does dropping the batch predictor in a regression not demonstrate that the condition effect has been separated from batch?
- Name one kind of additional information that could help distinguish the effects, and explain what it contributes.
Solutions. (1) The difference represents \(\tau+\beta=2.4\), under the additive model and the stated coding. (2) For example, \((\tau,\beta)=(2.4,0)\) and \((0.9,1.5)\) both sum to 2.4. (3) The estimate of the observed combined group difference is more precise; its division into condition and batch effects remains unresolved. (4) Dropping a redundant predictor is a computational choice. The retained coefficient combines the effects and does not show that the omitted effect is zero. (5) A design with both conditions represented in each batch supplies within-batch comparisons; validated controls or external calibration can also help by adding information or explicit constraints on batch effects.