4.1 (Page - 142) Area under the curve, Part I. What percent of a standard normal distribution N(mu = 0; sd = 1) is found in each region? Be sure to draw a graph.

Load Library

#install.packages("visualize")
library(visualize)

\((a) Z < -1.35\)

pnorm1 <- pnorm(q=-1.35, mean=0, sd=1)
pnorm1
## [1] 0.08850799
area1<- round(pnorm1 * 100,2)
area1
## [1] 8.85
visualize.norm(stat=-1.35,mu=0,sd=1,section="lower")

\((b) Z > 1.48\)

pnorm2 <- pnorm(q=1.48, mean=0, sd=1, lower.tail=FALSE)
pnorm2
## [1] 0.06943662
area2 <- round(pnorm2 * 100,2)
area2
## [1] 6.94
visualize.norm(stat=1.48,mu=0,sd=1,section="upper")

\((c) -0.4 < Z < 1.5\)

p1 <- pnorm(q=1.5, mean=0, sd=1) 
p2 <- pnorm(q=-0.4, mean=0, sd=1) 
print(p1 - p2)
## [1] 0.5886145
area3 <- round((p1 - p2) * 100,2)
area3
## [1] 58.86
visualize.norm(stat=c(-0.4,1.5),mu=0,sd=1,section="bounded")

\((d) |Z| > 2\)

p3 <- pnorm(q=-2, mean=0, sd=1) 
p4 <- pnorm(q=2, mean=0, sd=1,lower.tail=FALSE) 
print(p3 + p4)
## [1] 0.04550026
area4 <- round((p3 + p4) * 100,2)
area4
## [1] 4.55
visualize.norm(stat=c(-2,2),mu=0,sd=1,section="tails")

4.21 (page -156) Game of dreidel. A dreidel is a four-sided spinning top with the Hebrew letters nun, gimel, hei, and shin, one on each side. Each side is equally likely to come up in a single spin of the dreidel. Suppose you spin a dreidel three times. Calculate the probability of getting

  1. at least one nun?
# at least one nun X >= 1
prob <- 1 - pbinom(q=0, size=3, prob=0.25) 
#(or)
prob_x <- sum(dbinom(1:3, size=3, prob=0.25))
prob_x
## [1] 0.578125
paste0("Calculate the probability of getting at least one nun is ",prob)
## [1] "Calculate the probability of getting at least one nun is 0.578125"
  1. exactly 2 nuns?
#x=2
prob <- dbinom(x=2, size=3, prob=0.25)
#prob <- round(prob * 100,2)
paste0("Calculate the probability of getting exactly 2 nuns is ",prob)
## [1] "Calculate the probability of getting exactly 2 nuns is 0.140625"
  1. exactly 1 hei?
#x = 1
prob <- dbinom(x=1, size=3, prob=0.25)
paste0("Calculate the probability of getting exactly 1 hei is ",prob)
## [1] "Calculate the probability of getting exactly 1 hei is 0.421875"
  1. at most 2 gimels?
# x =< 2
prob <- pbinom(q=2, size=3, prob=0.25)
#(or)
prob_x <- sum(dbinom(0:2, size=3, prob=0.25))
prob_x
## [1] 0.984375
paste0("Calculate the probability of getting at most 2 gimels is ",prob)
## [1] "Calculate the probability of getting at most 2 gimels is 0.984375"