liveBook · Manning

Effect size

As explained in Effective Data Analysis

An effect size is a quantitative measure of the magnitude of a difference or relationship, independently of sample size.

An effect size describes how large a difference is, rather than merely whether a statistical test detects one. For a comparison of group means, Cohen’s d is one option. Unlike a significance result, an effect-size calculation is not driven by sample size. section 4.2.1

This distinction matters when datasets contain thousands or millions of records: nearly identical means can produce a statistically significant result. Before recommending action, set a minimum difference that matters in the domain. A 0.5% difference in student test scores may be unimportant, while the revenue from a 0.2% increase in conversion rate may justify attention. A confidence interval can help compare the estimated mean difference with that threshold. section 4.2.1

Keep two uses of effect size separate:

  • When interpreting results, use a measure such as Cohen’s d alongside significance testing and a domain-specific threshold; a low p-value alone does not establish a useful difference. section 4.2.1
  • Before collecting or testing data, specify an effect size to detect in a power analysis. A t-test exercise uses an assumed medium effect of 0.5 and 80% power to estimate the required sample size at different alpha levels. The assumed effect is a planning input, not an observed result. section 4.2.2
Figure 4.26 Increasing the sample size by a factor of 10 yields a statistically significant result.
figure

A tenfold increase in sample size makes the illustrated comparison statistically significant. Use the figure to see why significance alone cannot establish that the difference is large enough to matter. section 4.2.1

from statsmodels.stats.power import TTestIndPower     #1

pwr = TTestIndPower()     #2
sample = pwr.solve_power(effect_size = 0.5, 
     power = 0.8, 
     alpha = 0.05)
print(sample)

This Python listing supplies an assumed effect size, power, and alpha level to statsmodels to calculate a recommended sample size for an independent-samples t-test. section 4.2.2

How Effective Data Analysis covers it

How deep it goes
Names Cohen’s d and explains its interpretive role, then uses assumed effects in power analysis without deriving an effect-size formula.
Examples
Uses student test scores and conversion rates to illustrate meaningful differences, plus simulated normal samples to explore power-analysis inputs.
What it assumes
Assumes familiarity with t-tests and alpha levels; supplies runnable Python power-analysis and testing exercises rather than teaching effect-size calculation from zero.
What you can do after
Apply it via statsmodels power analysis to plan sample size, and evaluate significant results against a domain-specific minimum difference.
How it connects
Links effect size to t-tests, statistical significance, confidence intervals, domain-specific thresholds, and a priori power analysis.

Also explained in

Compare how 2 books explain effect size →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Effective Data Analysis. The section links point to the parts of the book it draws on.