I have these observations $(2,3.2,3.8,2.5,3.3,2.8,3.0,3.4)$ from $X \sim N(\mu,\sigma^2)$ and i want to calculate the $P$-value testing $H_0: \mu =3.2$ against $H_1 \neq 3.2$ with $\sigma = 0.6$

should i calculate $P r(X > 3.3) $ and $Pr( X < 3)$ and add these togheter ?

I tried it using that $X = Y\sigma + \mu \sim N(0,1)$ but the answer don't seem to be right according to the solution which is $P = 0.347$

Anyone can tell me what Iam doing wrong?


Solution 1:

Knowing that $\sigma = 0.6$, and under the assumption that the null hypothesis $H_0 : \mu = 3.2$ is true, what is the probability of having observed a result as extreme as the sample mean $\bar X = 3$? The test statistic is $$Z = \frac{\bar X - \mu}{\sigma/\sqrt{n}} = \frac{3 - 3.2}{(0.6)/\sqrt{8}} = -0.942809,$$ where $Z \sim {\rm Normal}(0,1)$ is a standard normal random variable. Thus we wish to calculate $\Pr[|Z| > 0.942809]$, which we look up in a table: we get $2(0.172889) = 0.345779$, which is the $p$-value of the test. Note that my answer is more precise than the one you gave. This is because I used a computer to obtain the appropriate percentile of the standard normal distribution, rather than a table.