10/24/2022
R demos for Chapter 9
- R Demo and discussion of commands in Chapter 9 - See Chapter9_Statistical Foundations.R
Chapter 13 - Simulation
- Purpose and importance of simulation
- Randomizing fuctions in R
- shuffle() in the mosaic package
- runif()
- rnorm()
- rexp()
- rt()
- rbinom()
- nflip()
- and many others
- R Demo and discussion of commands in Chapter 13 - See Chapter13_Simulation.R
Discrete Random Variables
- Bernoulli distribution
- probability distribution
- mean, variance, and standard deviation
- Binomial distribution
- probability distribution
- mean, variance, and standard deviation
- dbinom(k, n, p), pbinom(k, n, p), and rbinom(k, n, p) with RStudio
- Geometric distribution
- Mean, variance, memoryless property
- dgeom(k, p), pgeom(k, p), and rgeom(n, p) with RStudio
- library(visualize)
- visualize.geom(stat=1, prob=0.3, section="lower", strict = FALSE)
- Negative binomial distribution
- Mean and variance
- dnbinom(k, r, p), pnbinom(k, r, p), and rnbinom(n, r, p) with RStudio
- Hypergeometric distribution
- dhyper(k, r, N-r, n), phyper(k, r, N-r, n), and rhyper(k, r, N-r, n) with RStudio
- Relationship with binomial distribution
- Poisson distribution
- dpois(k, lamda), ppois(k, lamda), and rpois(n, lamda)
Please send me an email message (before October 27) that includes a short description of your resampling and simulation plans for your second project, whether you will be working alone or with a partner, and the preferred date for your presentation (between October 31 and November 7).
We will discuss continuous probability distributions on Wednesday, and have a problem session on Friday.