文档介绍:Exercise Solutions 421
Exercise Solutions
Solution 18-2
URN 36#1 36#0 pit
URN 77#1 52#0 chi
REPEAT 1000
SAMPLE 72 pit pit$
SAMPLE 129 chi chi$
MEAN pit$ p
MEAN chi$ c
SUBTRACT p c d
SCORE d scrboard
END
HISTOGRAM scrboard
PERCENTILE scrboard ( ) interval
PRINT interval
Results:
INTERVAL = - [estimated 95 percent confi-
dence interval]
422 Resampling: The New Statistics
Solution 21-1
REPEAT 1000
GENERATE 200 1,100 a
COUNT a <= 7 b
DIVIDE b 200 c
SCORE c scrboard
END
HISTOGRAM scrboard
PERCENTILE z ( ) interval
PRINT interval
Result:
INTERVAL = [estimated 95 percent confidence
interval]
Solution 21-2
We use the “bootstrap” technique of drawing many bootstrap
re-samples with replacement from the original sample, and
observing how the re-sample means are distributed.
NUMBERS (30 32 31 28 31 29 29 24 30 31 28 28 32 31 24 23 31
27 27 31) a
REPEAT 1000
Do 1000 trials or simulations
SAMPLE 20 a b
Draw 20 lifetimes from a, randomly and with replacement
Exercise Solutions 423
MEAN b c
Find the average lifetime of the 20
SCORE c scrboard
Keep score
END
HISTOGRAM scrboard
Graph the experiment results
PERCENTILE scrboard ( ) interval
Identify the and percentiles. These percentiles will enclose 95
percent of the resample means.
PRINT interval