• 沒有找到結果。

Exercises

在文檔中 14.1 The Bootstrap Idea (頁 63-69)

TA B L E 1 4 . 7

Effect of calcium and placebo on blood pressure

Calcium group Placebo group

Begin End Decrease Begin End Decrease

107 100 7 123 124 −1

110 114 −4 109 97 12

123 105 18 112 113 −1

129 112 17 102 105 −3

112 115 −3 98 95 3

111 116 −5 114 119 −5

107 106 1 119 114 5

112 102 10 114 112 2

136 125 11 110 121 −11

102 104 −2 117 118 −1

130 133 −3

14.63 Are the variances of decreases in blood pressure equal in populations of black men given calcium and given a placebo? Example 7.22 (page 518) applied the F test for equality of variances to the data in Table 14.7. This test is unreliable because it is sensitive to nonnormality in the data. The permutation test does not suffer from this drawback.

(a) State the null and alternative hypotheses.

(b) Perform a permutation test using the F statistic (ratio of sample vari-ances) as your statistic. What do you conclude?

(c) Compare the permutation test P-value with that in Example 7.22. What do you conclude about the F test for equality of variances for these data?

14.64 Exercise 7.27 (page 478) gives these data on a delicate measurement of total

CHALLENGE

body bone mineral content made by two operators on the same 8 subjects:15 Subject

Operator 1 2 3 4 5 6 7 8

1 1.328 1.342 1.075 1.228 0.939 1.004 1.178 1.286 2 1.323 1.322 1.073 1.233 0.934 1.019 1.184 1.304 Do permutation tests give good evidence that measurements made by the two operators differ systematically? If so, in what way do they differ? Do two tests, one that compares centers and one that compares spreads.

Examples 14.5 and 14.8 to use the bootstrap t and bootstrap percentile con-fidence intervals for the trimmed mean of the population. Now we can check these against more accurate intervals. Bootstrap the trimmed mean and give all of the bootstrap 95% confidence intervals: t, percentile, BCa, and tilting.

Make a graphical comparison by drawing a vertical line at the original sample mean x and displaying the four intervals horizontally, one above the other. De-scribe how the intervals compare. Do you still regard the bootstrap t and per-centile intervals as adequately accurate?

14.66 Exercise 7.29 (page 479) reports the changes in reasoning scores of 34 pre-school children after six months of piano lessons. Here are the changes:

2 5 7 −2 2 7 4 1 0 7 3 4 3 4 9 4 5

2 9 6 0 3 6 −1 3 4 6 7 −2 7 −3 3 4 4

(a) Make a histogram and normal quantile plot of the data. Is the distribution approximately normal?

(b) Find the sample mean and its standard error using formulas.

(c) Bootstrap the mean and find the bootstrap standard error. Does the boot-strap give comparable results to theoretical methods?

14.67 Your software can generate random numbers that have the uniform distri-bution on 0 to 1. Figure 4.9 (page 283) shows the density curve. Generate a sample of 50 observations from this distribution.

(a) What is the population median? Bootstrap the sample median and de-scribe the bootstrap distribution.

(b) What is the bootstrap standard error? Compute a bootstrap t 95% confi-dence interval.

(c) Find the BCa or tilting 95% confidence interval. Compare with the interval in (b). Is the bootstrap t interval reliable here?

14.68 A fitness center employs 20 personal trainers. Here are the ages in years of the female and male personal trainers working at this center:

Male 25 26 23 32 35 29 30 28 31 32 29

Female 21 23 22 23 20 29 24 19 22

(a) Make a back-to-back stemplot. Do you think the difference in mean ages will be significant?

(b) A two-sample t test gives P< 0.001 for the null hypothesis that the mean age of female personal trainers is equal to the mean age of male personal trainers. Do a two-sided permutation test to check the answer.

(c) What do you conclude about using the t test? What do you conclude about the mean ages of the trainers?

14.69 Exercise 2.9 (page 116) describes a study that suggests that the “pain” caused by social rejection really is pain, in the sense that it causes activity in brain

areas known to be activated by physical pain. Here are data for 13 subjects on degree of social distress and extent of brain activity:16

