A short simulation showing what unequal variances do to the classic Student’s t-test — and why the Welch correction costs you almost nothing.
Author
Rverse Analytics
Published
July 1, 2026
A question we get surprisingly often: “Levene’s test was significant — can I still run a t-test?” Yes — the Welch version. In fact, there is a good argument for using Welch by default, and a small simulation makes the point better than any citation.
The setup
Two groups, equal means (so the null hypothesis is true), but one group is twice as variable and half as large. Any test with a nominal α of .05 should reject in about 5% of runs.
set.seed(2026)sim_once <-function() { a <-rnorm(60, mean =50, sd =5) # larger, tighter group b <-rnorm(30, mean =50, sd =10) # smaller, noisier groupc(student =t.test(a, b, var.equal =TRUE)$p.value,welch =t.test(a, b, var.equal =FALSE)$p.value )}res <-t(replicate(10000, sim_once()))colMeans(res <0.05)
student welch
0.1088 0.0507
The Student’s t-test rejects a true null far more often than the promised 5%, while Welch stays honest.
Seeing it
library(ggplot2)rates <-data.frame(test =c("Student's t", "Welch's t"),rate =colMeans(res <0.05))ggplot(rates, aes(test, rate, fill = test)) +geom_col(width =0.55, show.legend =FALSE) +geom_hline(yintercept =0.05, linetype ="dashed", colour ="#1b2a4a") +scale_fill_manual(values =c("#2f6fed", "#17a2b8")) +scale_y_continuous(labels = scales::percent_format(accuracy =0.1)) +labs(title ="Empirical Type I error under unequal variances and group sizes",subtitle ="10,000 simulated studies; dashed line marks the nominal 5% level",x =NULL, y ="False positive rate" ) +theme_minimal() +theme(plot.title =element_text(face ="bold", colour ="#1b2a4a"))
Figure 1
The takeaway
When variances and group sizes are both unequal, the classic pooled-variance t-test can be badly miscalibrated — here it roughly doubles the false-positive rate. Welch’s test handles this case and behaves almost identically when variances are equal. That asymmetry is why t.test() in R uses Welch by default, and why we do too.