99 The Two-Sided Hypothesis Test
99.1 Procedure
To test the two-sided hypothesis we performed the following steps:
- Define H\(_0\) and H\(_A\).
- Specify the significance level \(\alpha\).
- Draw a simple random sample of size \(N\) from the population and compute the Arithmetic Sample Mean \(m\)
- Determine the regions of acceptance and rejection for H\(_0\)
- If \(m\) is contained in the region of rejection we reject H\(_0\) and support H\(_A\). Otherwise, we fail to reject H\(_0\).
99.1.1 Defining H\(_0\) and H\(_A\)
In Chapter 98 we compared the Hypothesis H\(_0: \mu = \mu_0 = 170\) versus H\(_A: \mu > \mu_0 = 170\) which is called a “one-sided” test. In a two-sided hypothesis test we formulate the problem as follows:
\[ \begin{align*} &\text{H}_0: \mu = \mu_0 = 170 \\ &\text{H}_A: \mu \neq \mu_0 = 170 \end{align*} \]
99.1.2 Specifying the significance level \(\alpha\)
Suppose that we choose a significance level \(\alpha = 0.05\). Since we are solving a two-sided problem, the type I error reflects the probability of making a false positive (i.e. the incorrect rejection of a true Null Hypothesis) on both sides of \(\mu_0\) (i.e. \(\mu < \mu_0\) and \(\mu > \mu_0\)). The consequence of this is that the probability of making a type I error on one side is only 2.5% (the left-sided and right-sided type I error add up to 5%).
For a two-sided test, the chosen threshold \(\alpha\) is split across both tails. The mechanics are fixed; the choice of \(\alpha\) is not.
Use the significance level that matches the role of the test and the decision purpose (not a fixed convention). In confirmatory settings, stricter thresholds are common; in diagnostics, higher thresholds may be appropriate when missing a violation is costly. See Chapter 112.
99.1.3 Drawing a simple random sample
We have to draw a simple random sample of size \(N\) from the population and compute the Arithmetic Sample Mean \(m\). Suppose that \(m = 171.6\) which is bigger than the Null value \(\mu_0 = 170\) and which rules out the scenario that we would conclude (based on our sample) that \(\mu < \mu_0\).
Hence the rejection of H\(_0\) on the “right side” of the scale is much more unlikely because the right-sided type I error is only 2.5% (as opposed to 5% in Chapter 98). In other words, and given the previous analysis, we already know that the Null Hypothesis will not be rejected.
99.1.4 Determining the regions of acceptance and rejection for H\(_0\)
The region of acceptance is obtained by finding \(k\) in
\[\text{P} \left( \mu -k \leq \bar{X} \leq \mu + k \right) = 0.95\]
As was explained before, we can rewrite this expression
\[ \begin{aligned}\text{P} \left( \mu -k \leq \bar{X} \leq \mu + k \right) &= \text{P} \left( \frac{\mu - k - \mu}{\frac{\sigma}{\sqrt{N}}} \leq \frac{\bar{X} - \mu}{\frac{\sigma}{\sqrt{N}}} \leq \frac{\mu + k -\mu}{\frac{\sigma}{\sqrt{N}}} \right)\\ &= \text{P} \left( \frac{-k}{\frac{\sigma}{\sqrt{N}}} \leq Z \leq \frac{k}{\frac{\sigma}{\sqrt{N}}} \right)\end{aligned} \]
From the Gaussian Table (Appendix E) it follows that
\[\frac{k}{\frac{\sigma}{\sqrt{N}}} = 1.96 \Rightarrow k = 1.96 \frac{\sigma}{\sqrt{N}}\]
which allows us to derive the region of non-rejection
\[\mu - 1.96 \frac{\sigma}{\sqrt{N}} \leq \bar{X} \leq \mu+ 1.96 \frac{\sigma}{\sqrt{N}}\]
\[170 - 1.96 \frac{10}{\sqrt{100}} \leq \bar{X} \leq 170 + 1.96 \frac{10}{\sqrt{100}}\]
\[168.04 \leq \bar{X} \leq 171.96\]
For quick mental calculations, this is often rounded to approximately \([168, 172]\).
99.1.5 Accept or reject H\(_0\)
As expected, the sample mean \(m\) is contained in the region of non-rejection. Hence, we fail to reject the Null Hypothesis H\(_0\).
99.2 p-value Interpretation
For a two-sided z-test, the observed standardized statistic is
\[z_{obs} = \frac{m - \mu_0}{\sigma/\sqrt{N}}.\]
The p-value is the probability, under \(H_0\), of obtaining a result at least as extreme as the observed one in either tail:
\[p = P\left(|Z| \ge |z_{obs}| \mid H_0\right) = 2\left(1-\Phi(|z_{obs}|)\right).\]
Decision rule:
- if \(p \le \alpha\), reject \(H_0\);
- if \(p > \alpha\), fail to reject \(H_0\).
This p-value perspective is equivalent to checking whether the null value lies outside the corresponding two-sided confidence interval.