Week 10: Interactive R Exercises
Quantitative Methods · Probability II
R runs in your browser: nothing to install, no working directory to set. Work through the blocks in order, one block at a time, during the lecture. The slides tell you when to open the next block.
| Block | Reading | Min |
|---|---|---|
| Block 1: Random variables: Bernoulli and uniform | Imai §6.3.1–6.3.2 | 3 |
| Block 2: The binomial distribution | Imai §6.3.3 | 3 |
| Block 3: The normal distribution | Imai §6.3.4 | 4 |
| Block 4: Expectation, variance and the law of large numbers | Imai §6.3.5, 6.4.1 | 4 |
| Block 5: Central limit theorem and election prediction | Imai §6.4.2–6.4.3 | 5 |
NoteTips
- The first page load takes a few seconds while R starts. Keep the tab open.
- Run each cell and look at the output; a short question at the end of each block wraps it up. Use Hint and Solution only after you tried.
- Your code is not saved when you close the tab. Copy what you want to keep into RStudio.
- Real analyses (labs, final project) use RStudio; this page is for the small exercises.