Type II Error in Upper Tail Test of Population Mean with Known Variance in R
Conventionally, In an upper-tail test, the null hypothesis states that the true population mean (μo) is less than the hypothesized mean value (μ). We fail to reject the null hypothesis if the test statistic is lesser than the critical value at the chosen significance level. In this article let us discuss the probability percentage of type II error for an upper-tail test of the population mean with known variance.
Type II error is an error that occurs if the hypothesis test based on a random sample fails to reject the null hypothesis even when the true population means μo is greater than the hypothesized mean value μ.
Here the assumption is the population variance σ2 is known. From Central Limit Theorem (CLT), the population. the sample means of all possible samples of a population approximately follow a normal distribution. Based on this fact, we can compute the range of sample means for which the type II error can occur, and obtain an estimate of the probability of type II error.
Let us try to understand the type II error by considering a case study.
Assume the data labeling company states that there are less than 2 errors in marked labels on any single page. Assume the actual mean amount of error per page 2.12, and the population standard deviation is 0.2. At the .05 significance level, what is the probability of having a type II error for a sample size of 40 pages?
Let us start by computing the standard error of the mean as shown
Then compute the upper bound of sample means for which the null hypothesis μo ≤ 2 would not be rejected.
The upper bound value denotes, that so long as the sample mean is less than 2.0520 in a hypothesis test, the null hypothesis will not be rejected. Since we assume that the actual population mean is 2.12, we can compute the probability of the sample mean below 2.0520 and thereby find the probability of type II error.
If the sample size is 40, the actual mean amount of errors per page is 2.12 and the population standard deviation is 0.2, then the probability of type II error for testing the null hypothesis μ ≤ 2 at .05 significance level is 1.57%, and the power of the hypothesis test is 98.43%.