#
# b
c("lower"= ppois(.5,10), "upper"= ppois(1.5,10))
## lower upper
## 4.539993e-05 4.993992e-04
a: The sum of normals is normal. According to prop 5.3.1, N(60 + 60 + 60, 12 + 12 + 12) b: The sum of normals is normal. According to prop 5.3.1, * $\bar{X} \sim N(\frac{1}{3}\times(60+60+60),(\frac{1}{3})^2\times(12+12+12))$ and * ${Y} is found similarly. * Now $\bar{Y}-bar{X}$ needs a key observation. We are adding −1 of $\bar{X}$
# See page 221
## a
pnorm(185,60*3,sqrt(12*3),lower.tail=FALSE)
## [1] 0.2023284
#or
1-pnorm(185,60*3,sqrt(12*3),lower.tail=TRUE)
## [1] 0.2023284
## b
pnorm(8,65-60,sqrt(36/3^2+15*3/(-3)^2),lower.tail=FALSE)
## [1] 0.1586553
# or
pnorm(8,5,sqrt(4+5),lower.tail=FALSE)
## [1] 0.1586553
# or
pnorm(8,5,3,lower.tail=FALSE)
## [1] 0.1586553
# or
1-pnorm(8,5,3,lower.tail=TRUE)
## [1] 0.1586553
# notice that due to 5.3.1 that subtracting two normals decreases the mean but increases the variance.
# notation is mu, var
#X1 is Normal(6,2)
#X2 is Normal(7,3)
#X3 is Normal(8,4)
## Now we need to find the distribution of their sums
#X1 + X2 + X3 is Normal(6+7+8,2+3+4)
# Note that we have to use the standard deviation in R
#a
qnorm(.95,21,sqrt(9))
## [1] 25.93456
#b
pnorm(25,21,sqrt(9))
## [1] 0.9087888
#c
dbinom(3,5,pnorm(25,21,sqrt(9),lower.tail = FALSE))
## [1] 0.006267159
## We need to remember that the sum of Poissons is Poisson. So we have a Poisson(30)
# We also need to remember that the mean and variance of a Poisson are lambda.
#a with
pnorm(35.5,30,sqrt(30))
## [1] 0.8423488
#a without
pnorm(35,30,sqrt(30))
## [1] 0.8193448
#b
ppois(35,30)
## [1] 0.8426165
Note the information that we catch from reading the story problem. * Random variable has a finite mean and variance (.5 and .2 respectively) * 36 layers are applied
Y ∼ N(36 × 0.5, 36 × 0.04) which can be written as Y ∼ N(18, 1.44)
## using the z-score
zscore = (16-18)/sqrt(1.44)
pnorm(zscore,lower.tail=TRUE)
## [1] 0.04779035
# or
pnorm(16,mean=18,sd=sqrt(1.44),lower.tail=TRUE)
## [1] 0.04779035