In: Statistics and Probability
QUESTION 2
(a) (i) What is the p-value in a hypothesis test? Explain fully with the use of diagrams.
(ii) An inspector examines output from a machine, which if properly adjusted produces nails with an average length of 40 mm and a standard deviation of 2 mm. The machine is deemed as out of adjustment if the nails produced on average are longer or shorter than 40 mm. A sample of 25 nails indicated an average of 41 mm. Using the critical value approach, test at the 5% level of significance if the process is out of adjustment. In your working, make sure you include all six steps of hypothesis testing and state any assumption you have to make.
(b) Calculate by hand the covariance and the correlation of the following set of bi-variate data, by completing the following table. Interpret your results and assume they are sample data.
X |
Y |
(X - X bar) |
(Y - Y bar) |
(X - X bar)(Y - Y bar) |
4 |
1 |
|||
6 |
3 |
|||
7 |
8 |
|||
10 |
10 |
|||
13 |
6 |
(c) Explain fully (with calculations and graphics) how the following factors will influence the width of a confidence interval:
(a) (i) The P-value is the probability of finding the observed, or more extreme, results when the null hypothesis (H 0) of a study hypothesis test is true.
ii) Here the standard deviation is given thus we will be using the one-sample z-test for the hypothesis test. The test statistic is given as:
. By the critical value approach, we reject the null hypothesis is the test statistic is more than 1.96 at a significance level of 5%. Thus w reject the null hypothesis and conclude that there is enough evidence to support the claim that the average length of nails is different from 40mm.
b)
X | Y | X- | Y- | (X-)(Y-) |
4 | 1 | -4 | -4.6 | 18.4 |
6 | 3 | -2 | -2.6 | 5.2 |
7 | 8 | -1 | 2.4 | -2.4 |
10 | 10 | 2 | 4.4 | 8.8 |
13 | 6 | 5 | 0.4 | 2 |
Thus the covariance is the sum of the last column divided by 5. Which is 32/5 = 6.4
While to find the correlation is given by:
c) The confidence interval depends on the margin of error. The margin of error consists of sample size, sample dispersion, and the level of confidence.
i) The margin of error is inversely proportional to the sample size, Thus as we increase the sample size, the confidence interval decreases.
ii) The margin of error is directly proportional to the sample dispersion. Thus as we increase the sample dispersion, the confidence interval increases.
iii) The margin of error is directly proportional to the level of confidence. Thus as we increase the level of confidence, the confidence interval increases.