In: Statistics and Probability
Suppose H0: mu = 120 is tested against H1: mu > 120 with known variance 10 and n = 25. What p-value corresponds to a sample mean ybar = 121.5
Solution:
The null and alternative hypotheses are as follows:
To test the hypothesis we shall use z-test for single mean. The test statistic is given as follows:
Where, where, is sample mean, is population variance, n is sample size and is hypothesized value of population mean under H0.
We have,
The value of the test statistic is 2.3717.
Since, our test is right-tailed test, therefore we shall obtain right-tailed p-value for the test statistic. The right-tailed p-value is given as follows:
p-value = P(Z > value of the test statistic)
p-value = P(Z > 2.3717)
Using "pnorm" function of R we get, P(Z > 2.3717) = 0.0089
Hence, p-value= 0.0089
The p-value is 0.0089.
Please rate the answer. Thank you.