Calculating the $p$-value

1k Views Asked by At

How do I calculate the $p$ value of the following?

Students' height is approximately normal with s.d = $4$ inches, sample = $10$,
mean height = $68$ inches.

Calculate the $p$ value corresponding to the following null hypotheses.

$H_o$ = Avg. height is $70$ inches

$H_1$ = Avg. height is not $70$ inches

My approach:
$$\frac{68-70}{4\sqrt{10}} = -1.5811$$

Since the sample size is less than $30$, I thought I could use the $t$-table with $9$ degrees of freedom. The critical level was not stated, so I used $0.95 = 1.833$. I know this is a two-sided test from the null hypothesis so I would have to multiply it by $2$. However this is incorrect.

The answer is $$P(|N(0,\frac{4}{\sqrt{10}}| >2)= 2(1-0.9431) = 0.1138$$

Where is the number $0.9431$ coming from?

2

There are 2 best solutions below

2
On BEST ANSWER

The reason why a $t$-test is not used here is because, although the sample size is small, you are given the population standard deviation and are told that the data are approximately normally distributed. Consequently, the test statistic has the form $$Z \mid H_0 = \frac{\bar X - \mu_0}{\sigma/\sqrt{n}}.$$ The standard deviation is not being estimated from the sample.

Sometimes, it can be difficult to tell from the language of the question whether the standard deviation is being estimated. This is one such case; the main clues are that you are not told it is a "sample standard deviation," and that it is stated before the sample size and the sample mean are given; specifically, it is provided in the same sentence as the statement that height data is approximately normal.

The value $0.9431$ comes from the value of the test statistic above: with $\sigma = 4$, $n = 10$, $\bar X = 68$, and $\mu_0 = 70$, we obtain $$Z = -\sqrt{\frac{5}{2}} \approx -1.58114.$$ Then the $p$-value of this two-sided test is $$2 \Pr[Z < -1.58114] = 2 (1 - \Phi(1.58114)),$$ where $\Phi(1.58114) \approx 0.943077$ is the cumulative distribution function of the standard normal distribution, for the probability that a standard normal random variable is less than or equal to $1.58114$.

0
On

If $Z$ is normal and symmetric around $0$ then we have $P(|Z|>z)=2(1-\Phi(z))=2\Phi(-z)$.

$Z=\frac{X-70}{\frac4{\sqrt{10}}}$ is symmetric around $0$. If $x=68$ we have $z=\frac{68-70}{\frac4{\sqrt{10}}}=-\sqrt{2.5}\approx -1.5811...$ Next you insert this value into the cdf of the normal distribution: $\Phi(-1.5811)=0.0569$

Wolfram alpha shows the result of the integral term:

$$\int_{-\infty}^{-\sqrt{2.5}} \frac1{\sqrt{2\cdot \pi}}\cdot e^{-x^2/2} \, \, \, dx=0.0569231...$$

See here.

Finally we have $2\Phi(-z)=2\Phi(-1.5811)=2\cdot 0.0569=0.1138$