Simulating the Central Limit Theorem
Hello! In this short post, I will…
sampleDist = function(n) {
sample(x = c(1,2,3,4,5,6), n, replace = T, prob = c(0.5, 0.15, 0.15, 0.10, 0.05, 0.05))
}
sampleDist(30)
## [1] 1 3 5 3 1 1 3 1 1 2 1 1 2 1 2 1 3 4 3 4 1 4 1 1 3 1 1 1 1 1