“Intro to Prob” Page 338

Prob1: Let S100 be the number of heads that turn up in 100 tosses of a fair coin. Use the Central Limit Theorem to estimate the following conditions:

From chpter 9, CLT page 332: normal density between standardized values are:

i-1/2 => (i-1/2-np)/sqrt(npq), lower bound

j-1/2 => (j+1/2-np)/sqrt(npq), upper bound

exercise 1a

P(Sn <= (45+1/2-50)/5) = -0.9, the upper bound

#Exercise 1a
#P(S100 ≤ 45)
n<- 100
p<- 0.5
q<-1-p
mu <- n*p
sigma <- sqrt(n*p*q)

p <- pnorm(-0.9)

p
## [1] 0.1840601

exercise 1b

Between 45 and 55

P(Sn > (45-1/2-50)/5) = -1.1 lower bound => -1.1 P(Sn < (55+1/2-50)/5) = 1.1 upper bound => 1.1

p <- pnorm(1.1)-pnorm(-1.1)
p
## [1] 0.7286679

exercise 1c

P(Sn < (63+1/2-50)/5) = 2.7, upper bound

p <- 1- pnorm(2.7)
p
## [1] 0.003466974

exercise 1d

P(Sn < (57+1/2-50)/5) = 1.5 upper bound => 1.1

p <- pnorm(1.5)
p
## [1] 0.9331928