Type II Error in Two-Tailed Test of Population Mean with Known Variance
In a two-tailed test of the population mean, the null hypothesis claims that the true population mean μ is equal to a given hypothetical value μ0.
A type II error occurs if the hypothesis test based on a random sample fails to reject the null hypothesis even when the true population mean μ is in fact different from μ0.
Assume that the population has a known variance σ2. By the Central Limit Theorem, the population of all possible means of samples of sufficiently large size n approximately follows the normal distribution. Hence we can compute the range of sample means for which the null hypothesis will not be rejected, and then obtain an estimate of the probability of type II error.
We demonstrate the procedure with the following:
Suppose the mean weight of King Penguins found in an Antarctic colony last year was 15.4 kg. Assume the actual mean population weight is 15.1 kg, and the population standard deviation is 2.5 kg. At .05 significance level, what is the probability of having type II error for a sample size of 35 penguins?
We begin with computing the standard deviation of the mean, sem.
> sigma = 2.5 # population standard deviation
> sem = sigma/sqrt(n); sem # standard error
We next compute the lower and upper bounds of sample means for which the null hypothesis μ = 15.4 would not be rejected.
> mu0 = 15.4 # hypothetical mean
> I = c(alpha/2, 1-alpha/2)
> q = qnorm(I, mean=mu0, sd=sem); q
 14.572 16.228
Therefore, so long as the sample mean is between 14.572 and 16.228 in a hypothesis test, the null hypothesis will not be rejected. Since we assume that the actual population mean is 15.1, we can compute the lower tail probabilities of both end points.
Finally, the probability of type II error is the probability between the two end points.
If the penguin sample size is 35, the actual mean population weight is 15.1 kg and the population standard deviation is 2.5 kg, then the probability of type II error for testing the null hypothesis μ = 15.4 at .05 significance level is 89.1%, and the power of the hypothesis test is 10.9%.
Under same assumptions as above, if actual mean population weight is 14.9 kg, what is the probability of type II errors? What is the power of the hypothesis test?