Chapter 9. Hypothesis Testing
Unit 9.3. Confidence intervals and hypothesis testing
Exercise 9.2. A cereal package should weigh $latex w_0$. If it weighs less, the consumers will be unhappy and the company may face legal charges. If it weighs more, the company's profits will fall. Thus for the quality control department of the company the right choice is $latex H_0: \mu_w = w_0, \, H_a: \mu_w \ne w_0$. Devise the hypothesis testing procedure.
Solution. Step 1. Suppose that the package weight is normally distributed, $latex \sigma_w$ is known and $latex \bar w$ is the sample mean based on a sample of size $latex n$. From Eq. (8.4) we know that
$latex P(\mu_w - ME < \bar w < \mu_w + ME) = 1 - \alpha \textrm{ where } ME = z_{\alpha/2} \frac{\sigma_w}{\sqrt n}. \qquad (\textrm{Eq. 9.4})$
Under $latex H_0$ the confidence interval is $latex \mu_w - ME < \bar w < \mu_w + ME$.
Step 2. Formulate the consequences of the null hypothesis.
(a) If $latex \mu_w = w_0$, then $latex \bar w$ is likely to be close to $latex w_0$. This is expressed by $latex P(w_0 - ME < \bar w < w_0 + ME) = 1 - \alpha$.
(b) On the other hand, under the null the sample mean is not likely to be far from the assumed mean: $latex P(|\bar w - w_0| \ge ME) = \alpha$.
Step 3. State the decision rule.
(a) Fail to reject the null if the sample mean is consistent with it, that is $latex w_0 - ME < \bar w < w_0 + ME$ (this defines the acceptance region).
(b) Reject the null if the sample mean is consistent with the alternative: $latex |\bar w - w_0| \ge ME$ (that is, either $latex \bar w \ge w_0 + ME$ or $latex \bar w \le w_0 - ME$; this defines the rejection region). Then $latex P(\textrm{Type I error}) = \alpha$.
The decision rule is illustrated in Figure 9.3.

Figure 9.3. Rejection and acceptance regions.
Comments. (1) When solving exercises you can usually jump to the decision rule but remember that it is always based on confidence intervals. When in doubt, do the derivation and draw the diagram.
(2) The above decision rule is in terms of the sample mean. Equivalently, it can be expressed in terms of the standardized sample mean. When the population is normal and $latex \sigma_w$ is known, we use the $latex z$ statistic $latex z = (\bar w - w_0)/(\sigma_w/\sqrt n)$ and the decision rule looks like this: reject the null if $latex |z| \ge z_{\alpha/2}$ and fail to reject the null if $latex |z| < z_{\alpha/2}$.
(3) In theory it doesn't matter if the endpoints of the confidence interval are included in the rejection or acceptance region (remember, the probability of one point is zero). In practice, with the view to smoothly transit to $latex p$-values it is better to include the endpoints in the rejection area.
(4) To obtain a confidence interval, we need to fix the distribution by selecting a parameter which satisfies the null. If the null is a simple hypothesis (i.e., contains only one parameter value), this is easy. If the null is a composite hypothesis (contains a whole interval), the parameter is usually fixed at the boundary of the interval. No better procedures have been designed so far.
Previous: Tradeoff between Type I and Type II errors | Next: p-values
Want the whole book (all 14 chapters, exercises, and the index) as a single PDF? Available on Lulu for $1.99.
Leave a Reply
You must be logged in to post a comment.