General Instructions

To do each example, just click the Submit button. You do not have to type in any R instructions or specify a dataset. That's already done for you.

Bias Estimation

Section 10.3 in Efron and Tibshirani.


Everything pretty obvious here.

Improved Bias Estimation

Section 10.4 in Efron and Tibshirani.


More on Resampling Form Estimators


The function rmedian calculates the median of a bootstrap sample given in resampling form.

The code is a bit tricky. The statement <- round(p * n)
converts p back to counts, the round function being there to make sure the result is exactly integer-valued (not just close). Then the statement <- rep(1:n,
converts these back to the index values that were counted: each element of the sequence 1:n is repeated as many times as the corresponding count in The resulting inside the function definition is just like the outside the function definition except for order, which doesn't matter. Then we can use to make in the usual way, and apply the function that computes the estimator to in the usual way.

We try it out, and indeed do get the same answers either way.

Clearly, this function has nothing particular to do with medians. Changing the last line lets it calculate any other function.