 
Bootstrap confidence intervals
Worked example
The following examples all employ the same statistic, a 10% trimmed mean, and the same data set  the number of larval cryptolignacae upon each of 50 randomlyselected Wobbiewrot's Rattus anilofilous.
For these data the observed value of this statistic was 7.225
 Normal bootstrap confidence limits
We applied the sequence given above using this Rcode:
The normal approximation confidence limits we obtained were 6.753229 and 7.696771
 Simple percentile limits
We applied the sequence given above using this Rcode:
The simple percentile limits we obtained were 6.950 and 7.775
 Backwards percentile limits
We applied the sequence given above using this Rcode:
The backward percentile limits we obtained were 6.675 and 7.5
 Bias corrected percentile limits
We applied the sequence given above using this Rcode:
Notice that because, in this instance the statistic's distribution may be unsmooth, our code calculates bias using mean rank, rather than value.
The biascorrected percentile limits we obtained were 6.925 to 7.700
 Accelerated bias corrected percentile limits
We applied the sequence given above using this Rcode:
The accelerated bias corrected percentile limits we obtained were 6.9 to 7.7
 Studentized percentile limits
We applied the sequence given above using this Rcode:
The studentized mean we obtained was 35.24868
Its percentile limits were 19.61014 and 65.89138
To make those limits comparable to the observed trimmed mean (7.225) we multiplied them by its standard error (the standard deviation of the, first stage, bootstrap trimmed means) giving limits of 4.019533 and 13.505900
Notice these intervals are wider than the simple percentile ones we obtained, as you should expect when coverage is increased. However, since they were obtained from a modest sample of discrete skewed data, we suspect these intervals may be a little too wide.
 Smoothed percentile limits
We applied the sequence given above using this Rcode:
For simplicity we used simple Gaussian smoothing and a simple percentile interval. Below are the original and smoothed distribution of our data.
Therefore, because these data are counts, jittered bootstrap data were rounded to the nearest positive wholenumber.
The simple percentile smoothed bootstrap limits we obtained were 6.875 and 7.925
These limits, whilst wider than our (unsmoothed) simple percentile limits, were narrower than our bootstrap t intervals (above).
 Testinversion percentile limits
We applied the sequence given above using the following Rcode:
Notice that because these data could not arise if the population had no larval cryptolignacae, negative counts are impossible, and these counts were quite skewed, we constructed our model populations by shifting each part of the population proportional to its difference from zero.
Also, to avoid the need for iteration, we obtained our results as a Pvalue plot and used the values estimated confidence limits by interpolation.
Furthermore because these data were counts, rather than sample an arbitrary (fitted) parametric model, we used a smoothed bootstrap. But, because shifting our model population would change its variance, we calculated the bandwidth after each shift.
Last, since we are shifting the sample but resampling the smoothed sample, assuming the parameter we are tying to estimate is the 10% trimmed mean of the population, we have further assumed that a sample of 50×5000 observations will give us a reasonably unbiased estimate of Θ.
The testinversion limits we obtained, after 100 Gaussiansmoothed percentile bootstrap tests, were 6.673416 and 7.668602
The 1sided Pvalue plot is below.
Notice that, like ABC limits, these intervals were not constructed assuming is homoscedastic  indeed, given negative data values are rounded to zero, that seemed highly unlikely. Instead this model assumes these data, being rightskewed, have a positive association between location and variance.
