32  Revised tests about about a normal mean

Author

Karl Gregory

Here we consider again tests of hypotheses concerning the mean of a normal population formulated as:

  1. \(H_0\): \(\mu \leq \mu_0\) versus \(H_1\): \(\mu > \mu_0\)
  2. \(H_0\): \(\mu \geq \mu_0\) versus \(H_1\): \(\mu < \mu_0\)
  3. \(H_0\): \(\mu = \mu_0\) versus \(H_1\): \(\mu \neq \mu_0\)

Now, however, we will drop the assumption that the population variance \(\sigma^2\) is known. When \(\sigma^2\) is unknown, we cannot compute the test statistic \[ Z_{\operatorname{test}}= \frac{\bar X_n - \mu_0}{\sigma/\sqrt{n}} \] from Chapter 31, so we instead define the test statistic \[ T_{\operatorname{test}}= \frac{\bar X_n - \mu_0 }{S_n/ \sqrt{n}}, \tag{32.1}\] which is the discrepancy between \(\bar X_n\) and the null value \(\mu_0\) in terms of a number of estimated standard deviations, where \(T_{\operatorname{test}}\) has a positive sign if \(\bar X_n\) lies above \(\mu_0\) and a negative sign if \(\bar X_n\) lies below \(\mu_0\).

If \(\mu = \mu_0\), then we have \(T_{\operatorname{test}}\sim t_{n-1}\), which allows us to define rejection rules as follows:

Proposition 32.1 (Revised tests of hypotheses for a normal mean) Let \(X_1,\dots,X_n \overset{\text{ind}}{\sim}\mathcal{N}(\mu,\sigma^2)\). Then the following tests have size \(\alpha\):

  1. For \(H_0\): \(\mu \leq \mu_0\) versus \(H_1\): \(\mu > \mu_0\), reject \(H_0\) if \(T_{\operatorname{test}}> t_{n-1,\alpha}\).
  2. For \(H_0\): \(\mu \geq \mu_0\) versus \(H_1\): \(\mu < \mu_0\), reject \(H_0\) if \(T_{\operatorname{test}}< -t_{n-1,\alpha}\).
  3. For \(H_0\): \(\mu = \mu_0\) versus \(H_1\): \(\mu \neq \mu_0\), reject \(H_0\) if \(|T_{\operatorname{test}}| > t_{n-1,\alpha/2}\).


Note that the threshold \(t_{n-1,\alpha/2}\) will always be greater than \(z_{\alpha/2}\), so there is a penalty for our having to replace \(\sigma\) with the sample estimate \(S_n\): a higher critical value, such that stronger evidence must be found in the data in order to reject \(H_0\).

Usually only one of the sets of hypotheses 1, 2, and 3 is of interest to an investigator, but we illustrate testing all three in the next example.

Example 32.1 (Golden ratio data) Recall the golden ratio data in Example 15.2:

gr <- c(1.66, 1.61, 1.62, 1.69, 1.58, 1.43, 1.66, 
        1.69, 1.58, 1.20, 1.52, 1.60, 1.55, 1.67, 
        1.77, 1.50, 1.64, 1.54, 1.40, 1.36, 1.50, 
        1.40, 1.35, 1.48, 1.64, 1.91, 1.70)
xbar <- mean(gr)
sn <- sd(gr)
n <- length(gr)

Let’s test the three hypotheses

  1. \(H_0\): \(\mu \leq \mu_0\) versus \(H_1\): \(\mu > \mu_0\)
  2. \(H_0\): \(\mu \geq \mu_0\) versus \(H_1\): \(\mu < \mu_0\)
  3. \(H_0\): \(\mu = \mu_0\) versus \(H_1\): \(\mu \neq \mu_0\)

using \(\alpha = 0.10\), \(\alpha = 0.05\), and \(\alpha = 0.01\). The sample size is \(n = 27\), the sample mean is \(\bar X_n = 1.5648148\), and the sample standard deviation is \(S_n = 0.1481\). The first step is to compute the value of the test statistic \(T_{\operatorname{test}}\). We obtain \[ T_{\operatorname{test}}= \frac{1.564815 - 1.618}{0.1481/\sqrt{27}} = -1.866018. \] Using \(\alpha = 0.10\) the critical values become \(t_{27-1,0.10} = 1.315\), \(-t_{27-1,0.10} = -1.315\), and \(t_{27-1,0.10/2} = 1.7056\). Therefore, at significance level \(\alpha = 0.10\) we

  1. Fail to reject \(H_0\): \(\mu \leq 1.618\).
  2. Reject \(H_0\): \(\mu \geq 1.618\) and conclude \(\mu < 1.618\).
  3. Reject \(H_0\): \(\mu = 1.618\) and conclude \(\mu \neq 1.618\).