Social Brain Social Brain

Subject distress activity Subject distress activity

1 1.26 −0.055 8 2.18 0.025

2 1.85 −0.040 9 2.58 0.027

3 1.10 −0.026 10 2.75 0.033

4 2.50 −0.017 11 2.75 0.064

5 2.17 −0.017 12 3.33 0.077

6 2.67 0.017 13 3.65 0.124

7 2.01 0.021

Make a scatterplot of brain activity against social distress. There is a positive linear association, with correlation r= 0.878. Is this correlation significantly greater than 0? Use a permutation test.

14.70 Use the bootstrap to obtain a 95% confidence interval for the correlation in

CHALLENG

E the population of all similar subjects from the data in the previous exercise.

(a) The permutation distribution in the previous exercise was reasonably nor-mal, with somewhat short tails. The bootstrap distribution is very nonnor-mal: most resample correlations are not far from 1, the largest value that a correlation can have. Explain carefully why the two distributions differ in shape. Also explain why we might expect a bootstrap distribution to have this shape when the observed correlation is r= 0.878.

(b) Choose an appropriate bootstrap confidence interval for the population correlation and state your conclusion.

14.71 We have compared the selling prices of Seattle real estate in 2002 (Table 14.1) and 2001 (Table 14.5). Let’s compare 2001 and 2000. Here are the prices (thou-sands of dollars) for 20 random sales in Seattle in the year 2000:

333 126.5 207.5 199.5 1836 360 175 133 1100 203

194.5 140 280 475 185 390 242 276 359 163.95

(a) Plot both the 2000 and the 2001 data. Explain what conditions needed for a two-sample t test are violated.

(b) Perform a permutation test to find the P-value for the difference in means.

What do you conclude about selling prices in 2000 versus 2001?

14.72 Exercise 7.37 (page 481) gives the following readings for 12 home radon de-tectors when exposed to 105 picocuries per liter of radon:

91.9 97.8 111.4 122.3 105.4 95.0 103.8 99.6 96.6 119.3 104.8 101.7

Part (a) of Exercise 7.37 judges that a t confidence interval can be used despite the skewness of the data.

(a) Give a formula-based 95% t interval for the population mean.

(b) Find the bootstrap 95% BCa or tilting interval for the mean.

(c) Look at the bootstrap distribution. Is it approximately normal in appearance?

(d) Do you agree that the t interval is robust enough in this case? Why or why not? Keep in mind that whether the confidence interval covers 105 is im-portant for the study’s purposes.

14.73 The study described in the previous exercise used a one-sample t test to see if the mean reading of all detectors of this type differs from the true value 105.

Can you replace this test by a permutation test? If so, carry out the test and compare results. If not, explain why not.

14.74 In financial theory, the standard deviation of returns on an investment is used to describe the risk of the investment. The idea is that an investment whose returns are stable over time is less risky than one whose returns vary a lot. The data file ex14 074.dat contains the returns (in percent) on 1129 consecutive days for a portfolio that weights all U.S. common stocks according to their market value.17

(a) What is the standard deviation of these returns?

(b) Bootstrap the standard deviation. What is its bootstrap standard error?

(c) Find the 95% bootstrap t confidence interval for the population standard deviation.

(d) Find the 95% tilting or BCa confidence interval for the standard devia-tion. Compare the confidence intervals and give your conclusions about the appropriateness of the bootstrap t interval.

14.75 Nurses in an inner-city hospital were unknowingly observed on their use of latex gloves during procedures for which glove use is recommended.18 The nurses then attended a presentation on the importance of glove use. One month after the presentation, the same nurses were observed again. Here are the proportions of procedures for which each nurse wore gloves:

Nurse Before After Nurse Before After

1 0.500 0.857 8 0.000 1.000

2 0.500 0.833 9 0.000 0.667

3 1.000 1.000 10 0.167 1.000

4 0.000 1.000 11 0.000 0.750

5 0.000 1.000 12 0.000 1.000

6 0.000 1.000 13 0.000 1.000

7 1.000 1.000 14 1.000 1.000

