Chapter 3, Ex 8

8. A die is rolled 30 times. What is the probability that a 6 turns up exactly 5 times? What is the most probable number of times that a 6 will turn up?

P_5Sixs <- choose(30,5)/6^30
P_5Sixs
## [1] 6.446079e-19
results <- c()
for (i in 1:30){
  results[i] <- choose(30,i)/6^30}
match(max(results), results) # Most Probable # of Times
## [1] 15