Effect sizes¶
Continuous and categorical effect-size helpers.
cohen_d ¶
Cohen's d using the pooled standard deviation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
a
|
Series | ndarray
|
Two independent samples ( |
required |
b
|
Series | ndarray
|
Two independent samples ( |
required |
Returns:
| Type | Description |
|---|---|
float or None
|
|
References
Cohen, J. (1988). Statistical Power Analysis for the Behavioral Sciences (2nd ed.). Lawrence Erlbaum.
hedges_g ¶
Hedges' g — Cohen's d with the small-sample bias correction.
g = d · J, where J ≈ 1 − 3/(4(n_a+n_b) − 9) (Hedges 1981).
eta_squared ¶
One-way ANOVA effect size: between-group / total sum-of-squares.
Ranges [0, 1]. Small ≈ 0.01, medium ≈ 0.06, large ≈ 0.14
(Cohen 1988).
omega_squared ¶
Less-biased counterpart to eta_squared (Hays 1973).
cramers_v ¶
Cramér's V — chi-square effect size normalised to [0, 1].
V = √(χ² / (N · (min(R, C) − 1))).
phi_coefficient ¶
Phi — Cramér's V special case for 2×2 tables; φ = √(χ²/N).
auto_effect_size ¶
Pick a sensible effect size for the variable kind / number of groups.
Returns (name, value) so callers can both display the metric and
label it in a footnote.