04. Simulating
Simulating scenarios, simulating datasets, simulating random variables.
Agenda
September 23, 2024
- Why simulate?
- What makes a good simulation?
- Examples
September 25, 2024
- Bias in modeling
- Simulating statistical inference
Readings
Class notes: Simulating
Baumer, Horton, and Kaplan (2021), Iteration (Chp 7) in Modern Data Science for R.
Reflection questions
- What are some reasons to simulate?
- What makes a good simulation?
- What does “90%” mean when describing a 90% confidence interval? (That is, 90% of what?)
- What does a type I error rate mean when doing hypothesis testing? (That is, rate of what?)
- The p-value is the probability of obtaining the observed data or more extreme if the null hypothesis is true. If probability is interpreted in the long-run-frequency definition, what is happening repeatedly so as to conceptualize the probability of something happening?
Ethics considerations
How can we use simulations to understand algorithmic bias or other types of problems in modeling?
What does it mean for two different populations to have different feature distributions?
Slides
In class slides for both 9/23/24 and 9/25/24.
Additional Resources
Posit cheatsheets – there is one on purrr!
Simulating who would be in the first GOP debate (NYT 7/29/15)
Blog by Aaron Roth, Algorithmic Unfairness Without Any Bias Baked In.
Simulating linear models from the ISCAM applets.
:::