a, b, Paint-marking did not disproportionately affect small colonies. Red asterisks indicate control colonies composed of unmarked ants; otherwise, data are as in Fig. 4b, c. a, Growth in colonies of unmarked ants (mean ± s.e.m.). Colony growth was unaffected by paint-marking (χ2 = 2.71, P = 0.10), the interaction of paint-marking with group size (χ2 = 0.31, P = 0.58) or the interaction of paint-marking with genotype (χ2 = 0.17, P = 0.68). b, Larval time-to-eclosion in colonies of unmarked ants (mean ± s.e.m.). Time to eclosion of larvae was increased by paint-marking of the workers (square-root-transformed time to eclosion: χ2 = 8.98, P = 0.003), but paint-marking did not interact with group size (χ2 = 0.09, P = 0.77) or genotype (χ2 = 0.22, P = 0.64). c–g, Effects of density on behaviour and fitness. Colonies consisted of 4 or 16 workers (and a matching number of larvae) in small or large Petri dishes (SB and LB, respectively), corresponding to 3 densities (shades of blue). c, Mean spatial fidelity (mean ± s.e.m.) was affected by group size (χ2 = 6.49, P = 0.01), box size (χ2 = 38.46, P = 5.6 × 10−10) and density (group size:box size: χ2 = 6.76, P = 0.009). d, Behavioural variation (mean ± s.e.m.) was affected by group size (χ2 = 7.44, P = 0.006) but not by box size (χ2 = 0.08, P = 0.77) or density (group size:box size: χ2 = 3.50, P = 0.06). e, Behavioural consistency (mean ± s.e.m.) was not affected by group size (χ2 = 0.03, P = 0.87), box size (χ2 = 0.22, P = 0.64) or density (group size:box size: χ2 = 0.02 P = 0.88). Behavioural consistency was transformed by (behavioural consistency + 0.21)1.5. f, Colony growth (mean ± s.e.m.) was affected by group size (χ2 = 3.91, P = 0.048), but not by box size (χ2 = 0.04, P = 0.85) or density (group size:box size: χ2 = 1.00, P = 0.32). Colony growth was transformed by (growth + 0.4)1.9. Thus, the effect of density is small relative to that of group size, and variation in density alone is therefore very unlikely to have confounded our results. g, Larval time-to-eclosion (mean ± s.e.m.) was affected by group size (χ2 = 35.74, P = 2.26 × 10−9) and box size (χ2 = 10.45, P = 0.001) but not by density (group size:box size: χ2 = 0.67, P = 0.41). Time to eclosion was transformed by (time to eclosion)−0.3. h–j, Removing individuals with more than three ovarioles from analyses did not qualitatively affect our results. h, Mean spatial fidelity of the colony increases with group size. Black, mean r.m.s.d. (±s.e.m.) as a function of group size, after excluding individuals with four or more ovarioles. Blue, 95% confidence interval generated by resampling workers from 16-worker colonies (Extended Data Fig. 5a). i, Behavioural variation increases with group size. Black, standard deviation in r.m.s.d. per colony as a function of group size (mean ± s.e.m.), after excluding individuals with more than three ovarioles. Ninety-five per cent confidence intervals and sample sizes are as in a. j, Day-to-day rank consistency increases with group size. Black, mean r.m.s.d. rank correlation coefficients over consecutive days in the first brood care phase as a function of group size (mean ± s.e.m.), after excluding individuals with more than three ovarioles. Blue, 95% confidence intervals generated by randomizing daily ranks in each colony. In a, b, h–j, data for genotypes A and B are pooled.