Computing the p-value of one sided hypothesis test

29 Views Asked by At

enter image description here

I'm studying this subject on my own and would just like a sanity test to see if I'm doing things correctly.

Part a): we consider the test statistic $ \frac{\overline{X} - \mu}{S/\sqrt{n}}$ which at $\alpha = 0.05$ significance level means we reject $H_0$ if $ \frac{\overline{X} - \mu}{S/\sqrt{n}} \geq z_\alpha$.

Plugging in our observed values and $z$-score we see that our test statistic is $3$ which is greater than $z_{0.05} = 1.645$. Thus we reject the null hypothesis.

Part b): $p$-value is the probability of our test statistic being more extreme than the observed value provided $H_0$ is true. We have our observed value of $3$, and since our test statistic is approximately standard normal under $H_0$ this amounts to computing the probability $P(Z \geq 3)$ where $Z \sim N(0,1)$.

Using a table again I obtain a $p$-value of $0.0013$.

The back of my textbook says the $p$-value is approximately $0.005$.

Did I make a mistake somewhere?

1

There are 1 best solutions below

2
On BEST ANSWER

The appropriate test to use is a one-sided Student's $t$-test, not a $z$-test. This is because the sample size is small and the standard deviation is being estimated from the data. Hence $$T \mid H_0 = \frac{\bar x - \mu_0}{s/\sqrt{n}} = \frac{10.4 - 10.1}{0.4/\sqrt{16}} = 3.$$ This statistic is $t$-distributed with $n - 1 = 15$ degrees of freedom; hence the $p$-value of this test is $$p = \Pr[t_{15} > 3] \approx 0.00448637.$$ Your calculated $p$-value is too small because it is calculated using a test statistic that inappropriately assumes that the sample standard deviation $s = 0.4$ is the population standard deviation $\sigma = 0.4$.