About

In the solutions below, we focus on the answers to part c of each question. For functions please see the corresponding R script at the course git repo.

Question 1

  1. See confint_jackknife() defined in ps3_q1.R.
  2. See confint_boot() defined in ps3_q1.R.
  3. The table below contains CIs for each method and dose.
Table 1. 95% Confidence intervals for the ToothGrowth data.
dose jackknife percentile bootstrap basic bootstrap normal bootstrap
0.5 (1.15, 2.17) (1.24, 2.20) (1.12, 2.07) (1.18, 2.13)
1.0 (1.16, 1.55) (1.17, 1.53) (1.17, 1.54) (1.17, 1.54)
2.0 (0.86, 1.13) (0.88, 1.13) (0.86, 1.11) (0.87, 1.12)

Question 2

  1. See confint_jackknife_mc() defined in ps3_q2.R.
  2. See confint_boot_mc() defined in ps3_q2.R.
  3. In the Monte Carlo simulation shown here, we compare CIs constructed using the jackknife or one of three bootstrap methods for estimating the ratio of means \(E[X] / E[Y] = 2\) when \(X_1, \dots, X_{30} \stackrel{_{iid}}{\sim} \textrm{Exponetial}(1)\) and \(Y_1, \dots, Y_{20} \stackrel{_{iid}}{\sim} \textrm{Exponential}(0.5)\).

We use 10,000 Monte Carlo replicates and 10,000 bootstrap samples. The Monte Carlo replicates are split into 10 blocks of 1,000 to avoid allocating too large of vectors in the bootstrap function.

The results are in the table below.

Table 2. Comparison of jaccknife and bootstrap confidence intervals for a ratio of exponentials.
Method Coverage Length Shape
basic bootstrap 0.88 (0.88, 0.89) 2.47 (2.46, 2.49) 1 (-, -)
jackknife 0.94 (0.93, 0.94) 2.48 (2.46, 2.49) 1 (-, -)
normal bootstrap 1.00 (1.00, 1.00) 4.38 (4.35, 4.40) 1.00 (1.00, 1.00)
percentile bootstrap 0.93 (0.92, 0.93) 2.47 (2.46, 2.49) 1.86 (1.85, 1.86)