8. A die is rolled 30 times. What is the probability that a 6 turns up exactly 5 times?
In R
dbinom(5, 30, 1/6)
## [1] 0.1921081What is the most probable number of times that a 6 will turn up?
30 * 1/6## [1] 5
10. In a ten-question true-false exam, find the probability that a student gets a grade of 70 percent or better by guessing. Answer the same question if the test has 30 questions, and if the test has 50 questions.
nquestions <- 10
pct70 <- ceiling(nquestions * .7)
pbinom(pct70, nquestions, .5, lower.tail = F)## [1] 0.0546875
nquestions <- 30
pct70 <- ceiling(nquestions * .7)
pbinom(pct70, nquestions, .5, lower.tail = F)## [1] 0.008062401
nquestions <- 50
pct70 <- ceiling(nquestions * .7)
pbinom(pct70, nquestions, .5, lower.tail = F)## [1] 0.001301086