The Linear Models unit's running population is 5,176 adults from the National Health and Nutrition Examination Survey (NHANES) of 2017 to 2018. Its 2,512 men have a mean systolic blood pressure of 127.2 mm Hg and the 2,664 women 125.2 mm Hg. Treated as a sample, the difference of 1.99 mm Hg gives a two-sample $t$ statistic of 3.61 and a p-value of 0.00031. The p-value is small because the sample is large, not because the difference is. A woman and a man drawn at random from these adults have the man's pressure higher only 55% of the time. How large is a difference between two groups, on a scale that does not grow with the sample, and how precisely does a sample measure it?
An effect size is a number that describes the size of a difference or an association and estimates a population quantity that does not depend on the sample size. The best known is the standardized mean difference, the difference between two means divided by a standard deviation. Here it is $d = 0.100$: the two means are a tenth of a standard deviation apart. Others are the probability that a value from one group exceeds a value from the other, the risk difference and odds ratio for a yes-or-no outcome, and the share of variation explained. This article derives the sampling theory of each and checks it on the survey and on the site's own experiments.
Here is the route. First we show why a test statistic cannot serve as a size. Then we derive the exact distribution of $d$, its bias and Hedges' correction, its variance and an exact confidence interval. We measure how well the intervals cover on samples from the survey. Next we turn to the probability of superiority $A$, which the site's evolutionary computing articles report for their thirty-run comparisons, and ask what thirty runs can say. Finally we treat outcomes that are yes or no, relate $d$ to the correlation and to $\eta^2$ of the linear model, and ask what labels such as "small" and "large" mean. The article assumes the pooled two-sample $t$ test from The Two-Sample t-Test. It also assumes the noncentral $t$ distribution from Power and Sample Size for a Test of a Mean.
A test statistic is not a size
Here is the idea in one sentence. A test statistic is an effect size multiplied by a factor that grows with the square root of the sample size, so the same effect gives any p-value one likes.
Take two independent samples, $x_1, \ldots, x_{n_1}$ and $y_1, \ldots, y_{n_2}$, with means $\bar x$, $\bar y$ and sample variances $s_1^2$, $s_2^2$ (divisor $n_i - 1$). The pooled variance and its degrees of freedom are
$$s_p^2 = \frac{(n_1 - 1)s_1^2 + (n_2 - 1)s_2^2}{m}, \qquad m = n_1 + n_2 - 2,$$
and the pooled $t$ statistic of The Two-Sample t-Test is $t = (\bar x - \bar y)/\big(s_p\sqrt{1/n_1 + 1/n_2}\big)$. Write
$$\tilde n = \left(\frac{1}{n_1} + \frac{1}{n_2}\right)^{-1} = \frac{n_1 n_2}{n_1 + n_2}, \qquad d = \frac{\bar x - \bar y}{s_p}.$$
Then, directly from the definitions,
$$t = d\sqrt{\tilde n}.$$
The statistic is the effect size $d$ times $\sqrt{\tilde n}$, which is half the harmonic mean of the group sizes, under a square root. For the survey, $\tilde n = 1{,}292.9$ and the pooled standard deviation is 19.88 mm Hg, so $d = 1.99/19.88 = 0.100$ and $t = 0.100 \times \sqrt{1{,}292.9} = 3.61$.
Example (the same effect at other sample sizes). Keep $d = 0.100$ and take $n$ adults in each group, so $\tilde n = n/2$ and $t = d\sqrt{n/2}$ on $2n - 2$ degrees of freedom.
| Adults per group | 20 | 100 | 500 | 2,588 | 20,000 |
|---|---|---|---|---|---|
| $t$ | 0.32 | 0.71 | 1.59 | 3.61 | 10.03 |
| Two-sided p-value | 0.75 | 0.48 | 0.113 | 0.00031 | $1.2 \times 10^{-23}$ |
The difference is the same in every column. Only the evidence that it is not zero changes. The p-value answers "is there a difference?", and with enough data the answer is almost always yes. It does not say how large the difference is. For this reason Comparing Systems with Significance Tests records Sakai's (2016) recommendation that retrieval experiments report effect sizes beside p-values. Hypothesis Tests for a Mean makes the same point through the confidence interval, which carries both the verdict and the size.
The standardized mean difference
Why divide by a standard deviation? A difference of 1.99 mm Hg means something to a physician and nothing to a reader who does not know how much blood pressure varies. Dividing by the standard deviation puts differences measured in different units on one scale, which is what meta-analysis and comparisons across studies need. The price is that the scale now depends on which standard deviation is used, a choice Worked problem 1 examines.
The model. Let $X_1, \ldots, X_{n_1}$ be independent and normal with mean $\mu_1$ and variance $\sigma^2$, and $Y_1, \ldots, Y_{n_2}$ independent of them and normal with mean $\mu_2$ and the same variance. The population standardized mean difference is
$$\delta = \frac{\mu_1 - \mu_2}{\sigma},$$
and $d = (\bar X - \bar Y)/s_p$ is its natural estimate. On this page Greek letters are population values and $d$ is the estimate. The estimate with the pooled standard deviation is often called Cohen's $d$ and written $d_s$; Lakens (2013) reviews the variants and attributes $d_s$ to Cohen (1988).
Lemma 1 (the distribution of d). Under the model, $\sqrt{\tilde n}\,d$ has the noncentral $t$ distribution with $m = n_1 + n_2 - 2$ degrees of freedom and noncentrality $\lambda = \delta\sqrt{\tilde n}$.
Proof. Write
$$\sqrt{\tilde n}\,d = \frac{Z + \lambda}{\sqrt{V/m}}, \qquad Z = \frac{\bar X - \bar Y - (\mu_1 - \mu_2)}{\sigma\sqrt{1/n_1 + 1/n_2}}, \qquad V = \frac{m s_p^2}{\sigma^2}.$$
The identity holds because $\bar X - \bar Y = \sigma(Z + \lambda)/\sqrt{\tilde n}$ and $s_p = \sigma\sqrt{V/m}$. The difference of means is normal with variance $\sigma^2(1/n_1 + 1/n_2) = \sigma^2/\tilde n$, so $Z$ is standard normal. The Two-Sample t-Test proves that $V$ has the chi-squared distribution with $m$ degrees of freedom. It also proves that $V$ is independent of the two sample means, hence of $Z$. A variable $(Z + \lambda)/\sqrt{V/m}$, with $Z$ standard normal independent of $V \sim \chi^2_m$, is by definition noncentral $t$ with $m$ degrees of freedom and noncentrality $\lambda$. This is the definition used in Power and Sample Size for a Test of a Mean. $\square$
Everything that follows about $d$ under normality is a consequence of this representation. It separates the two sources of error: $Z$, the noise in the difference of means, and $V$, the noise in the standard deviation used as the yardstick.
The bias of d and its correction
Is $d$ unbiased for $\delta$? It is not. Here is the idea. On average $1/s_p$ is larger than $1/\sigma$, because $1/x$ is convex. An underestimated standard deviation inflates $d$ by more than an overestimated one deflates it.
Theorem 1 (the mean of d; Hedges, 1981). Under the model, for $m \ge 2$,
$$E[d] = \frac{\delta}{J(m)}, \qquad J(m) = \frac{\Gamma(m/2)}{\sqrt{m/2}\;\Gamma\big((m - 1)/2\big)},$$
and $0 < J(m) < 1$. So $d$ overstates $|\delta|$ on average whenever $\delta \ne 0$, and
$$g = J(m)\,d$$
is unbiased for $\delta$.
Proof. By Lemma 1, $E[d] = E[Z + \lambda]\,E\big[(V/m)^{-1/2}\big]/\sqrt{\tilde n}$, using the independence of $Z$ and $V$. The first factor is $\lambda$. For the second, the chi-squared density with $m$ degrees of freedom is $v^{m/2 - 1}e^{-v/2}/\big(2^{m/2}\Gamma(m/2)\big)$ for $v > 0$, so
$$E\big[V^{-1/2}\big] = \frac{1}{2^{m/2}\Gamma(m/2)}\int_0^\infty v^{(m - 1)/2 - 1}e^{-v/2}\,dv = \frac{2^{(m - 1)/2}\,\Gamma\big((m - 1)/2\big)}{2^{m/2}\,\Gamma(m/2)} = \frac{\Gamma\big((m - 1)/2\big)}{\sqrt{2}\,\Gamma(m/2)}.$$
The integral is the gamma integral $\int_0^\infty v^{a - 1}e^{-v/2}\,dv = 2^a\Gamma(a)$ with $a = (m - 1)/2$, which is finite because $a > 0$ for $m \ge 2$. Then $E[(V/m)^{-1/2}] = \sqrt{m}\,E[V^{-1/2}] = 1/J(m)$, and $E[d] = \lambda/(J(m)\sqrt{\tilde n}) = \delta/J(m)$.
For the inequality, $x \mapsto x^{-1/2}$ is strictly convex on $(0, \infty)$ and $V/m$ is not constant, so Jensen's inequality (Probability Inequalities) gives $E[(V/m)^{-1/2}] > (E[V/m])^{-1/2} = 1$, since $E[V] = m$. Hence $1/J(m) > 1$. Unbiasedness of $g$ follows by linearity. $\square$
Hedges (1981) obtained the exact distribution of the estimator and showed its small-sample bias. He also showed that the unbiased version has the least variance among unbiased estimators. This page proves the bias and the correction, and cites the minimum variance property. The factor is close to 1 unless the samples are small. A rational approximation, $1 - 3/(4m - 1)$, is in wide use; the table checks it rather than derives it.
| Degrees of freedom $m$ | 2 | 4 | 8 | 18 | 38 | 58 | 98 |
|---|---|---|---|---|---|---|---|
| $J(m)$, exact | 0.5642 | 0.7979 | 0.9027 | 0.9576 | 0.9801 | 0.9870 | 0.9923 |
| $1 - 3/(4m - 1)$ | 0.5714 | 0.8000 | 0.9032 | 0.9577 | 0.9801 | 0.9870 | 0.9923 |
| Bias of $d$, $1/J(m) - 1$ (%) | 77.2 | 25.3 | 10.8 | 4.4 | 2.0 | 1.3 | 0.8 |
At $m = 2$, $J(2) = \Gamma(1)/\Gamma(1/2) = 1/\sqrt{\pi}$. With ten per group ($m = 18$), $d$ overstates $\delta$ by 4.4% on average; with thirty per group ($m = 58$), by 1.3%. For the survey ($m = 5{,}174$) the factor is 0.99986 and $g = 0.100$ as well.
Example (the bias is a ratio, not a shift). One might expect the bias to matter most when $\delta$ is near zero. The opposite holds: the bias is $\delta(1/J(m) - 1)$, proportional to $\delta$, so it is zero at $\delta = 0$ and grows with $|\delta|$. Correcting $d$ shrinks large estimates more than small ones.
The variance of d and g
Theorem 2 (exact variances). Under the model, for $m \ge 3$,
$$\operatorname{Var}(d) = \frac{m}{m - 2}\left(\frac{1}{\tilde n} + \delta^2\right) - \frac{\delta^2}{J(m)^2}, \qquad \operatorname{Var}(g) = J(m)^2\operatorname{Var}(d).$$
Since $J(m) < 1$, $g$ has a smaller variance than $d$ for every $\delta$, and being unbiased it also has a smaller mean squared error.
Proof. By Lemma 1, $\tilde n\,E[d^2] = E[(Z + \lambda)^2]\,m\,E[V^{-1}]$. The first factor is $1 + \lambda^2$. The same gamma integral as in Theorem 1 with $a = m/2 - 1$, finite for $m \ge 3$, gives $E[V^{-1}] = 2^{m/2 - 1}\Gamma(m/2 - 1)/\big(2^{m/2}\Gamma(m/2)\big) = 1/(m - 2)$, using $\Gamma(m/2) = (m/2 - 1)\Gamma(m/2 - 1)$. So $E[d^2] = \frac{m}{m - 2}(1 + \lambda^2)/\tilde n = \frac{m}{m - 2}(1/\tilde n + \delta^2)$. Subtracting $E[d]^2 = \delta^2/J(m)^2$ gives $\operatorname{Var}(d)$. The variance of $g = J(m)d$ is $J(m)^2\operatorname{Var}(d)$. Finally, the mean squared error of $d$ is $\operatorname{Var}(d)$ plus the square of its bias, which is at least $\operatorname{Var}(d) > \operatorname{Var}(g)$, the mean squared error of $g$. $\square$
The script checks both moments against SciPy's noncentral $t$ distribution. A large-sample form is easier to use. Write $d = D/W$ with $D = (\bar X - \bar Y)/\sigma$, normal with mean $\delta$ and variance $1/\tilde n$, and $W = s_p/\sigma = \sqrt{V/m}$, independent of $D$. Since $V/m$ has mean 1 and variance $2/m$, the delta method of The Delta Method gives $W$ a variance of about $(1/2)^2 \times 2/m = 1/(2m)$. Applying the delta method to the ratio $D/W$ at $(\delta, 1)$, with the two parts independent,
$$\operatorname{Var}(d) \approx \frac{1}{\tilde n} + \frac{\delta^2}{2m}.$$
The first term is the noise in the difference of means, the second the noise in the yardstick, which matters only when the effect is large.
Example (ten per group, $\delta = 0.5$). Here $m = 18$ and $\tilde n = 5$. Theorem 2 gives $\operatorname{Var}(d) = 0.2336$ and $\operatorname{Var}(g) = 0.2143$; the large-sample form gives 0.2069; the mean squared error of $d$ is 0.2341. With ten observations per group the standard deviation of $d$ is about 0.48, almost the size of the effect: a single small study measures a medium effect very roughly.
An exact interval for delta
An interval of the form $d$ plus or minus a fixed multiple of one standard error is not exact here, because the variance of $d$ depends on $\delta$. The noncentral $t$ distribution gives an exact interval instead. Here is the idea in one sentence: keep each candidate $\delta$ for which the observed $t$ is a typical value of the noncentral $t$ with that $\delta$.
Theorem 3 (inverting the noncentral t). Fix $m$ and the observed $t = d\sqrt{\tilde n}$. Let $F_\lambda$ be the distribution function of the noncentral $t$ with $m$ degrees of freedom and noncentrality $\lambda$. Then $\lambda \mapsto F_\lambda(t)$ is continuous and strictly decreasing, from 1 as $\lambda \to -\infty$ to 0 as $\lambda \to \infty$. So there are unique $\lambda_L < \lambda_U$ with $F_{\lambda_L}(t) = 1 - \alpha/2$ and $F_{\lambda_U}(t) = \alpha/2$, and
$$\left(\frac{\lambda_L}{\sqrt{\tilde n}},\ \frac{\lambda_U}{\sqrt{\tilde n}}\right)$$
is a confidence interval for $\delta$ with coverage exactly $1 - \alpha$ under the model.
Proof. Write $T = (Z + \lambda)/W$ with $W = \sqrt{V/m} > 0$ independent of $Z$. Given $W = w$, $T \le t$ exactly when $Z \le tw - \lambda$, so $F_\lambda(t) = E[\Phi(tW - \lambda)]$, with $\Phi$ the standard normal distribution function. For $\lambda < \lambda'$, $\Phi(tW - \lambda) > \Phi(tW - \lambda')$ for every value of $W$, because $\Phi$ is strictly increasing, so $F_\lambda(t) > F_{\lambda'}(t)$. The integrand is bounded by 1 and continuous in $\lambda$, so $F_\lambda(t)$ is continuous in $\lambda$ by dominated convergence. By the same argument it tends to 1 as $\lambda \to -\infty$ and to 0 as $\lambda \to \infty$. The intermediate value theorem gives the unique $\lambda_L$ and $\lambda_U$.
For coverage, let $\lambda_0 = \delta\sqrt{\tilde n}$ be the true value and $T$ the random statistic. By monotonicity, $\lambda_L(T) \le \lambda_0 \le \lambda_U(T)$ exactly when $\alpha/2 \le F_{\lambda_0}(T) \le 1 - \alpha/2$. Since $F_{\lambda_0}$ is the continuous distribution function of $T$, the variable $F_{\lambda_0}(T)$ is uniform on $(0, 1)$, and the probability of that event is $1 - \alpha$. $\square$
The interval is computed by solving the two equations numerically. The approximate alternative is the Wald interval $d \pm z_{1-\alpha/2}\sqrt{1/\tilde n + d^2/(2m)}$, with the large-sample variance evaluated at $d$. For the survey's 5,176 adults the two agree to three decimals: $\delta$ lies between 0.046 and 0.155 with 95% confidence. The interval says something the p-value did not: the difference is real and also small, at most about a sixth of a standard deviation.
Ten men and ten women
A small sample shows the interval doing its main job, which is to say how little is known. Ten men and ten women drawn at random from the survey (NumPy's default_rng(20261123), without replacement) have these pressures, in mm Hg:
| Men | 130.7 | 134.0 | 122.7 | 115.3 | 128.0 | 123.3 | 140.7 | 113.3 | 106.7 | 122.7 |
|---|---|---|---|---|---|---|---|---|---|---|
| Women | 153.3 | 116.0 | 125.3 | 130.0 | 104.0 | 104.7 | 123.3 | 152.7 | 127.3 | 118.0 |
The means are 123.73 and 125.47, the standard deviations 10.17 and 16.94, and the pooled standard deviation $s_p = \sqrt{(9 \times 10.17^2 + 9 \times 16.94^2)/18} = 13.97$. So
$$d = \frac{-1.733}{13.97} = -0.124, \qquad g = J(18)\,d = 0.9576 \times (-0.124) = -0.119.$$
The pressures are means of up to three readings, so they are multiples of a third of a millimeter; the table rounds them to 0.1, and the difference of the unrounded means, $-1.733$, is used here.
With $\tilde n = 5$, $t = -0.124\sqrt{5} = -0.28$ and the two-sided p-value is 0.78. Theorem 3 gives the 95% interval $(-1.00, 0.76)$ for $\delta$, and the Wald interval is $(-1.00, 0.75)$. In this sample the women's mean is the higher one, the reverse of the population. The interval runs from a large effect in one direction to a medium-to-large effect in the other. "Not significant" here does not mean "no difference"; it means that ten per group cannot tell a large difference from none, and the interval shows it.
How well the intervals cover
Theorem 3 is exact for normal data with equal variances. The survey's pressures are neither normal (they are skewed to the right) nor of equal spread (the men's standard deviation is 18.1 mm Hg, the women's 21.4). How much does that matter? The script treats the 5,176 adults as the population. Its $\delta = 0.101$ uses the pooled population standard deviation $\sqrt{(\sigma_1^2 + \sigma_2^2)/2}$, which is what $s_p$ estimates when the groups have equal sizes. For each of 30 seeds (default_rng([51000000, n, s])) it draws 2,000 pairs of samples of $n$ per group with replacement. It records the mean of $d$ and of $g$ over all 60,000 samples, with its Monte Carlo standard error, and the share of intervals that cover $\delta$ for each seed. As a control it repeats this for normal populations with equal variances and the same $\delta$.
| Populations, per group | Mean of $d$ (SE) | Mean of $g$ (SE) | Noncentral $t$ coverage | Wald coverage |
|---|---|---|---|---|
| Survey, 10 | 0.127 (0.0020) | 0.121 (0.0019) | 0.948 (0.945 to 0.951) | 0.945 (0.942 to 0.949) |
| Survey, 30 | 0.109 (0.0011) | 0.107 (0.0011) | 0.948 (0.946 to 0.952) | 0.948 (0.946 to 0.951) |
| Normal, 10 | 0.104 (0.0019) | 0.100 (0.0018) | 0.952 (0.947 to 0.955) | 0.949 (0.945 to 0.951) |
| Normal, 30 | 0.103 (0.0011) | 0.102 (0.0011) | 0.952 (0.947 to 0.953) | 0.951 (0.946 to 0.953) |
The coverages are medians over the 30 seeds with interquartile ranges. Under normality the mean of $d$ agrees with Theorem 1's $\delta/J(m)$, which is 0.105 at ten per group and 0.102 at thirty, within about one Monte Carlo standard error, and $g$ removes the bias. Both intervals cover close to 95%, the exact one marginally better at ten per group. On the survey's populations the coverage is still close to 95%, but $d$ is biased upward by more than Theorem 1 predicts: at ten per group by about ten Monte Carlo standard errors, at thirty by about six. $g$ removes only the normal-theory part: at ten per group $g$ averages 0.121 against $\delta = 0.101$. In this experiment the extra bias came from the survey's populations: their skewness, their unequal spreads, or both. The open questions below name the experiment that would separate them.
The probability of superiority
The standardized difference has two weaknesses. It depends on a standard deviation, which is a poor yardstick for skewed data, and it changes when the data are transformed. The probability of superiority avoids both. For independent $X$ from one population and $Y$ from the other,
$$A = P(X > Y) + \tfrac12 P(X = Y).$$
$A = 1/2$ when neither tends to be larger, and $A$ runs from 0 to 1. McGraw and Wong (1992) proposed the "common language effect size": the probability that a score sampled from one distribution is greater than one sampled from the other, computed from means and variances under normality. Vargha and Delaney (2000) generalized it as the "$A$ measure of stochastic superiority". Their $A$ applies to any variable that is at least ordinal and comes with exact methods for point and interval estimation; ties count one half in the definition used here. The same quantity is the $\theta$ of What the Rank-Sum Test Tests and the area under the ROC curve of ROC Curves for Diagnostic Tests.
Its estimate is the share of the $n_1 n_2$ pairs in which the first value is larger, counting ties as one half:
$$\hat A = \frac{1}{n_1 n_2}\sum_{i=1}^{n_1}\sum_{j=1}^{n_2}\Big(\mathbf 1\{x_i > y_j\} + \tfrac12\mathbf 1\{x_i = y_j\}\Big) = \frac{U}{n_1 n_2} = \frac{R_1 - n_1(n_1 + 1)/2}{n_1 n_2},$$
Here $U$ is the Mann–Whitney statistic and $R_1$ the sum of the first sample's ranks in the combined sample, with tied values given their average rank. The Wilcoxon Rank-Sum Test proves that $U$ and the rank sum are the same test. ROC Curves for Diagnostic Tests derives the exact variance of $\hat A$ for any two distributions, and the standard error of DeLong, DeLong and Clarke-Pearson (1988) from placement values. Neither is repeated here. What this section adds is what $A$ means as an effect size.
Theorem 4 (A for normal populations). If $X$ is normal with mean $\mu_1$ and variance $\sigma_1^2$, and $Y$ independent of it and normal with mean $\mu_2$ and variance $\sigma_2^2$, then
$$A = \Phi\!\left(\frac{\mu_1 - \mu_2}{\sqrt{\sigma_1^2 + \sigma_2^2}}\right), \qquad\text{and with equal variances}\quad A = \Phi\!\left(\frac{\delta}{\sqrt 2}\right).$$
Proof. $X - Y$ is normal with mean $\mu_1 - \mu_2$ and variance $\sigma_1^2 + \sigma_2^2$, and $P(X = Y) = 0$. So $A = P(X - Y > 0) = P\big(Z > -(\mu_1 - \mu_2)/\sqrt{\sigma_1^2 + \sigma_2^2}\big)$ for a standard normal $Z$, which is $\Phi\big((\mu_1 - \mu_2)/\sqrt{\sigma_1^2 + \sigma_2^2}\big)$ by symmetry. With $\sigma_1 = \sigma_2 = \sigma$ the argument is $\delta/\sqrt 2$. $\square$
So the labels that Cohen attached to $d$ translate into values of $A$ under normality: $\delta = 0.2$, 0.5 and 0.8 give $A = 0.556$, 0.638 and 0.714. The values 0.56, 0.64 and 0.71 that are often quoted as small, medium and large values of $A$ are these, rounded.
Theorem 5 (invariance). If $h$ is strictly increasing, $A$ computed from $h(X)$ and $h(Y)$ equals $A$ computed from $X$ and $Y$, and the same holds for $\hat A$ on any samples.
Proof. A strictly increasing $h$ satisfies $h(x) > h(y)$ exactly when $x > y$, and $h(x) = h(y)$ exactly when $x = y$. So every indicator in the definitions is unchanged. $\square$
The standardized difference has no such property. On the logarithm of blood pressure the survey's $d$ is 0.132 instead of 0.100, while $A$ is unchanged. For skewed outcomes, and for outcomes that are only ordered, such as the best fitness found by an optimizer, $A$ describes the difference without committing to a scale.
Back to the survey. For the 2,512 men and 2,664 women, the man's pressure is higher in 54.7% of the pairs of a man and a woman, and 0.98% of the pairs are tied. Counting ties as one half gives $A = 0.552$. Theorem 4 with the two groups' own means and standard deviations predicts 0.528. The gap shows that the pressures are not normal. Both distributions have a long right tail, and the women's, being more spread, carries their mean further above their median: by 3.9 mm Hg, against 2.5 for the men. So the medians differ by 3.3 mm Hg while the means differ by only 2.0, and a typical man's pressure exceeds a typical woman's by more than the means suggest. The two summaries answer different questions. $d$ compares means against a common spread, and $A$ compares typical members. With 5,176 adults, the DeLong standard error of $A$ is 0.0080.
Thirty runs of a genetic algorithm
The site's evolutionary computing articles compare methods by $A$ over thirty seeded runs:
- a binary GA on De Jong's test functions compares 8-bit and 16-bit encodings;
- Binary Encoding and Gray Codes compares Gray and binary coding;
- Evolutionary Neural Architecture Search compares search methods.
The script reruns the De Jong experiment exactly, through the experiment's own run function with seeds 0 to 29 for each function and encoding. Here $A$ is the probability that a 16-bit run ends lower (better) than an 8-bit run:
| Function | $\hat A$ | DeLong SE | 95% interval | Rank-sum p | Brunner–Munzel p |
|---|---|---|---|---|---|
| Sphere | 0.523 | 0.078 | 0.37 to 0.68 | 0.76 | 0.77 |
| Rosenbrock | 0.394 | 0.076 | 0.25 to 0.54 | 0.16 | 0.17 |
| Step | 0.491 | 0.070 | 0.35 to 0.63 | 0.90 | 0.90 |
| Noisy quartic | 0.419 | 0.075 | 0.27 to 0.57 | 0.28 | 0.28 |
The point estimates are the values on the De Jong page (0.52, 0.39, 0.49, 0.42), which the script asserts. For Rosenbrock, $U = 355$ of the 900 pairs. The step function's values are integers, and 332 of its 900 pairs are tied. The intervals are $\hat A \pm 1.96$ times the DeLong standard error. The rank-sum p-value is SciPy's normal approximation with the tie correction. The Brunner–Munzel test (Brunner and Munzel, 2000) tests $A = 1/2$ without assuming that the two distributions are equal apart from a shift. It studentizes $\hat A$ with a variance estimated from the ranks within and across samples.
Every interval contains one half. The De Jong page reads the Rosenbrock value as "somewhat worse" for the 16-bit encoding. With thirty runs per encoding the data are consistent with anything from a large disadvantage ($A = 0.25$) to a slight advantage (0.54). When the two methods' results have nearly the same distribution, the standard error of $\hat A$ with thirty runs per method is about $\sqrt{(n_1 + n_2 + 1)/(12 n_1 n_2)} = 0.0752$. That is the null variance of $U$ from The Wilcoxon Rank-Sum Test, divided by $(n_1 n_2)^2$. When the spreads differ it can be larger, up to 0.0913 at $A = 1/2$ (Worked problem 3). The observed DeLong standard errors, 0.070 to 0.078, are close to the null value. So differences in $A$ smaller than about 0.15 cannot be resolved. Worked problem 3 turns this into a number of runs.
Do the intervals cover at thirty runs? The script treats each encoding's thirty observed runs as a population, so the true $A$ between the two populations is the observed $\hat A$. It draws thirty runs with replacement from each and records whether $\hat A \pm 1.96$ SE covers the truth, 1,000 times for each of 30 seeds (default_rng([52000000, f, s])). The median coverage was:
- Rosenbrock: 0.943 (interquartile range 0.936 to 0.950);
- the step function, with its ties: 0.941 (0.938 to 0.946);
- the sphere: 0.942 (0.939 to 0.946).
In this experiment the simple interval covered slightly less than 95%, by about one percentage point, at the site's standard of thirty runs.
Effect sizes for a yes-or-no outcome
When the outcome is yes or no, the natural effect sizes compare the two proportions $p_1$ and $p_2$. Relative Risk and the Odds Ratio defines the risk difference $p_1 - p_2$, the relative risk $p_1/p_2$ and the odds ratio $\frac{p_1/(1 - p_1)}{p_2/(1 - p_2)}$. It also proves which study designs can estimate each, and Intervals and Adjustment for Relative Risks and Odds Ratios derives their intervals. The reciprocal of the risk difference, often reported as the number needed to treat, is the number of people who must move from the second group to the first for one more to have the outcome.
Call a systolic pressure of 130 mm Hg or more "high". Among the survey's men the share is 37.3%, among women 34.7%. The risk difference is 2.6 percentage points, the relative risk 1.074, the odds ratio 1.118, and the reciprocal of the risk difference 39.
Meta-analyses often need to put odds ratios and standardized differences on one scale. The conversions rest on a latent-variable model, which this page states and proves.
Theorem 6 (from a threshold model to d). Suppose an unobserved continuous variable is $Y = \mu_g + s\,\varepsilon$ in group $g$, with the same scale $s$ in both groups and $\varepsilon$ having a continuous distribution function $H$, symmetric about 0 and strictly increasing. The outcome is "yes" when $Y > \tau$ for a fixed threshold $\tau$. Then
$$H^{-1}(p_1) - H^{-1}(p_2) = \frac{\mu_1 - \mu_2}{s}.$$
For normal $\varepsilon$ ($H = \Phi$, $s = \sigma$) the probit difference $\Phi^{-1}(p_1) - \Phi^{-1}(p_2)$ equals $\delta$. For logistic $\varepsilon$ ($H(x) = 1/(1 + e^{-x})$, so $H^{-1}(p) = \ln\frac{p}{1 - p}$) the log odds ratio equals $(\mu_1 - \mu_2)/s$, and since the logistic distribution has standard deviation $\pi/\sqrt3$, the standardized difference is
$$\delta = \ln(\mathrm{OR})\,\frac{\sqrt 3}{\pi} = \frac{\ln(\mathrm{OR})}{1.814}.$$
Proof. $p_g = P(\mu_g + s\varepsilon > \tau) = 1 - H\big((\tau - \mu_g)/s\big) = H\big((\mu_g - \tau)/s\big)$, by symmetry. Applying $H^{-1}$ and subtracting removes $\tau$. For the logistic case it remains to find the variance of $\varepsilon$, whose density is $e^{-x}/(1 + e^{-x})^2$, symmetric about 0. Expanding $1/(1 + u)^2 = \sum_{k \ge 1}(-1)^{k+1}k\,u^{k - 1}$ for $0 < u < 1$ with $u = e^{-x}$, and integrating term by term over $x > 0$. Term-by-term integration is justified by Fubini's theorem, because the series of absolute values has a finite integral: by Tonelli's theorem $\int_0^\infty x^2\sum_k k\,e^{-kx}\,dx = \sum_k 2/k^2 < \infty$. So
$$E[\varepsilon^2] = 2\int_0^\infty x^2\sum_{k \ge 1}(-1)^{k+1}k\,e^{-kx}\,dx = 2\sum_{k \ge 1}(-1)^{k+1}\frac{2}{k^2} = 4 \times \frac{\pi^2}{12} = \frac{\pi^2}{3},$$
using $\int_0^\infty x^2 k e^{-kx}dx = 2/k^2$ and $\sum_{k \ge 1}(-1)^{k+1}/k^2 = \zeta(2) - 2\sum_{k \ge 1}(2k)^{-2} = \zeta(2)/2 = \pi^2/12$, where $\zeta(2) = \sum_{k \ge 1} k^{-2} = \pi^2/6$ is Euler's classical sum, which this page does not prove. The standard deviation of $s\varepsilon$ is $s\pi/\sqrt3$, so $\delta = (\mu_1 - \mu_2)/(s\pi/\sqrt3) = \ln(\mathrm{OR})\sqrt3/\pi$. $\square$
Chinn (2000) proposed exactly this division of a log odds ratio by 1.81, to combine odds ratios with standardized differences in one meta-analysis. Chinn noted that its validity depends on comparable variation. The survey shows what happens when the model's assumption of equal spread fails. The actual $d$ for the pressures is 0.100. The conversions at four thresholds give:
| Threshold (mm Hg) | Odds ratio | $\ln(\mathrm{OR})/1.814$ | Probit difference |
|---|---|---|---|
| 120 | 1.51 | 0.228 | 0.257 |
| 130 | 1.12 | 0.062 | 0.069 |
| 140 | 0.93 | −0.039 | −0.040 |
| 160 | 0.69 | −0.204 | −0.177 |
Under Theorem 6 every row would give the same value. Instead the converted effect falls from about a quarter of a standard deviation to a fifth of one in the opposite direction. The women's pressures are more spread out: they are more often below 120 and more often above 140 than the men's. A dichotomized outcome measures the difference at its threshold, and when spreads differ, that difference depends on where the threshold is. The logit and probit conversions agree with each other near the middle of the distribution, where the logistic and normal shapes are close, and part company in the tail.
Effect sizes in the linear model
A two-group comparison is a linear model with one indicator column, and its effect size has a second form, the share of variation explained. The point-biserial correlation $r$ is Pearson's correlation between the outcome and a 0/1 indicator of the group.
Theorem 7 (d and r). For two groups coded 1 and 0,
$$r = \frac{d}{\sqrt{d^2 + m/\tilde n}}, \qquad r^2 = \frac{t^2}{t^2 + m}.$$
Proof. By The Geometry of Least Squares, $r^2$ is the $R^2$ of the regression on the indicator, the between-group sum of squares over the total. With $N = n_1 + n_2$ and grand mean $\bar z = (n_1\bar x + n_2\bar y)/N$, we have $\bar x - \bar z = n_2(\bar x - \bar y)/N$ and $\bar y - \bar z = -n_1(\bar x - \bar y)/N$, so the between-group sum of squares is
$$n_1\frac{n_2^2(\bar x - \bar y)^2}{N^2} + n_2\frac{n_1^2(\bar x - \bar y)^2}{N^2} = \frac{n_1 n_2}{N}(\bar x - \bar y)^2 = \tilde n(\bar x - \bar y)^2.$$
The within-group sum of squares is $m s_p^2$, and the total is their sum. Dividing numerator and denominator by $s_p^2$, $r^2 = \tilde n d^2/(\tilde n d^2 + m)$, and the sign of $r$ is that of $d$ for this coding. The second form follows from $t^2 = \tilde n d^2$. $\square$
For the survey, $r = 0.0501$ and $r^2 = 0.25\%$: sex accounts for a quarter of one percent of the variation in systolic pressure. Unlike $d$, $r$ depends on the group sizes through $m/\tilde n$, which is smallest when the groups are equal; the same $\delta$ gives a smaller correlation when one group is rare.
With $k$ groups, the analogue of $r^2$ is eta squared, $\eta^2 = \mathrm{SS}_b/\mathrm{SS}_t$, the share of the total sum of squares that lies between groups. It is the $R^2$ of a one-way analysis of variance. As an estimate of the population share it is biased upward, because even groups with equal means produce some spread among their sample means.
Theorem 8 (the expected sums of squares). Let group $j = 1, \ldots, k$ have $n_j$ independent observations with mean $\mu_j$ and common variance $\sigma^2$, $N = \sum_j n_j$, and $\bar\mu = \sum_j n_j\mu_j/N$. Then
$$E[\mathrm{SS}_w] = (N - k)\sigma^2, \qquad E[\mathrm{SS}_b] = (k - 1)\sigma^2 + \sum_j n_j(\mu_j - \bar\mu)^2.$$
Proof. $\mathrm{SS}_w = \sum_j (n_j - 1)s_j^2$, and each sample variance is unbiased for $\sigma^2$. For $\mathrm{SS}_b = \sum_j n_j(\bar y_j - \bar y)^2$, note $E[\bar y_j - \bar y] = \mu_j - \bar\mu$. The grand mean is $\bar y = \sum_l n_l\bar y_l/N$, so $\operatorname{Cov}(\bar y_j, \bar y) = (n_j/N)(\sigma^2/n_j) = \sigma^2/N$ and $\operatorname{Var}(\bar y) = \sigma^2/N$. Hence $\operatorname{Var}(\bar y_j - \bar y) = \sigma^2/n_j - 2\sigma^2/N + \sigma^2/N = \sigma^2/n_j - \sigma^2/N$. Then $E[\mathrm{SS}_b] = \sum_j n_j\big[\operatorname{Var}(\bar y_j - \bar y) + (\mu_j - \bar\mu)^2\big] = (k - 1)\sigma^2 + \sum_j n_j(\mu_j - \bar\mu)^2$. $\square$
So $\mathrm{SS}_b$ exceeds the between-group variation by $(k - 1)\sigma^2$ on average, and $\mathrm{SS}_b - (k - 1)\mathrm{MS}_w$, with $\mathrm{MS}_w = \mathrm{SS}_w/(N - k)$, is unbiased for $\sum_j n_j(\mu_j - \bar\mu)^2$. Replacing the numerator of $\eta^2$ by it gives
$$\varepsilon^2 = \frac{\mathrm{SS}_b - (k - 1)\mathrm{MS}_w}{\mathrm{SS}_t},$$
Equivalently, $\varepsilon^2 = 1 - (N - 1)\mathrm{MS}_w/\mathrm{SS}_t$. A correction of this kind was proposed by Kelley (1935), whose paper addresses the systematic difference between the sample and population correlation ratios; this page derives the formula and did not check it against Kelley's text. It is a ratio of estimates, so it is not exactly unbiased either.
The survey's age groups. Split the 5,176 adults into ages 18 to 39, 40 to 59 and 60 and over (1,731, 1,563 and 1,882 adults). Pressure rises steeply with age: the standardized difference between the oldest and youngest groups is 1.25. The population $\eta^2$ is 0.207, and 0.202 with the three groups weighted equally, which is what samples with equal group sizes estimate. The script draws $n$ adults from each group, 2,000 samples for each of 30 seeds (default_rng([53000000, n, s])):
| Adults per group | 5 | 10 | 30 |
|---|---|---|---|
| Mean of $\eta^2$ | 0.317 | 0.259 | 0.220 |
| Mean of $\varepsilon^2$ | 0.203 | 0.204 | 0.202 |
With five per group, $\eta^2$ averaged 0.317 against a target of 0.202. In this experiment $\varepsilon^2$ was within 0.003 of the target at every size, although the age groups do not share one variance (their standard deviations are 12.8, 18.5 and 20.7 mm Hg).
What the labels mean
Cohen (1988) suggested $d = 0.2$, 0.5 and 0.8 as small, medium and large effects. Lakens (2013), reporting that suggestion, adds that the values are arbitrary and should not be interpreted rigidly. On the survey, a $d$ of 0.100, "below small", is a sex difference of 2 mm Hg in mean pressure. The age difference of 1.25, well beyond "large", is 21.7 mm Hg between the oldest and youngest groups' means. Whether an effect matters depends on its consequence in the units of the problem. A shift of 2 mm Hg across a population may matter to public health and not at all to one patient.
Three rules follow from the sections above.
- Report the effect with its interval, in units where possible. "1.99 mm Hg (standardized 0.100, 95% interval 0.046 to 0.155)" carries the size, its precision and the verdict of the test.
- Say which effect size, which standardizer and which estimator. $d$ and $g$, pooled and control-group standard deviations, $d_z$ and $d_{av}$ (Worked problem 2) can differ by factors of three on the same data.
- Prefer $A$ for skewed or ordinal outcomes and for comparisons of optimizers, where no standard deviation is a natural yardstick, and report it with an interval, since thirty runs leave it uncertain by about $\pm 0.15$, or up to $\pm 0.18$ when the spreads differ.
What is proved, what is cited, what the experiment shows
Proved here. The identity $t = d\sqrt{\tilde n}$; the noncentral $t$ distribution of $d$ under normality (Lemma 1, from the distribution theory of the pooled $t$ test); the mean of $d$ and Hedges' unbiased $g$, with $J(m) < 1$ (Theorem 1); the exact variances of $d$ and $g$ and the dominance of $g$ in mean squared error (Theorem 2); the exact interval for $\delta$ by inverting the noncentral $t$ (Theorem 3); $A$ for normal populations (Theorem 4) and its invariance (Theorem 5); the threshold-model conversions, with the variance of the logistic distribution given Euler's sum $\zeta(2) = \pi^2/6$ (Theorem 6); the relation of $d$ to the point-biserial correlation (Theorem 7); the expected sums of squares behind the bias of $\eta^2$ (Theorem 8). The large-sample variance of $d$ is derived by the delta method, and Worked problem 3 proves the bound $\operatorname{Var}(\hat A) \le A(1 - A)/\min(n_1, n_2)$.
Cited or linked. The distribution theory of the pooled $t$ test, from The Two-Sample t-Test; the noncentral $t$, from Power and Sample Size for a Test of a Mean; the rank-sum form of $U$ and its null variance, from The Wilcoxon Rank-Sum Test; the exact and DeLong variances of $\hat A$, from ROC Curves for Diagnostic Tests; risk differences, relative risks and odds ratios, from Relative Risk and the Odds Ratio; the minimum variance property of $g$ (Hedges, 1981); the definitions of the common language effect size (McGraw and Wong, 1992) and of $A$ (Vargha and Delaney, 2000); the Brunner–Munzel test (Brunner and Munzel, 2000); the conversion by 1.81 (Chinn, 2000); a correction of $\eta^2$ of this kind (Kelley, 1935, by its abstract); Cohen's labels as reported by Lakens (2013). The approximation $1 - 3/(4m - 1)$ to $J(m)$ is checked numerically, not derived.
What the experiments show. On samples of 10 and 30 per group from the survey's men and women, both intervals for $\delta$ covered within about half a percentage point of 95%, and $d$ was biased upward by more than normal theory predicts at 10 per group. At thirty runs per method, the DeLong interval for $A$ covered about 94% of the time when the De Jong runs themselves served as the populations. $\varepsilon^2$ was close to the population value of the age groups where $\eta^2$ overstated it by half. These are observations on these populations and designs.
Worked problems
These problems were written for this article and extend it on the unit's survey data and the De Jong runs; the script tools/experiments/statistics/effect-sizes.py recomputes every number.
Problem 1 (which standard deviation?). The men's and women's standard deviations differ (18.1 and 21.4 mm Hg). Compute the standardized difference with each group's own standard deviation, and say which to report.
Solution. With the men's standard deviation the difference is $1.99/18.08 = 0.110$; with the women's, $1.99/21.44 = 0.093$; with the pooled one, 0.100. The ratio of the two standard deviations is 1.19, and the three values span 17% of the pooled one. None is wrong: each measures the difference in units of a different spread. Dividing by the control group's standard deviation, the estimator Hedges (1981) names after Glass, is natural when a treatment may change the spread as well as the mean, since the control's spread is then the untouched yardstick. With two groups that are both "natural" populations, as here, the pooled value is conventional. But Theorems 1 to 3 assume equal variances, and with a ratio of 1.19 the noncentral $t$ interval is an approximation. Hedges' (1981) title names Glass's estimator. The same correction factor applies to it with $m$ equal to the control group's $n - 1$, because Lemma 1's argument goes through with $V$ the control group's sum of squares over $\sigma^2$.
Problem 2 (a paired design). NHANES measured each adult's pressure up to three times in one sitting. For the adults with a first and a third reading, compare the standardized difference of the paired differences, $d_z = \bar d/s_{\text{diff}}$, with the difference standardized by the average standard deviation of the readings, $d_{av} = \bar d/s_{av}$ with $s_{av} = \sqrt{(s_1^2 + s_3^2)/2}$, and explain the ratio.
Solution. 4,718 adults have both readings. The first reading exceeds the third by 0.79 mm Hg on average. The differences have standard deviation 5.63, so $d_z = 0.140$. The readings themselves have $s_{av} = 19.22$, so $d_{av} = 0.79/19.22 = 0.041$. The ratio is set by the correlation of the two readings, $\rho = 0.957$. When the two readings have a common standard deviation $\sigma$, the variance of the difference is $\sigma^2 + \sigma^2 - 2\rho\sigma^2 = 2\sigma^2(1 - \rho)$. This is the variance of a difference of correlated variables that The Paired Samples t-Test uses, so
$$d_z = \frac{\bar d}{\sigma\sqrt{2(1 - \rho)}} = \frac{d_{av}}{\sqrt{2(1 - \rho)}},$$
and $0.041/\sqrt{2 \times 0.043} = 0.140$ agrees with the direct value. The same 0.79 mm Hg is below "small" on either scale, but 3.4 times larger on one than on the other: about a seventh of a standard deviation of the differences and a twenty-fifth of one between people. $d_z$ measures how consistently the third reading falls below the first, which governs the paired test's power. $d_{av}$ measures the shift against the spread between people, which is what a two-group study would report. A report must say which it gives.
Problem 3 (how many runs for an estimate of A?). The site's experiments use thirty runs per method. How precisely does that estimate $A$, and how many runs per method would give a 95% interval of half-width 0.10, or 0.05, when the two methods differ little?
Solution. When the two methods' results have the same distribution, The Wilcoxon Rank-Sum Test gives the null variance of $U$ as $n_1 n_2(n_1 + n_2 + 1)/12$. So with $n$ runs per method
$$\operatorname{Var}(\hat A) = \frac{2n + 1}{12n^2}.$$
At $n = 30$ the standard error is 0.0752 and the half-width $1.96 \times 0.0752 = 0.147$. The smallest $n$ with $1.96\sqrt{(2n + 1)/(12n^2)} \le 0.10$ is 65, and for 0.05 it is 257. Since the variance is close to $1/(6n)$, halving the half-width takes four times the runs.
These figures need the two distributions to be nearly the same, not merely $A$ near one half. When one method's results are tightly concentrated and the other's are spread, the variance at $A = 1/2$ is larger. Here is the bound. Write $\psi = \mathbf 1\{X > Y\} + \frac12\mathbf 1\{X = Y\}$ for one pair, so $A = E[\psi]$. ROC Curves for Diagnostic Tests derives
$$\operatorname{Var}(\hat A) = \frac{\operatorname{Var}(\psi) + (n_1 - 1)\operatorname{Var}(E[\psi \mid Y]) + (n_2 - 1)\operatorname{Var}(E[\psi \mid X])}{n_1 n_2},$$
with the two middle terms written there as $Q_1 - A^2$ and $Q_2 - A^2$. Since $X$ and $Y$ are independent, $\psi - A$ splits into three orthogonal parts: $E[\psi \mid X] - A$, $E[\psi \mid Y] - A$, and the remainder $\psi - E[\psi \mid X] - E[\psi \mid Y] + A$. The first two are independent with mean zero, and the remainder has conditional mean zero given $X$ and given $Y$ (because $E[E[\psi \mid Y] \mid X] = A$ by independence), so every cross product has expectation zero. Hence $\operatorname{Var}(E[\psi \mid X]) + \operatorname{Var}(E[\psi \mid Y]) \le \operatorname{Var}(\psi)$. Also $\psi$ lies in $[0, 1]$, so $\psi^2 \le \psi$ and $\operatorname{Var}(\psi) \le A(1 - A)$. With $n_1 \le n_2$, the numerator is at most $\operatorname{Var}(\psi) + (n_2 - 1)\operatorname{Var}(\psi) = n_2\operatorname{Var}(\psi)$, so
$$\operatorname{Var}(\hat A) \le \frac{A(1 - A)}{\min(n_1, n_2)},$$
which is $1/(4n)$ at $A = 1/2$ with $n$ runs per method. The bound is nearly reached when $Y$ is concentrated at the median of a continuous $X$: then $E[\psi \mid X]$ is close to the indicator that $X$ exceeds its median, so $\operatorname{Var}(E[\psi \mid X]) \to 1/4$, while $E[\psi \mid Y]$ is close to $1/2$ and $\operatorname{Var}(E[\psi \mid Y]) \to 0$. The variance tends to $[1/4 + (n_2 - 1)/4]/(n_1 n_2) = 1/(4n_1)$. In a simulation with $X$ standard normal and $Y$ normal with standard deviation 0.01, thirty runs each and 20,000 replications (default_rng([54000000, 0])), the standard deviation of $\hat A$ was 0.091, against 0.0752 under the null and the bound 0.0913. With that worst-case variance the half-width at thirty runs is 0.179, and a half-width of 0.10 needs 97 runs per method, 0.05 needs 385.
Optimizer runs often differ in spread, one method converging consistently and the other not, so the worst case is not exotic; the De Jong runs' own DeLong standard errors happen to sit near the null value. Thirty runs per method separate a large difference ($A$ beyond about 0.65 or below 0.35) from none. Distinguishing $A = 0.56$ from 0.5, Cohen's "small" translated, needs several hundred runs per method.
Problem 4 (when is A the better summary?). For the survey, $A = 0.552$ while Theorem 4 with the groups' means and standard deviations predicts 0.528. If a new treatment lowered every woman's pressure by the same 3 mm Hg, which of $d$ and $A$ would change, and by how much?
Solution. Both change, because a shift changes the order of many pairs as well as the means. $d$ rises by exactly $3/19.88 = 0.151$, to 0.251, since the pooled standard deviation is unchanged by a shift. $A$ becomes $P(X - Y > -3) + \frac12 P(X - Y = -3)$, so it rises by the probability of the pairs of a man and a woman whose difference lies between $-3$ and 0 mm Hg (with the ties at either end counted one half). That depends on the shape of the distribution of $X - Y$ near zero and has no formula in terms of $d$ unless the populations are normal. For the survey the script gives $A = 0.598$ after the shift, a rise of 0.046; Theorem 4 with the shifted means and the same standard deviations would predict 0.571. This is the distinction drawn after Theorem 5: $d$ is tied to means and the scale of measurement, $A$ to the order of individual values. A treatment that lowered only the highest pressures would change $d$ through the mean and $A$ through the pairs it reorders, by amounts no single number predicts.
Open questions
- What makes $d$ biased upward on the survey's pressures? At ten per group, $d$ averaged 0.127 against a normal-theory 0.105. Rerunning the coverage experiment with populations that have the survey's skewness and equal variances, and with normal populations of unequal variances, would separate the two causes. The script's sampler is the place to add them.
- Does the DeLong interval for $A$ hold its level across all of the site's thirty-run comparisons? The coverage check here used three De Jong functions. The same resampling check on the Gray-coding runs (
tools/experiments/evolution/gray_coding.py) and the architecture-search runs (aging_evolution.py), together with a logit-transformed interval and the Brunner–Munzel interval, would show whether the simple interval should be replaced where $A$ is near 0 or 1. - Do Vargha and Delaney's own exact methods improve on the DeLong interval at thirty runs? Their paper (2000) gives exact point and interval estimation; this article did not read their procedures and used DeLong's standard error. Implementing theirs and repeating the coverage experiment would settle it.
- Which effect sizes should the site's experiments report by default? The evolutionary computing articles report $A$; the statistics articles report differences in units. A survey of the articles' tables with
tools/analysisand a decision recorded in the style guide would make reports comparable.
Summary
| Quantity | Formula | What it estimates |
|---|---|---|
| Standardized difference | $d = (\bar x - \bar y)/s_p$; $t = d\sqrt{\tilde n}$ | $\delta = (\mu_1 - \mu_2)/\sigma$, biased upward |
| Hedges' $g$ | $g = J(m)d$, $J(m) = \Gamma(m/2)/\big(\sqrt{m/2}\,\Gamma((m - 1)/2)\big)$ | $\delta$, unbiased under normality |
| Variance of $d$ | exact: $\frac{m}{m - 2}(1/\tilde n + \delta^2) - \delta^2/J^2$; large samples: $1/\tilde n + \delta^2/(2m)$ | |
| Interval for $\delta$ | invert the noncentral $t$ with $m$ degrees of freedom | exact under normality |
| Probability of superiority | $\hat A = U/(n_1 n_2)$; normal: $A = \Phi(\delta/\sqrt2)$ | $P(X > Y) + \frac12 P(X = Y)$ |
| Threshold model | $\delta = \ln(\mathrm{OR})/1.814$ (logistic); $\Phi^{-1}(p_1) - \Phi^{-1}(p_2)$ (normal) | $\delta$, only if spreads are equal |
| Point-biserial $r$ | $r = d/\sqrt{d^2 + m/\tilde n}$ | depends on group sizes |
| Corrected $\eta^2$ | $\varepsilon^2 = (\mathrm{SS}_b - (k - 1)\mathrm{MS}_w)/\mathrm{SS}_t$ | the population share of variance |
What we have learned
A test statistic is an effect size times the square root of a sample size, so a p-value cannot say how large a difference is. The standardized difference $d$ measures size on a common scale. Under normality it has a noncentral $t$ distribution, which gives its bias (removed by Hedges' $g$), its exact variance and an exact interval. For the survey's men and women it is 0.100, with an interval from 0.046 to 0.155: certainly real, certainly small. The probability of superiority $A$ does not depend on a standard deviation or a scale. For the site's genetic algorithm comparisons it shows that thirty runs per method can resolve only large differences. Odds ratios convert to $d$ only under a threshold model with equal spreads, which the survey's pressures violate. In the linear model, the same effect appears as a correlation and a share of variance, whose plain estimate $\eta^2$ is biased upward and is corrected by $\varepsilon^2$.
Effect sizes describe a difference. How many observations are needed to detect one of a given size is the subject of Power and Sample Size for a Test of a Mean and, for model evaluations, of Power Analysis for Evaluations.
References
- Brunner, E., and Munzel, U. (2000). The nonparametric Behrens–Fisher problem: Asymptotic theory and a small-sample approximation. Biometrical Journal, 42(1), 17–25. https://doi.org/10.1002/(SICI)1521-4036(200001)42:1<17::AID-BIMJ17>3.0.CO;2-U record
- Chinn, S. (2000). A simple method for converting an odds ratio to effect size for use in meta-analysis. Statistics in Medicine, 19(22), 3127–3131. https://doi.org/10.1002/1097-0258(20001130)19:22<3127::AID-SIM784>3.0.CO;2-M record
- Cohen, J. (1988). Statistical Power Analysis for the Behavioral Sciences (2nd ed.). Lawrence Erlbaum Associates. record
- DeLong, E. R., DeLong, D. M., and Clarke-Pearson, D. L. (1988). Comparing the areas under two or more correlated receiver operating characteristic curves: A nonparametric approach. Biometrics, 44(3), 837–845. https://doi.org/10.2307/2531595 record · 4 pages
- Hedges, L. V. (1981). Distribution theory for Glass's estimator of effect size and related estimators. Journal of Educational Statistics, 6(2), 107–128. https://doi.org/10.3102/10769986006002107 record
- Kelley, T. L. (1935). An unbiased correlation ratio measure. Proceedings of the National Academy of Sciences, 21(9), 554–559. https://doi.org/10.1073/pnas.21.9.554 record
- Lakens, D. (2013). Calculating and reporting effect sizes to facilitate cumulative science: A practical primer for t-tests and ANOVAs. Frontiers in Psychology, 4, 863. https://doi.org/10.3389/fpsyg.2013.00863 record
- McGraw, K. O., and Wong, S. P. (1992). A common language effect size statistic. Psychological Bulletin, 111(2), 361–365. https://doi.org/10.1037/0033-2909.111.2.361 record
- Sakai, T. (2016). Statistical significance, power, and sample sizes: A systematic review of SIGIR and TOIS, 2006–2015. In Proceedings of the 39th International ACM SIGIR Conference on Research and Development in Information Retrieval (pp. 5–14). https://doi.org/10.1145/2911451.2911492 record · 2 pages
- Vargha, A., and Delaney, H. D. (2000). A critique and improvement of the CL common language effect size statistics of McGraw and Wong. Journal of Educational and Behavioral Statistics, 25(2), 101–132. https://doi.org/10.3102/10769986025002101 record · 4 pages