RNG

The Basics of Simulation

Background This post explores some of the basic concepts of simulation. I mostly explore these concepts using basic probablity and the built in distribution functions. This is a reproducible example if you have R Studio just make sure you have installed the correct packages. Ideas from Probablity Course https://www.probabilitycourse.com/chapter13/chapter13.php set.seed(123) p <- 0.5 n <- 1000 U <- runif(n) toss <- as.