Design, replicates and sample size · Choose a method
What counts as n? Biological replicates, technical replicates and the experimental unit
Your n is the number of units independently given a treatment — mice, cages, litters or independent experiments — not the cells or wells measured inside one treated unit. Find your unit and handle the extra measurements.
On this page
Quick answer. Your n is the number of experimental units (your biological replicates): the things that could each have been given a different treatment, independently of the others. Usually that is the animal. It is the cage when a whole cage gets the diet, the litter when the dam is treated, and the independent experiment (a separate day or culture) for a cell line. Cells, wells, fields of view and technical replicates measured inside one treated unit are subsamples, not n — unless each cell was itself randomly assigned to a treatment: average subsamples per unit, or analyse them with a mixed model that knows which unit they came from.
Terms used below. Experimental unit: the thing that received the treatment independently of the others; the number of them is n. Biological replicate: one experimental unit — a different mouse, cage, litter or independent experiment. Technical replicate: a repeat measurement of the same sample (for example triplicate wells on a qPCR plate). Subsample: any of several measurements taken inside one unit (cells, wells, fields of view). Intraclass correlation (ICC): the share of the total variation that lies between units rather than within them. Mixed model: a regression that includes the unit as a random effect, so measurements from one unit are not treated as independent; a random intercept lets each unit have its own baseline. Degrees of freedom (df): a count, printed by the test, that reflects how many independent units the test thinks it has.
The ARRIVE 2.0 guidelines define the experimental unit as “the biological entity subjected to an intervention independently of all other units, such that it is possible to assign any two experimental units to different treatment groups”, also called the unit of randomisation (Percie du Sert et al. 2020, item 1b). Their example: 50 cells from one mouse “represent n = 1 when the experimental unit is the mouse”.
Find your unit
Before anything else, check that your data file has a column naming the unit (mouse, cage, litter or experiment ID). Plate maps and image exports can list only wells or cells; in that case, recover the unit ID from your notebook or plate map and add it as a column, so every measurement can be assigned to its unit.
| Your design | Experimental unit — this is n | Extra measurements | What to do with them |
|---|---|---|---|
| Drug injected into each mouse, one value per mouse | Mouse | None | Compare the mice directly |
| Several cells, neurons or fields imaged per mouse | Mouse | Cells are subsamples | Average per mouse, or mixed model with mouse as random effect |
| Diet or water treatment given to a whole cage | Cage | Mice in a cage are subsamples | Average per cage, or mixed model with cage |
| Treatment given to the pregnant dam, pups measured | Litter (dam) | Pups are subsamples | Average per litter, or mixed model with litter |
| Cell line, treatments added to wells, whole experiment repeated on separate days | Independent experiment (day, culture or passage) | Wells and cells within a day are subsamples | Average per experiment, then compare experiments paired by day |
| Same sample run in triplicate on a qPCR or ELISA plate | The biological sample | Technical replicates | Average the technical replicates; analyse the samples |
| Each cell individually and randomly assigned to treatment (for example single-cell injection) | Cell | — | Cells are the n only when each cell was individually and randomly assigned (ARRIVE 2.0 item 1b); when the treatment goes to a well or an animal, cells are subsamples |
| Same animal measured before and after, or at several time points | Animal | Repeated measurements | A paired or repeated-measures analysis; see paired vs unpaired t-test |
| Two treatments applied to the left and right side (or eye) of each animal | Side is the treated unit; n for the analysis is the animal | Two sides per animal | Paired analysis by animal (n = number of animals) |
The cage, litter, body-region and crossover cases come from the same ARRIVE item; the cell-line row follows Lazic et al. (2018), who explain that cells in one well share medium and signals and are treated together. A well is therefore the unit only within a single experiment; when the experiment is done once, all its wells are subsamples of one independent experiment, so n = 1 and there is no group comparison. You need several independent experiments (separate days, cultures or passages), with the wells averaged per experiment.
What to do: write the unit next to each experiment in your notebook before you analyse, and count n from that column.
Three questions that settle a hard case
Lazic et al. (2018) give three conditions for a genuine replicate. Ask them of the thing you want to count:
- Was each one assigned to its group independently? Randomising mice one by one: yes. Putting a whole litter into the treatment group: the litter is the unit.
- Was the treatment applied to each one separately? A drug added to a well reaches all its cells at once, so the well, not the cell, received the treatment.
- Can one affect another’s outcome? Cells in a well and mice in a cage share an environment; if they can affect each other, count the shared unit.
A thing that passes all three can be your n. Generalisation is a separate question: results from one cell line describe that line, and a claim about breast versus lung cancer lines needs several lines of each (Lazic et al. 2018).
What to do: check each candidate against all three; if it fails one, use the next level up (cell → well → experiment; mouse → cage) and ask again.
What happens when cells are counted as n
Cells from one mouse resemble each other more than cells from different mice. The share of the total variance that lies between mice is the intraclass correlation (ICC). When cells are entered as if independent, the test treats that shared part as information it does not have.
We simulated experiments with no true treatment effect: 5 mice per group, 20 cells per mouse, 100,000 experiments per row, Welch’s t-test at α = 0.05 (simulation code and output, seed 20261110).
| ICC (variance between mice) | False positives, cells as n | False positives, mouse means as n |
|---|---|---|
| 0 | 4.9% | 4.4% |
| 0.05 | 16.2% | 4.5% |
| 0.10 | 25.4% | 4.5% |
| 0.20 | 37.8% | 4.5% |
| 0.50 | 56.5% | 4.4% |
In this design (5 mice per group, 20 cells per mouse), even a 5% share of variance between mice more than triples the false-positive rate. This matches the published warnings: counting each cell as n “can easily result in false-positive rates of >50%” (Lord et al. 2020), and a review of 314 neuroscience papers found nested data in 53% of them, with error rates up to 80% when the dependency is ignored (Aarts et al. 2014, abstract). The mouse-means analysis stays at or slightly below 5%; Welch’s test is a little conservative with 5 per group.
What to do: use the number of mice, not the number of cells, to set the degrees of freedom.
The same data, three ways
A constructed example: 6 mice per group, 10 cells imaged per mouse, one fluorescence value per cell (cells.csv: one row per cell, columns group, mouse, cell, y). To use your own export, arrange it in the same long layout, one row per measurement with a column naming the mouse.
| Analysis | n per group | Difference (treated − control) | Test | p |
|---|---|---|---|---|
| Cells as n (wrong unit) | 60 cells | 1.23, 95% CI 0.64 to 1.82 | Welch t(114.8) = 4.14 | 0.00007 |
| Mouse means as n | 6 mice | 1.23, 95% CI −0.58 to 3.05 | Welch t(9.7) = 1.52 | 0.16 |
| Mixed model, random intercept for mouse (lmerTest) | 6 mice | 1.23, SE 0.81 | t(10) = 1.52 | 0.16 |
In this balanced example the estimate is identical and only the uncertainty changes. The example was simulated to make the contrast visible (its seed was chosen for that; the simulation above gives the general rate). Counted as cells, the interval is 3.1 times too narrow and the p-value is more than 2,000 times smaller. The mixed model estimates a between-mouse variance of 1.86 and a within-mouse (cell) variance of 1.07, so the ICC is 1.86 ÷ (1.86 + 1.07) = 0.63: most of the variation lies between mice.
With the same number of cells in every mouse and only a random intercept, the mixed model gives exactly Student’s t-test on the mouse means (t(10) = 1.52, p = 0.159). Python’s statsmodels reports the same estimate and standard error but a z test (normal reference, p = 0.13), which is too optimistic with 12 mice; R’s lmerTest uses Satterthwaite degrees of freedom by default and reproduces the t-test.
import pandas as pd
from scipy import stats
d = pd.read_csv("cells.csv")
m = d.groupby(["group", "mouse"], as_index=False).y.mean() # one row per mouse
# use the exact group labels in your file ("Treated" is not "treated")
r = stats.ttest_ind(m[m.group == "treated"].y, m[m.group == "control"].y, equal_var=False)
print(r.statistic, r.df, r.pvalue, r.confidence_interval()) # 1.52, 9.67, 0.160
d <- read.csv("cells.csv")
d$group <- factor(d$group, levels = c("control", "treated"))
m <- aggregate(y ~ group + mouse, data = d, FUN = mean) # one row per mouse
t.test(y ~ group, data = m) # Welch: t = -1.52, df = 9.67, p = 0.160
library(lmerTest) # mixed model, Satterthwaite df
fit <- lmer(y ~ group + (1 | mouse), data = d)
summary(fit)$coefficients # grouptreated 1.23, SE 0.81, df 10, p = 0.159
R prints the difference as control − treated, hence the negative t.
What to do: run the analysis on mouse means first; if a mixed model gives a much smaller p-value than the means, check its degrees of freedom.
Average, or fit a mixed model?
- Average per unit by default: when every unit has a similar number of subsamples and you only care about the treatment effect. It is simple, transparent and needs no extra assumptions beyond those of the t-test or ANOVA you then run. Use Welch’s version by default (Welch vs Student).
- Fit a mixed model when the number of cells per mouse is very unequal (for example some mice with fewer than half as many cells as others), when you want to report how much variation lies between versus within mice, or when the design has several levels (cells within wells within experiments). The model assumes independent units, normally distributed unit effects and residuals, and the same between-unit variance in every group; if the groups’ spreads differ clearly, the per-unit means with Welch’s test remain a sound choice.
Either way the number of units, more than the number of cells, mainly decides your power. Adding cells per mouse narrows each mouse’s mean but cannot remove the mouse-to-mouse variation; adding mice can (Aarts et al. 2014).
If a reviewer wants to see every cell, show them: plot each cell, coloured by mouse, with each mouse’s mean on top, and run the test on the mice (SuperPlots).
What to do: choose the method before you see the result, and state it in Methods.
Check what an AI assistant ran
Code from an AI assistant can pass every row of a long table to the test. Four checks:
- Degrees of freedom. A two-group t-test with 6 mice per group has about 10 degrees of freedom (2 × 6 − 2; Welch’s version prints a slightly smaller, non-integer number). An output of df = 114 means cells were counted.
- An aggregation step. Look for
groupby(...).mean()in Python oraggregate()in R before the test. - The grouping variable. A mixed model needs the unit named:
groups=d["mouse"]in statsmodels,(1 | mouse)in lme4. - z or t. statsmodels
mixedlmreports a z test, which is too optimistic when there are few units (here 12 mice); in that case take the p-value from the per-unit means or from lmerTest.
What to do: check the output’s df against your count of units; they should match the design.
Report it
The experimental unit was the mouse (n = 6 per group). For each mouse we imaged 10 cells and used the mean of those cells as the mouse’s value. Groups were compared with Welch’s t-test (two-sided, α = 0.05).
For a mixed model, use this paragraph instead:
The experimental unit was the mouse (n = 6 per group); we imaged 10 cells per mouse. Cell-level values were analysed with a linear mixed model with treatment as a fixed effect and mouse as a random intercept (R lme4 and lmerTest, Satterthwaite degrees of freedom; two-sided α = 0.05).
For a treatment given per cage:
The experimental unit was the cage (n = [number] cages per diet, [number] mice per cage); each cage’s value was the mean of its mice, and diets were compared with Welch’s t-test on the cage means (two-sided, α = 0.05).
For a response letter:
We counted n as mice (n = 6 per group), not cells: cells from one mouse received the treatment together and share a microenvironment, so they are not independent replicates (Lazic et al. 2018). Per-mouse means were compared with Welch’s t-test; the figure shows every cell, coloured by mouse.
Replace the numbers and bracketed items with your own. ARRIVE 2.0 asks you to state the experimental unit (item 1b) and the exact n in each group for each analysis (item 3c) (Percie du Sert et al. 2020).
What to do: state the unit and n in the figure legend too (“n = 6 mice per group; each point is one mouse”).
References
- Aarts E, Verhage M, Veenvliet JV, Dolan CV, van der Sluis S (2014). A solution to dependency: using multilevel analysis to accommodate nested data. Nature Neuroscience 17:491–496. doi:10.1038/nn.3648
- Lazic SE, Clarke-Williams CJ, Munafò MR (2018). What exactly is ‘N’ in cell culture and animal experiments? PLOS Biology 16:e2005282. doi:10.1371/journal.pbio.2005282
- Lord SJ, Velle KB, Mullins RD, Fritz-Laylin LK (2020). SuperPlots: Communicating reproducibility and variability in cell biology. Journal of Cell Biology 219:e202001064. doi:10.1083/jcb.202001064
- Percie du Sert N, Hurst V, Ahluwalia A, et al. (2020). The ARRIVE guidelines 2.0: Updated guidelines for reporting animal research. PLOS Biology 18:e3000410. doi:10.1371/journal.pbio.3000410
- Percie du Sert N, Ahluwalia A, Alam S, et al. (2020). Reporting animal research: Explanation and elaboration for the ARRIVE guidelines 2.0. PLOS Biology 18:e3000411. doi:10.1371/journal.pbio.3000411
How this page was made
- Written and published by Licklider. The definitions and recommendations cite the ARRIVE 2.0 guidelines and peer-reviewed methods papers listed under References; cited figures were checked against the source text, and one source is cited at the level of its abstract.
- The simulation and the worked example use constructed data and were produced by stored code (Python 3.13 with SciPy 1.18.1 and statsmodels 0.15.0; R 4.3.3 with lme4 1.1-35 and lmerTest 3.1-3); the two languages agree.
- Separate review passes checked the statistics, the citations and readability before publication.