## prettydoc
## TRUE
10 Find the probability that among 10,000 random digits the digit 3 appears not more than 931 times
\(P(X <= 931 | pi = .1) = 0.01064763\)
n <- 10000
pi <- .1
x <- 931
pbinom(x, n, pi)## [1] 0.01064763
12 A balanced coin is flipped 400 times. Determine the number x such that the probability that the number of heads is between 200 - x and 200 + x is approximately .80.
\(P(200 - x < X < 200 + x | pi = .5) = 0.8\)
n <- 400
pi <- .5
given <- .8
#we want the 10th percentile on both sides of the distribution
pctile <- (1 - given)/2
a <- qbinom(pctile, n, pi)
(x <- 200 - a)## [1] 13