Why a p-value isn’t enough, and how to compute and interpret Cohen’s d effect size in R — the standardized measure of how big a difference between two groups really is.
Author
Rverse Analytics
Published
July 7, 2026
A p-value tells you whether an effect is there; an effect size tells you how big it is. With a large enough sample even a meaningless difference becomes “significant,” which is why every result should report an effect size too. For two means, that’s usually Cohen’s d. (Planning a study? Effect size is the key input to our sample size calculator.)
What Cohen’s d is
Cohen’s d is the difference between two group means expressed in pooled standard deviation units — so it’s comparable across studies and scales. Rough conventions:
d ≈ 0.2 — small
d ≈ 0.5 — medium
d ≈ 0.8 — large
Compute it in R
Base R doesn’t have a built-in, but it’s a three-line function. We’ll use the sleep dataset (extra hours of sleep under two drugs):
A d of this size points to a substantial difference between the two drugs — regardless of whether the p-value happens to clear 0.05 at this sample size.
These answer different questions. Report both: significance says “unlikely to be noise,” effect size says “and here’s how much it matters.” A tiny d with a tiny p-value (from a huge sample) is statistically significant but often practically irrelevant.
Reporting
State the effect size with a confidence interval, and interpret it in the units your audience cares about — a “medium” d means little to a clinician until you translate it back into real outcomes.
Want effects reported and interpreted properly, not just p-values? That’s how we work.