If not all of the problems below are discussed in the workshop for lack of time, then please have a go at the problems on your own.
Bootstrap confidence intervals. Let be an IID sequence of Bernoulli random variables. The following R code describes a non-parametric bootstrap algorithm for obtaining a confidence interval for , using a vector data containing a sample :
How many bootstrapped samples are being taken? How would you change this to be 1000 samples?
What size of confidence interval is being calculated? How would you change this to create a 99% confidence interval?
Two confidence intervals were created, and . One of these corresponds to a 90% confidence interval and the other to a 95% confidence interval. Which is which?
Explain why non-parametric bootstrapping uses ‘sampling with replacement’.
This question looks at the annual forecast prices for tea given in Table 1 of Question Sheet 1. We wish to test the hypothesis that the mean price of tea is greater than 1.8 dollars per kg. Assume that tea prices are an IID sample from a Normal distribution, with unknown population variance. We conduct the test using the confidence interval for .
To carry out this test at the 5% level, what confidence interval should we calculate?
Obtain the appropriate confidence interval.
Can you conclude that the mean price of tea is greater than 1.8 dollars?
How does this answer relate to your answer to CW1.2?
As part of the Childhood Respiratory Disease Study in 1980 in East Boston, Massachusetts, the FEV (forced expiratory volume) of 654 children with the disease was measured. FEV is the volume of air expelled after one second of concentrated effort and is measured in litres. Also collected were the child’s age (years), height (inches), gender and whether of not they smoked. The aim was to see whether or not these four variables have an effect on FEV.
We will conduct an exploratory analysis to see whether or not gender has an effect on FEV, using a subset of 20 of the children (all of whom were non-smokers). The aim is to test whether the mean FEV is the same for males and females. The data are shown in Table 0.7. Let and denote mean FEV for males and females respectively.
Are these data paired or unpaired? Explain your answer.
Calculate the pooled sample variance for the data.
Using the critical value approach, test, at the 5% level, whether or not there is evidence that the mean FEV for males is the same as the mean FEV for females. You should clearly state any assumptions made about the data, your hypotheses and conclusions.
Calculate a 95% confidence interval for the difference in means . How could you use this confidence interval to carry out the test in part (c)?
Individual | Age | FEV | log FEV | Height | Gender |
---|---|---|---|---|---|
1 | 8 | 2.382 | 0.868 | 62.0 | 0 |
2 | 11 | 2.988 | 1.095 | 70.0 | 1 |
3 | 10 | 3.111 | 1.135 | 66.0 | 1 |
4 | 7 | 1.726 | 0.546 | 53.0 | 0 |
5 | 9 | 2.076 | 0.730 | 60.5 | 1 |
6 | 9 | 2.798 | 1.029 | 62.0 | 1 |
7 | 9 | 2.056 | 0.721 | 63.0 | 0 |
8 | 12 | 2.751 | 1.012 | 63.0 | 0 |
9 | 9 | 2.352 | 0.855 | 59.0 | 1 |
10 | 9 | 3.042 | 1.113 | 66.0 | 0 |
11 | 10 | 3.350 | 1.209 | 69.0 | 1 |
12 | 9 | 2.571 | 0.944 | 60.5 | 1 |
13 | 11 | 4.324 | 1.464 | 67.5 | 1 |
14 | 15 | 2.635 | 0.969 | 64.0 | 0 |
15 | 7 | 1.611 | 0.477 | 57.5 | 1 |
16 | 8 | 1.991 | 0.689 | 59.5 | 1 |
17 | 10 | 1.873 | 0.628 | 52.5 | 1 |
18 | 12 | 3.001 | 1.099 | 63.5 | 0 |
19 | 9 | 1.895 | 0.639 | 57.0 | 1 |
20 | 11 | 3.977 | 1.381 | 70.5 | 1 |