(a) Why is a one-sided alternative proper here? Why must matched pairs methods be used?

(b) Do a permutation test for the difference in means. Does the test indicate that the presentation was helpful?

14.76 In the previous exercise, you did a one-sided permutation test to compare means before and after an intervention. If you are mainly interested in whether or not the effect of the intervention is significant at the 5% level, an alternative approach is to give a bootstrap confidence interval for the mean difference within pairs. If zero (no difference) falls outside the interval, the result is significant. Do this and report your conclusion.

14.77 Examples 8.9 (page 557) and 8.11 (page 562) examine survey data on binge

CHALLENG

E drinking among college students. Here are data on the prevalence of frequent binge drinking among female and male students:19

Sample Binge Gender size drinkers

Men 7,180 1,630

Women 9,916 1,684

Total 17,096 3,314

The sample is large, so that traditional inference should be accurate. Nonethe-less, use resampling methods to obtain

(a) a 95% confidence interval for the proportion of all students who are fre-quent binge drinkers.

(b) a test of the research hypothesis that men are more likely than women to be frequent binge drinkers.

(c) a 95% confidence interval for the difference in the proportions of men and of women who are frequent binge drinkers.

14.78 Is there a difference in the readability of advertisements in magazines aimed at people with varying educational levels? Here are word counts in randomly selected ads from magazines aimed at people with high and middle education levels.20

Education level Word count

High 205 203 229 208 146 230 215 153 205

80 208 89 49 93 46 34 39 88

Medium 191 219 205 57 105 109 82 88 39

94 206 197 68 44 203 139 72 67

(a) Make histograms and normal quantile plots for both data sets. Do the dis-tributions appear approximately normal? Find the means.

(b) Bootstrap the means of both data sets and find their bootstrap standard errors.

(c) Make histograms and normal quantile plots of the bootstrap distribu-tions. What do the plots show?

(d) Find the 95% percentile and tilting intervals for both data sets. Do the intervals for high and medium education level overlap? What does this indicate?

(e) Bootstrap the difference in means and find a 95% percentile confidence interval. Does it contain 0? What conclusions can you draw from your confidence intervals?

14.79 The researchers in the study described in the previous exercise expected higher word counts in magazines aimed at people with high education level.

Do a permutation test to see if the data support this expectation. State hy-potheses, give a P-value, and state your conclusions. How do your conclusions here relate to those from the previous exercise?

14.80 The following table gives the number of burglaries per month in the Hyde Park neighborhood of Chicago for a period before and after the commence-ment of a citizen-police program:21

Before

60 44 37 54 59 69 108 89 82 61 47

72 87 60 64 50 79 78 62 72 57 57

61 55 56 62 40 44 38 37 52 59 58

69 73 92 77 75 71 68 102

After

88 44 60 56 70 91 54 60 48 35 49

44 61 68 82 71 50

(a) Plot both sets of data. Are the distributions skewed or roughly normal?

(b) Perform a one-sided (which side?) t test on the data. Is there statistically significant evidence of a decrease in burglaries after the program began?

(c) Perform a permutation test for the difference in means, using the same alternative hypothesis as in part (b). What is the P-value? Is there a sub-stantial difference between this P-value and the one in part (b)? Use the shapes of the distributions to explain why or why not. What do you con-clude from your tests?

(d) Now do a permutation test using the opposite one-sided alternative hy-pothesis. Explain what this is testing, why it is not of interest to us, and why the P-value is so large.

14.81 The previous exercise applied significance tests to the Hyde Park burglary data. We might also apply confidence intervals.

(a) Bootstrap the difference in mean monthly burglary counts. Make a his-togram and a normal quantile plot of the bootstrap distribution and de-scribe the distribution.

(b) Find the bootstrap standard error, and use it to create a 95% bootstrap t confidence interval.

(c) Find the 95% percentile confidence interval. Compare this with the t inter-val. Does the comparison suggest that these intervals are accurate? How do the intervals relate to the results of the tests in the previous exercise?

在文檔中 14.1 The Bootstrap Idea (頁 63-69)

相關文件