Skip to content

Commit

Permalink
make materials for classes 11, 12, and 13 available
Browse files Browse the repository at this point in the history
  • Loading branch information
taliaferrojm committed Sep 4, 2024
1 parent 8931a4e commit c79f69e
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 10 deletions.
15 changes: 15 additions & 0 deletions _freeze/problem-sets/ps-10/execute-results/html.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"hash": "a6352b4b43855cb24b2f76516def7003",
"result": {
"engine": "knitr",
"markdown": "---\ntitle: \"Problem Set Stats Bootcamp - class 10\"\nsubtitle: \"Stats intro and history\"\nauthor: \"Neelanjan Mukherjee\"\ndate: last-modified\n---\n\n::: {.cell}\n::: {.cell-output .cell-output-stderr}\n\n```\n── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──\n✔ dplyr 1.1.4 ✔ readr 2.1.5\n✔ forcats 1.0.0 ✔ stringr 1.5.1\n✔ ggplot2 3.5.1 ✔ tibble 3.2.1\n✔ lubridate 1.9.3 ✔ tidyr 1.3.1\n✔ purrr 1.0.2 \n── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──\n✖ dplyr::filter() masks stats::filter()\n✖ dplyr::lag() masks stats::lag()\nℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors\n\nAttaching package: 'cowplot'\n\n\nThe following object is masked from 'package:lubridate':\n\n stamp\n```\n\n\n:::\n:::\n\n\n\n\n## Explore coin flip distribution characteristics\n\nWhen 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%.\n\n## Problem \\# 1\n\nIn 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.\n\n| `numFlips` | `numRounds` |\n|------------|-------------|\n| 5 | 10 |\n| 500 | 100 |\n\n: parameters to explore\n\n1. Create a function called `flippy` that allows your to set `numFlips`, `numRounds`, and `prob` of H.\n\n\n\n\n::: {.cell}\n\n```{.r .cell-code}\nflippy <- function(nFlip, nRound, myProb) {\n}\n```\n:::\n\n\n\n\n2. Plot your result. There should be 4 plots total. Create a 2x2 grid by using `faceting`.\n\n\n\n\n::: {.cell}\n\n```{.r .cell-code}\n# we want 5 and 500 flips\n\n# we want to do 10 rounds\n\n# we want to do 100 rounds\n\n# combine data and tidy\n\n# plot and facet\n```\n:::\n\n\n\n\nDescribe (couple sentences) how increasing `numFlips` and `numRounds` alters:\n\n3\\. The estimation of the true mean.\n\n4\\. The spread around the true mean.\n\n## Problem \\# 2\n\nWe 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.\n",
"supporting": [],
"filters": [
"rmarkdown/pagebreak.lua"
],
"includes": {},
"engineDependencies": {},
"preserve": {},
"postProcess": true
}
}
8 changes: 2 additions & 6 deletions _freeze/slides/slides-03/execute-results/html.json

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions slides/_slides-11.qmd → slides/slides-11.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ mean
#| echo: true
#| output-location: column-fragment
mean(p$body_mass_g)
mn=mean(p$body_mass_g)
```

. . .
Expand All @@ -393,7 +393,7 @@ median
#| echo: true
#| output-location: column-fragment
median(p$body_mass_g)
md=median(p$body_mass_g)
```

------------------------------------------------------------------------
Expand All @@ -406,8 +406,8 @@ ggplot(
aes(x = body_mass_g)
) +
geom_density() +
# geom_vline() +
# geom_vline() +
geom_vline(xintercept = mn,color="red") +
geom_vline(xintercept = md,color="blue") +
theme_cowplot()
```

Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit c79f69e

Please sign in to comment.