2.5 Choice of sample size
How many replicates are needed? The answer depends on the difference \(\delta = \mu _1 - \mu _2\) that it is important to detect, the error standard deviation \(\sigma \), the significance level \(\alpha \) and the required power \(1 - \beta \), the probability of rejecting \(H_0\) when the true difference is \(\delta \).
With \(n\) replicates of each treatment, the statistic \(T_0 = (\bar Y_1 - \bar Y_2)/(S_p\sqrt {2/n})\) can be written as \[ T_0 = \frac {Z + \lambda }{\sqrt {V/(2n - 2)}} , \qquad Z = \frac {\bar Y_1 - \bar Y_2 - \delta }{\sigma \sqrt {2/n}} , \qquad \lambda = \frac {\delta }{\sigma \sqrt {2/n}} , \] with \(Z \sim N(0, 1)\) and \(V \sim \chi ^2_{2n-2}\) independent. This is the non-central \(t\) distribution with \(2n - 2\) degrees of freedom and non-centrality parameter \(\lambda \), and the power is \[ P\bigl (|T_0| > t_{\alpha /2,\,2n-2}\bigr ) , \qquad T_0 \sim t_{2n-2}(\lambda ) . \] It increases with \(\lambda = \delta \sqrt n/(\sigma \sqrt 2)\): with the size of the difference relative to \(\sigma \), and with \(\sqrt n\).
Proposition 2.5.1. With \(\sigma \) known, a two-sided test at level \(\alpha \) has power approximately \(1 - \beta \) against a difference \(\delta \) when \[ n = \frac {2(z_{\alpha /2} + z_\beta )^2\sigma ^2}{\delta ^2} . \]
Proof. With \(\sigma \) known the statistic is \(Z_0 = (\bar Y_1 - \bar Y_2)/(\sigma \sqrt {2/n}) \sim N(\lambda , 1)\). Ignoring the negligible probability of rejecting in the wrong tail, the power is \(P(Z_0 > z_{\alpha /2}) = P(Z > z_{\alpha /2} - \lambda )\). This equals \(1 - \beta \) when \(z_{\alpha /2} - \lambda = -z_\beta \), that is, \(\lambda = z_{\alpha /2} + z_\beta \). Squaring \(\delta \sqrt n/(\sigma \sqrt 2) = z_{\alpha /2} + z_\beta \) and solving for \(n\) gives the formula. □
Example 2.5.2. In a repeat of the catalyst experiment, a difference of \(\delta = 2\) points is to be detected with power \(0.90\) at \(\alpha = 0.05\), and \(\sigma \) is taken to be \(2\) from the pooled estimate \(s_p = 2.05\). The approximation gives \[ n = \frac {2(1.960 + 1.282)^2(2)^2}{2^2} = 21.01 , \] so \(22\) batches per catalyst. The exact power from the non-central \(t\) distribution is \(0.8997\) with \(n = 22\) and \(0.9125\) with \(n = 23\), so \(23\) are needed. The approximation is slightly optimistic, because it ignores the uncertainty in \(s_p\); it is a good starting point, and the exact calculation settles the last unit.
Questions on this section
Stuck on something here? Ask below and it stays attached to this topic.