Planning Test Size
We would like to minimize Type 2 Error to hold to our Hypothesis. We thus would like to know how many samples we should take to get below a certain threshold.
One-Sided Tests
For One-Sided Gauß Test
β ( μ ) = Φ ( z 1 − α − ∣ μ − μ 0 ∣ σ / n ) \beta(\mu)=\Phi\left(z_{1-\alpha}-\frac{\left|\mu-\mu_0\right|}{\sigma / \sqrt{n}}\right) β ( μ ) = Φ ( z 1 − α − σ / n ∣ μ − μ 0 ∣ )
Thus by applying the inverse we get:
n ≥ n 0 : = ( z 1 − α − z β ) 2 σ 2 ∣ μ − μ 0 ∣ 2 n \geq n_0:=\frac{\left(z_1-\alpha-z_\beta\right)^2 \sigma^2}{\left|\mu-\mu_0\right|^2} n ≥ n 0 := ∣ μ − μ 0 ∣ 2 ( z 1 − α − z β ) 2 σ 2
Two-Sided Test
For Two-Sided Gauß Test
β ( μ ) = Φ ( z 1 − α / 2 − ∣ μ − μ 0 ∣ σ / n ) + Φ ( z 1 − α / 2 + ∣ μ − μ 0 ∣ σ / n ) − 1 \beta(\mu)=\Phi\left(z_{1-\alpha / 2}-\frac{\left|\mu-\mu_0\right|}{\sigma / \sqrt{n}}\right)+\Phi\left(z_{1-\alpha / 2}+\frac{\left|\mu-\mu_0\right|}{\sigma / \sqrt{n}}\right)-1 β ( μ ) = Φ ( z 1 − α /2 − σ / n ∣ μ − μ 0 ∣ ) + Φ ( z 1 − α /2 + σ / n ∣ μ − μ 0 ∣ ) − 1
Here we have to solve for n 0 n_0 n 0 numerically. For example by plotting and reading the value.