# One-tailed hypothesis decision based on a two-tailed Z test

Computer output:

Test of mu = 77 versus mu not = 77 Variable N Mean StDev malt extract 40 77.458 1.101 Variable 95.0% Conf. Int. Z P-value malt extract ( 77.116, 77.799) 2.63 0.009

Problem: Use the value for $Z$ to test the null hypothesis $H_0$ : m $\leq$ 77.0 versus the ￼￼￼￼￼￼￼￼￼￼￼￼￼￼￼￼￼￼￼￼￼￼￼￼￼￼￼￼￼￼￼￼￼￼￼￼￼￼￼￼one-sided alternative $H_1$ : m > 77.0 at the $\alpha=.05$ level of significance.

My attempt: The $Z$ statistic will not change, so we should calculate $z_{\alpha}$ and see whether $Z<z_{\alpha}$ or $Z>z_{\alpha}$. $z_{\alpha}=\Phi^{-1}(1-0.05)=1.645$. Since $Z>z_{\alpha}$ we reject $H_0$. However, decision based on the p-value should give the same result, right? The one-tailed p-value is $0.009/2=0.0045$, which is less than $\alpha=0.05$, so we fail to reject $H_0$. What am I missing?

The p-value in a hypothesis test tells you the probability that $Z>z^*$ where $z^*$ is the test statistic. So if the p-value is less than the confidence level, we reject $H_0$ in favor of $H_1$, the same result obtained by the critical region process. I think you have just confused the decision rule.