Session Ready
Exercise

Sample proportion value effects on bootstrap CIs

One additional element that changes the width of the confidence interval is the sample parameter value, \(\hat{p}\).

Generally, when the true parameter is close to 0.5, the standard error of \(\hat{p}\) is larger than when the true parameter is closer to 0 or 1. When calculating a bootstrap t-confidence interval, the standard error controls the width of the CI, and here (given a true parameter of 0.8) the sample proportion is higher than in previous exercises, so the width of the confidence interval will be narrower.

Instructions
100 XP
  • calc_p_hat() is shown in the script to calculate the sample proportions. calc_t_conf_int() from the previous exercise has been updated to now use any value of p_hat as an argument. Read their definitions and try to understand them.
  • Run the code to calculate the bootstrap t-confidence interval for the original population.
  • Consider a new population where the true parameter is 0.8, one_poll_0.8. Calculate \(\hat{p}\) of this new sample, using the same technique as with the original dataset. Call it p_hat_0.8.
  • Find the bootstrap t-confidence interval using the new bootstrapped data, one_poll_boot_0.8, and the new \(\hat{p}\). Notice that it is narrower than previously calculated.