Foundations of Inference in R
Jo Hardin
Instructor
# Compare confidence intervals
one_poll_boot %>% summarize(
lower = p_hat - 2 *
sd(prop_yes_boot),
upper = p_hat + 2 *
sd(prop_yes_boot))
# A tibble: 1 × 2
lower upper
<dbl> <dbl>
1 0.536148 0.863852
# Find 2.5% and 97.5% of p-hat vals
one_poll_boot %>% summarize(
q025_prop = quantile(prop_yes_boot,
p = .025),
q975_prop = quantile(prop_yes_boot,
p = .975))
# A tibble: 1 × 2
q025_prop q975_prop
<dbl> <dbl>
1 0.5333333 0.8333333
Goal is to find the parameter when all we know is the statistic
Never know whether the sample you collected actually contains the true parameter
Bootstrap t-CI: (0.536, 0.864)
Percentile interval: (0.533, 0.833)
We are 95% confident that the true proportion of people planning to vote for candidate X is between 0.536 and 0.864 (or 0.533 and 0.833)
Sampling distribution of the statistic is reasonably symmetric and bell-shaped
Sample size is reasonably large
Variability of resampled proportions
Foundations of Inference in R