statistics - calculate p-value

138 Views Asked by At

From the daily production of a given fertilizer, six small portions were collected and analyzed to calculate the percentage of nitrogen.

The results observed were as follows: 6.2 5.7 5.8 5.8 6.0 5.9

It is known from experience that the analysis process provides values with a distribution that can be considered Normal. Do the observations support the assurance that the expected percentage of nitrogen, µ, differs from 6% at a 10% significance level? Answer the question by calculating p - value

I calculate:

s^2 = 0.032

t = (5.9-6)/(sqrt(0.032 /sqrt(6))) = -1.369

and p value = 2P(Z<-1.369) = 2(1-0.9147)= 0.1706

but the correct value of p value is p-value = 0.229204974, 0.2 ≤ p − value ≤ 0.3

Could someone help me please?

1

There are 1 best solutions below

4
On BEST ANSWER

The hypothesis is $$H_0 : \mu = \mu_0 = 6, \quad \text{vs.} \quad H_a : \mu \ne 6,$$ where $\mu$ is the true mean percentage of nitrogen. The test statistic is $$T \mid H_0 = \frac{\bar x - \mu_0}{s/\sqrt{n}} \sim \color{red}{\operatorname{StudentT}(df = n-1)},$$ where $\bar x$ is the sample mean, $\mu_0$ is the hypothesized mean under $H_0$, $s$ is the sample standard deviation, and $n = 6$ is the sample size. You will note that because $s$ is not the true standard deviation, as it is unknown, and you are using the sample itself to estimate the standard deviation, $T \mid H_0$ is not normally distributed: it is student $t$-distributed with $n-1$ degrees of freedom. Therefore, while your calculation of the test statistic is correct, your calculation of the $p$-value is not because you are using the wrong null distribution. To fix this, you would either look up the value of the test statistic $-1.369$ in a $t$-table, or you can use a calculator or computer. You will get $$\Pr[T \le -1.36931 \mid H_0] \approx 0.114602,$$ which gives you the one-tailed test $p$-value. The two-tailed test has a $p$-value twice as large, namely $$\Pr[|T| \ge -1.36931 \mid H_0] = 2\Pr[T \le -1.36931 \mid H_0] \approx 0.229205.$$

You can perform the computation in WolframAlpha with the command

2 CDF[StudentTDistribution[5], -1.36930639]