What counts as n?
The experimental unit is the smallest thing that could have been given a different treatment from the others, independently. n counts those units.
| Design | The unit (n) | Technical replicates |
|---|---|---|
| Mice dosed one by one, tumours measured | the mouse | repeated caliper readings |
| A diet given to whole cages | the cage | the mice in a cage, and their readings |
| Cells from one flask split into wells and treated together | the independent experiment: a culture grown, treated and harvested on its own | the wells |
| Patient samples run in duplicate on an ELISA plate | the patient | the duplicate wells |
| Tissue from each mouse imaged at several fields | the mouse | the fields of view and the cells in them |
| qPCR on one cDNA per animal, in triplicate wells | the animal | the triplicate wells |
When the same unit is measured under several conditions or at several times (one mouse weighed every day, one culture under three drugs), the measurements are repeated, and they are paired with each other.
Why wells are not n
Technical replicates tell you how precise the measurement is. A test of a treatment needs something else: how much the units themselves vary. Counting every well as an independent value shrinks the standard error and inflates the degrees of freedom, so the P value comes out far too small.
Hurlbert named this pseudoreplication in 1984 (Ecological Monographs 54:187–211). Lazic described how it arises in neuroscience studies (BMC Neuroscience 11:5, 2010), and Lazic, Clarke-Williams and Munafò set out how to find n in cell culture and animal experiments (PLOS Biology 16:e2005282, 2018).
Worked example: three subjects per group, four wells each
Two groups, three subjects in each, four technical replicate wells per subject: 24 values. This is the dataset the statistics package tests its nested analysis on. The subject means are 10.425, 11.825 and 9.875 in the control group, and 13.000, 13.750 and 12.475 in the treated group.
| Analysis | n per group | Degrees of freedom | Result |
|---|---|---|---|
| t test on all 24 wells, as if independent | 12 | 22 | t = 7.58, P < 0.000001 |
| t test on the six subject means | 3 | 4 | t = 3.44, P = 0.026 |
| Nested one-way ANOVA (a mixed effects model) | 3 subjects | 1 and 4 | F = 11.8, P = 0.026 |
The evidence for the treatment is P = 0.026 from six subjects. The wells version claims P < 0.000001 from the same data. Most of the variation lies between subjects (an intraclass correlation of 0.89), so the 24 wells carry about as much information as 6.5 independent values: counting them as 24 overstates the information about 3.7 fold.
The t test on the subject means and the nested ANOVA agree exactly (3.44² = 11.8), as they always do when every unit has the same number of replicates.
How to analyse it
- Average within each unit, then test the means. One value per mouse, per patient or per independent experiment. With the same number of replicates in every unit, this is the nested analysis's answer.
- Fit a nested (mixed effects) model when units have different numbers of replicates, or when you want the variance between units and within them. Openhagen Lab's nested t test and nested one-way ANOVA fit a linear mixed model with a random intercept for each unit (REML), and test the groups on degrees of freedom counted from the units.
- Use a paired or repeated measures analysis when the same unit is measured under several conditions or times: a paired t test, a repeated measures ANOVA or a mixed effects model.
How to report n
Say what n counts, in the methods and in every figure legend: "n = 6 mice per group; each value is the mean of 4 technical replicate wells". Compute SD or SEM error bars from the unit means, and say which one you show. In cell culture, "n = 3 independent experiments" means three cultures grown, treated and measured separately, usually on different days.
What Openhagen Lab does with your table
Before any test runs, the design check reads the IDs in your table: subject, animal, donor or well IDs that repeat down a column (M1, M1, M2…), IDs with replicate suffixes (M1-a, M1-b) and column headers such as "Mouse 1 rep 2". It counts the biological units against the measurements, says whether the units are nested in the groups or measured under several conditions, and proposes the analysis: the unit means, or a nested model. The result names the units it used and the degrees of freedom they give. See the statistics.
FAQ
Are three wells from one culture n = 3? No. They are technical replicates of one culture, so that condition has n = 1. Repeat the experiment with cultures grown and treated separately, and count those.
Is n the number of independent experiments in cell culture? Usually, yes. An experiment repeated from fresh cultures on another day is an independent unit; the wells, dishes and cells within one experiment are technical replicates.
Should my error bars be SD or SEM? SD shows how much the units vary; SEM shows how precisely the mean is estimated. Compute either from the unit means and state which one, with n, in the legend.
When do I need a mixed effects model instead of averaging? When units have different numbers of replicates, when you want the variance between and within units, or when the same unit is measured under several conditions or times.
Does Openhagen Lab detect pseudoreplication? Yes. Its design check reads repeated or suffixed IDs in your table, counts the units against the measurements and proposes unit means or a nested model before the test runs.