Labs
The hands-on simulation strand (R + Quarto), in support of inferential reasoning
The labs are the course’s hands-on simulation strand. They run alongside the notes, not instead of them: where the notes develop an inferential idea and interpret it, a lab lets you do it — simulate the sampling distribution, draw the likelihood curve, build the bootstrap interval, update the posterior, and read what the result means. Computation is in service of the inference, not the other way around. There are four labs across the term, each tied to a specific week.
How a lab works
Every lab is built the same way, so you always know where you are:
- Goal. What the inferential task is meant to show, stated in one or two sentences and linked back to the companion week.
- Setup. The small bit of preparation you need — the random seed, the study, and the inferential question.
- Steps. The analysis itself, broken into numbered steps with shown R code. You read the code, understand each piece, then run it yourself.
- Verify. A check that the simulated result matches the theory and the interpretation from the notes — the moment where computation and reasoning meet.
- AI Use Note. A short record of any AI help, with three parts — Tool, Purpose, and Verification — where verification (how you checked the output yourself) is the load-bearing field.
A note on the code: in these labs the R chunks are shown for study, written with a fixed seed (set.seed(35103)) so they are reproducible. They are not executed on this site — you run them in your own R session. See the R · Quarto setup page to get going.
The labs
The four labs accompany the simulation-heavy weeks, one in each quarter of the term:
- Lab 2 — Simulating sampling distributions. Repeating the study in code to see a sampling distribution form, and reading its center and spread. (Accompanies Week 2.)
- Lab 6 — Likelihood & MLE curves. Drawing the likelihood and log-likelihood for a proportion and finding where they peak. (Accompanies Week 6.)
- Lab 10 — Bootstrap intervals. Resampling your own data to build a percentile confidence interval for a mean. (Accompanies Week 10.)
- Lab 12 — Bayesian updating by simulation. Turning a prior into a posterior and reading a credible interval. (Accompanies Week 12.)
Randomization and permutation tests get a full hands-on treatment inside the Week 11 note itself, with the same shown-code style.
Public vs. graded
The labs here are public study material; the graded deliverable, its rubric, and due date live in Blackboard (the LMS) — this page is study and practice only.