Problem Set Stats Bootcamp - class 9

Stats intro and history

Author

Neelanjan Mukherjee

Published

March 27, 2026

── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr     1.2.0     ✔ readr     2.2.0
✔ forcats   1.0.1     ✔ stringr   1.6.0
✔ ggplot2   4.0.2     ✔ tibble    3.3.1
✔ lubridate 1.9.5     ✔ tidyr     1.3.2
✔ purrr     1.2.1     
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag()    masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors

Attaching package: 'cowplot'


The following object is masked from 'package:lubridate':

    stamp

Explore coin flip distribution characteristics

When we flip a fair coin multiple times (numFlips) in a row, we expect to get heads (or tails) 50% of the time on average. This is not always the case for a single round of flipping, but if we do multiple rounds with (numRounds) that average should be 50%.

Problem # 1

In class, we simulated coin flip experiments using two different coins that were either fair (0.5 prob of head) or unfair (0.9 prob of head). We varied the number of flips in a single round (numFlips) and the number of rounds of flipping (numRounds). For this assignment, use the same to coins and use all possible combinations of numFlips and numRounds from the table below. Make sure to set.seed(9) if you want to get the same results as in the answer key.

parameters to explore
numFlips numRounds
5 10
500 100
  1. Create a function called flippy that allows your to set numFlips, numRounds, and prob of H.
flippy <- function(nFlip, nRound, myProb) {}
  1. Plot your result. There should be 4 plots total. Create a 2x2 grid by using faceting.
# we want 5 and 500 flips

# we want to do 10 rounds

# we want to do 100 rounds

# combine data and tidy

# plot and facet

Describe (couple sentences) how increasing numFlips and numRounds alters:

3. The estimation of the true mean.

4. The spread around the true mean.

Problem # 2

We have seen that scientists played a major role in the eugenics movement, which greatly influenced society through policies. Explore the [eugenics archive](https://www.eugenicsarchive.ca/), pick on event from the timeline or the connections section. Describe what happened in a couple sentences and your thoughts on the matter in another couple sentences. Alternatively, you can identify events in Colorado history to describe and comment on. Obviously, there is no wrong answer here. I may pick some of your responses and anonymously share them with the rest of the class.