If we use \(\alpha = 0.05\), the critical values become \(t_{27-1,0.05} = 1.7056\), \(-t_{27-1,0.05} = -1.7056\), and \(t_{27-1,0.05/2} = 2.0555\). Therefore, at significance level \(\alpha = 0.05\) we

  1. Fail to reject \(H_0\): \(\mu \leq 1.618\).
  2. Reject \(H_0\): \(\mu \geq 1.618\) and conclude \(\mu < 1.618\).
  3. Fail to reject \(H_0\): \(\mu = 1.618\).

If we use \(\alpha =0.05\), the critical values become \(t_{27-1,0.01} = 2.4786\), \(-t_{27-1,0.01} = -2.4786\), and \(t_{27-1,0.01/2} = 2.7787\). Therefore, at significance level \(\alpha = 0.01\) we

  1. Fail to reject \(H_0\): \(\mu \leq 1.618\).
  2. Fail to reject \(H_0\): \(\mu \geq 1.618\).
  3. Fail to reject \(H_0\): \(\mu = 1.618\).


Exercise 32.1 (Lobolly pines) The average height of \(14\) randomly selected ten-year-old Loblolly pine trees was \(\bar X_n = 27.44\) and the sample standard deviation was \(S_n=1.54\). Assume that the heights of ten-year-old Loblolly pine trees are Normally distributed. Test each of these sets of hypotheses at significance level \(\alpha = 0.05\):

  1. \(H_0\): \(\mu \leq 26\) versus \(H_1\): \(\mu > 26\).1
  2. \(H_0\): \(\mu \geq 26\) versus \(H_1\): \(\mu < 26\).2
  3. \(H_0\): \(\mu = 26\) versus \(H_1\): \(\mu \neq 26\).3


There is an important connection between the two-sided size-\(\alpha\) test and the construction of a \((1-\alpha)100\%\) confidence interval for \(\mu\). We find \[ \mu_0 \in \Big[\bar X_n - t_{n-1,\alpha/2}\frac{S_n}{\sqrt{n}},\bar X_n + t_{n-1,\alpha/2}\frac{S_n}{\sqrt{n}}] \iff |T_{\operatorname{test}}| \leq t_{n-1,\alpha/2}, \] where \(\iff\) mean “if and only if”. The above states that if the \((1-\alpha)100\%\) confidence interval for \(\mu\) contains \(\mu_0\), then the two-sided test will fail to reject \(H_0\): \(\mu = \mu_0\) at significance level \(\alpha\). Moreover, the converse is true: If the two-sided test fails to reject \(H_0\): \(\mu = \mu_0\) at significance level \(\alpha\), then the \((1-\alpha)100\%\) confidence interval for \(\mu\) will contain \(\mu_0\). There is thus an equivalence between the two-sided test and the construction of a confidence interval, such that if one wishes to perform the two-sided test, one can do so by constructing the confidence interval and checking to see if it contains the null value \(\mu_0\); if it does, then you fail to reject \(H_0\) \(\mu = \mu_0\).

Note that the same equivalence holds in the case in which the population variance \(\sigma^2\) is known. That is, we have \[ \mu_0 \in \Big[\bar X_n - z_{\alpha/2}\frac{\sigma}{\sqrt{n}},\bar X_n + z_{\alpha/2}\frac{\sigma}{\sqrt{n}}] \iff |Z_{\operatorname{test}}| \leq z_{\alpha/2}. \]


  1. The null value \(\mu_0\) of \(\mu\) is \(\mu_0 = 26\). We will reject \(H_0\) if \(\bar X_n\) is far enough above \(\mu_0 = 26\). To see whether \(\bar X_n\) is far enough above \(\mu_0 = 26\), we compute the test statistic \[ T_{\operatorname{test}}= \frac{\bar X_n - \mu_0}{S_n/\sqrt{n}} = \frac{27.44214 - 26}{1.537887/\sqrt{14}} = 3.5. \] The critical value to which we must compare the test statistic is \(t_{n-1,\alpha} = t_{13,0.05} = 1.77\). Since the value of our test statistic exceeds the \(\alpha=0.05\) critical value, it lies in the rejection region, so we reject \(H_0\): \(\mu \leq 26\) at the \(0.05\) significance level.↩︎

  2. We compute the same test statistic: Its value is \(3.5\). Now, however, we check whether it is greater than the critical value \(t_{13,\alpha/2}\) in absolute value. We have \(t_{13,0.025} = 2.16\). Since \(3.5 > 2.16\), the test statistic lies in the rejection region, so we reject \(H_0\): \(\mu = 26\) at the \(0.05\) significance level.↩︎

  3. The value of \(\bar X_n\) exceeds \(\mu_0 = 26\), so it lies in region specified by \(H_0\). The sample therefore contains no evidence against \(H_0\) (which is reflected in the positive sign of the test statistic \(T_{\operatorname{test}}\)), so we fail to reject \(H_0\) \(\mu \geq 26\).↩︎