# Type II Error in Lower Tail Test of Population Mean with Unknown Variance

In a lower tail test of the population mean, the null hypothesis claims that the true population mean μ is greater than 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 less than μ0.

Let s2 be the sample variance. For sufficiently large n, the population of the following statistics of all possible samples of size n is approximately a Student t distribution with n - 1 degrees of freedom.

This allows us to compute the range of sample means for which the null hypothesis will not be rejected, and to obtain the probability of type II error. We demonstrate the procedure with the following:

#### Problem

Suppose the manufacturer claims that the mean lifetime of a light bulb is more than 10,000 hours. Assume in a random sample of 30 light bulbs, the standard deviation of the lifetime is 125 hours. If actual mean light bulb lifetime is 9,950 hours, what is the probability of type II error for a hypothesis test at .05 significance level?

#### Solution

We begin with computing the standard error estimate, SE.

> n = 30                # sample size
> s = 125               # sample standard deviation
> SE = s/sqrt(n); SE    # standard error estimate
[1] 22.822

We next compute the lower bound of sample means for which the null hypothesis μ 10000 would not be rejected.

> alpha = .05           # significance level
> mu0 = 10000           # hypothetical lower bound
> q = mu0 + qt(alpha, df=n-1) * SE; q
[1] 9961.2

Therefore, so long as the sample mean is greater than 9961.2 in a hypothesis test, the null hypothesis will not be rejected. Since we assume that the actual population mean is 9950, we can compute the probability of the sample mean above 9961.2, and thus found the probability of type II error.

> mu = 9950             # assumed actual mean
> pt((q - mu)/SE, df=n-1, lower.tail=FALSE)
[1] 0.31329