The nested t-test compares two groups when each subject contributes sub-replicates, fitting a random-intercept model with group fixed and subject random.
Nested data — multiple measurements per subject, multiple cells per dish, multiple students per classroom — violates the independence assumption of ordinary t-tests. Pretending you have nₜₒₜₐₗ independent observations inflates the apparent sample size and gives anti-conservative p-values.
Eisenhauer's rule of thumb: don't average within subject (loses within-subject variance information) and don't ignore the nesting (overstates n). Instead, fit a mixed model that partitions variance into between-subject (σ²_subject) and within-subject (σ²_residual) components. The group effect is tested on the between-subject scale where it logically lives.
ICC = σ²_subject / (σ²_subject + σ²_residual) quantifies how much of the total variance is between subjects. High ICC (> 0.5) ⇒ subject identity matters a lot and the nesting must be respected; low ICC (< 0.05) ⇒ measurements within subject are nearly independent and the inflation from ignoring nesting is small.
Response + group (2 levels) + subject (random factor).
Omnibus LRT χ² for the group effect + fixed-effect table with Wald z + variance components σ²(subject) + σ²(residual) + ICC.
Compare to averaging-then-t-test: nested gives more power when within-subject variance is non-trivial.
Compare to ignore-nesting-t-test: nested has correct type-I rate while the naive test inflates.