ISLR Home

# Question

We will now derive the probability that a given observation is part of a bootstrap sample. Suppose that we obtain a bootstrap sample from a set of n observations.

1. What is the probability that the first bootstrap observation is not the jth observation from the original sample? Justify your answer.

2. What is the probability that the second bootstrap observation is not the jth observation from the original sample?

3. Argue that the probability that the jth observation is not in the bootstrap sample is (1 − 1/n)n.

4. When n = 5, what is the probability that the jth observation is in the bootstrap sample?

5. When n = 100, what is the probability that the jth observation is in the bootstrap sample?

198 5. Resampling Methods

1. When n = 10, 000, what is the probability that the jth observa- tion is in the bootstrap sample?

2. Create a plot that displays, for each integer value of n from 1 to 100,000, the probability that the jth observation is in the bootstrap sample. Comment on what you observe.

3. We will now investigate numerically the probability that a boot- strap sample of size n = 100 contains the jth observation. Here j = 4. We repeatedly create bootstrap samples, and each time we record whether or not the fourth observation is contained in the bootstrap sample.

> store=rep(NA, 10000) > for(i in 1:10000){
store[i]=sum(sample(1:100, rep=TRUE)==4)>0 }
> mean(store)


Comment on the results obtained.

1. We now review k-fold cross-validation.
1. Explain how k-fold cross-validation is implemented.
2. What are the advantages and disadvantages of k-fold cross- validation relative to:
1. The validation set approach?

2. LOOCV?

Probably 1 - 1/n