Robert_V._Hogg,_Joseph_W._McKean,_Allen_T._Craig

(Jacob Rumans) #1
314 Some Elementary Statistical Inferences

(a)Rewrite the percentile bootstrap confidence interval algorithm using the mean
and collectingt∗jforj=1, 2 ,... ,B. Form the interval
(
x−t∗(1−α/2)

s

n

,x−t∗(α/2)

s

n

)
, (4.9.16)

wheret∗(γ)=t∗([γ∗B]); that is, order thet∗js and pick off the quantiles.

(b)Rewrite the R programpercentciboot.sand then use it to find a 90% con-
fidence interval forμfor the data in Example 4.9.3. Use 3000 bootstraps.

(c)Compare your confidence interval in the last part with the nonstandardized
bootstrap confidence interval based on the programpercentciboot.s.

4.9.7. Consider the algorithm for a two-sample bootstrap test given in Section
4.9.2.


(a)Rewrite the algorithm for the bootstrap test based on the difference in medi-
ans.

(b)Consider the data in Example 4.9.2. By substituting the difference in medians
for the difference in means in the R programboottesttwo.s, obtain the
bootstrap test for the algorithm of part (a).

(c)Obtain the estimatedp-value of your test forB= 3000 and compare it to the
estimatedp-value of 0.063 that the authors obtained.

4.9.8.Consider the data of Example 4.9.2. The two-samplet-test of Example 4.6.2
can be used to test these hypotheses. The test is not exact here (why?), but it is
an approximate test. Show that the value of the test statistic ist=0.93, with an
approximatep-value of 0.18.


4.9.9.In Example 4.9.3, suppose we are testing the two-sided hypotheses,

H 0 :μ=90versusH 1 : μ =90.

(a)Determine the bootstrapp-value for this situation.

(b)Rewrite the R programboottestonemeanto obtain thisp-value.

(c)Compute thep-value based on 3000 bootstraps.

4.9.10.Consider the following permutation test for the two-sample problem with
hypotheses (4.9.7). Letx′ =(x 1 ,x 2 ,...,xn 1 )andy′ =(y 1 ,y 2 ,...,yn 2 )bethe
realizations of the two random samples. The test statistic is the difference in sample
meansy−x. The estimatedp-value of the test is calculated as follows:


  1. Combine the data into one samplez′=(x′,y′).

  2. Obtain all possible samples of sizen 1 drawn without replacement fromz.Each
    such sample automatically gives another sample of sizen 2 , i.e., all elements
    ofznot in the sample of sizen 1 .ThereareM=


(n 1 +n 2
n 1

)
such samples.
Free download pdf