← All activities
Workshop 6 · Activity
Activity: Practice It (Bootstrapping!)
An in-class activity from the course slides — reproduced here so you can find it again after class.
📋 What to do
- Estimated Time: 15 minutes · Your Task
- Bootstrapping is the computational process of iteratively computing the same statistic from samples that differ just slightly due to random sampling with replacement.
- Bootstrapping returns ~1000 statistics, each just slightly different due to chance, that approximate the true shape of the sampling distribution for that statistic.
- In this activity, you will practice bootstrapping using the workshops/onsen.csv dataset.
- Please complete the following steps: Load in your dataset. Select a variable of interest. Select a statistic of interest and compute it one time (eg. xbbar, sbar, rbar, sigma_s, etc.).
- Bootstrap your dataset to get 1000 slightly different copies of the dataset.
- Using grouping by a unique id for each bootstrapped copy of the dataset, calculate the statistic again.
- Estimate the mean and standard error of the bootstrapped statistics. (The standard deviation of a sampling distribution is the standard error.)
- Explain the result in 1-2 sentences.
- Submission Requirement: Copy and paste your commented code into the CANVAS submit textbox below. Copy your mean and standard error for the statistic, and your description.
📮 Submit
Remember to submit on CANVAS (1 pt) — graded on completion. (Individual)
Note: this page carries the live text of the activity, including the links to slides and shared materials; check back here if something looks out of date. Hand your work in on Canvas, which also carries the due date and your grade.