Design, replicates and sample size
Decide what counts as one observation and how many you need.
- Choose a methodWhat counts as n? Biological replicates, technical replicates and the experimental unitYour 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.
- Choose a methodChange from baseline or ANCOVA? Analysing before-and-after data with a control groupWith randomised groups measured before and after, analyse the final value with the baseline as a covariate (ANCOVA): it is unbiased and has the most power. Change scores are a weaker alternative; avoid percent change. Python and R code.
- Choose a methodHow many biological replicates do you need?Work out n per group from the smallest difference worth detecting and the variability between animals or cultures. Tables, pilot-study pitfalls, the resource equation and RNA-seq numbers.
- Choose a methodUnequal group sizes: can you still run a t-test or ANOVA?Yes, for independent groups and a continuous outcome: use Welch's t-test or Welch's ANOVA, which do not assume equal spread. Do not drop animals to balance the groups. It covers what imbalance costs in power and unbalanced two-factor designs.
- Choose a methodHow to randomise and blind an animal experiment: a practical method with codeGenerate the allocation with a computer, within blocks such as cages or litters, before the experiment; hide group identity behind codes until the analysis is fixed. Picking animals by hand biases results. Python and R code to make the allocation.
- Choose a methodSex as a biological variable: how to analyse male and female animals, and when you can claim a sex differenceAnalyse male and female animals together in one model with treatment and sex as factors. A result significant in one sex but not the other is not evidence of a sex difference; test the interaction. Python and R code.
- Choose a methodAdding more animals after seeing p = 0.07: why it inflates false positives, and how to plan interim looksAdding animals because p was just above 0.05 raises the false-positive rate. Fix the sample size in advance, or plan a group sequential design with adjusted thresholds. If you already added animals, report both looks. Python and R code.
- Choose a methodSample size for more than two groups: power the comparison you will actually reportFor three or more groups, base the sample size on the comparisons you will report, such as each dose against control with an adjusted α, not the overall ANOVA. The resource equation suits exploratory studies. Python and R code.
- Choose a methodNovel object recognition and preference indices: testing against chance and comparing groupsTest a discrimination index against chance only to show that a group remembers; to show that groups differ, compare the groups directly. Set the exploration exclusion rule in advance and report total exploration. Python and R code.
- Choose a methodLitter effects in rodent studies: pups within litters, litter as the unit and litter sizeWhen dams receive the treatment, analyse litters, not pups: litter means or a mixed model with planned covariates (litter size only if treatment cannot change it). In simulation, pups as n gave 44% false positives. Python and R code.