Area under the curve, Part I. (4.1, p. 142) What percent of a standard normal distribution \(N(\mu=0, \sigma=1)\) is found in each region? Be sure to draw a graph.
pnorm(-1.35) *100
## [1] 8.850799
shadeDist(-1.35)
Z<- (1- pnorm((1.48)))*100
Z
## [1] 6.943662
shadeDist(1.48,lower.tail=FALSE)
Z<-diff(pnorm(c(-0.4,1.5)))*100
Z
## [1] 58.86145
shadeDist(c(-0.4,1.5),lower.tail=FALSE)
Z <- (1-diff(pnorm(c(-2,2))))*100
Z
## [1] 4.550026
shadeDist(c(-2,2))
Triathlon times, Part I (4.4, p. 142) In triathlons, it is common for racers to be placed into age and gender groups. Friends Leo and Mary both completed the Hermosa Beach Triathlon, where Leo competed in the Men, Ages 30 - 34 group while Mary competed in the Women, Ages 25 - 29 group. Leo completed the race in 1:22:28 (4948 seconds), while Mary completed the race in 1:31:53 (5513 seconds). Obviously Leo finished faster, but they are curious about how they did within their respective groups. Can you help them? Here is some information on the performance of their groups:
Remember: a better performance corresponds to a faster finish.
Leo Z-score:
lz <- (4948-4313)/583
lz
## [1] 1.089194
Mary Z-score
mz <- (5513-5261)/807
mz
## [1] 0.3122677
lpcnt <- round(pnorm(4948,mean=4313,sd=583) * 100,2)
paste0("Leo finished faster than ",lpcnt,"% in his group")
## [1] "Leo finished faster than 86.2% in his group"
mpcnt <- round(pnorm(5513,mean=5261,sd=807) * 100,2)
paste0("Mary finished faster than ",mpcnt,"% in his group")
## [1] "Mary finished faster than 62.26% in his group"
++ Yes. The answers will change because the concept of z-score is based on the assumption of a normally distributed values
Heights of female college students Below are heights of 25 female college students.
\[ \stackrel{1}{54}, \stackrel{2}{55}, \stackrel{3}{56}, \stackrel{4}{56}, \stackrel{5}{57}, \stackrel{6}{58}, \stackrel{7}{58}, \stackrel{8}{59}, \stackrel{9}{60}, \stackrel{10}{60}, \stackrel{11}{60}, \stackrel{12}{61}, \stackrel{13}{61}, \stackrel{14}{62}, \stackrel{15}{62}, \stackrel{16}{63}, \stackrel{17}{63}, \stackrel{18}{63}, \stackrel{19}{64}, \stackrel{20}{65}, \stackrel{21}{65}, \stackrel{22}{67}, \stackrel{23}{67}, \stackrel{24}{69}, \stackrel{25}{73} \]
mean_height <- 61.52
height_std <- 4.58
first_std_values <- heights[heights >= (mean_height - height_std) & (heights <= mean_height + height_std)]
first_std <- (length(first_std_values)/length(heights))*100
paste0('Approximately ',first_std,'%')
## [1] "Approximately 68%"
secd_std_values <- heights[heights >= (mean_height - (2*height_std)) & (heights <= mean_height + (2*height_std))]
secd_std <- (length(secd_std_values)/length(heights))*100
paste0('Approximately ',secd_std,'%')
## [1] "Approximately 96%"
third_std_values <- heights[heights >= (mean_height - (3*height_std)) & (heights <= mean_height + (3*height_std))]
third_std <- (length(third_std_values)/length(heights))*100
paste0('Approximately ',third_std,'%')
## [1] "Approximately 100%"
++ Yes. This is because with the proof of the 68-95-99.7% Rule in 3(a) above, one can dertainly say that the data appear to follow a normal distribution.
qqnormsim(heights)
Defective rate. (4.14, p. 148) A machine that produces a special type of transistor (a component of computers) has a 2% defective rate. The production is considered a random process where each transistor is independent of the others.
n <- 10
#Pr(success)
succ <- 0.02
#Pr(Failure)
fal <- 1-succ
#Pr(That 1st defect/success occurs at 10th transistor)
(fal**(n-1))*succ
## [1] 0.01667496
#Pr(That no defect/success occurs after the 100th batch)
n <- 100
fal**(n)
## [1] 0.1326196
#Expected number of trials before the first defect
1/succ
## [1] 50
#Variance
varianc <- fal/succ**2
#Standard Deviation
(varianc)**0.5
## [1] 49.49747
#Pr(success/defect)
succ <- 0.05
#Pr(Failure)
fal <- 1-succ
#Expected number of trials before the first defect
1/succ
## [1] 20
#Variance
varianc <- fal/succ**2
#Standard Deviation
(varianc)**0.5
## [1] 19.49359
++ It is expected for the mean and standard deviation of the wait time until success to decrease as the probability of success increases. That is, the higher the chance of having a defect, the sooner a defect occurs.
Male children. While it is often assumed that the probabilities of having a boy or a girl are the same, the actual probability of having a boy is slightly higher at 0.51. Suppose a couple plans to have 3 kids.
#Pr(having a boy)
p_b <-0.51
#Pr(not having a boy)
p_g <- 1-0.51
#Pr(Two of them will be a boy)
p_bs <- choose(3,2)*p_b**2 * p_g
p_bs
## [1] 0.382347
#Having Boy -> Boy -> Girl
p_b_b_g <- 0.51*0.51*(1-0.51)
#Having Boy -> Girl -> Boy
p_b_g_b <- 0.51*(1-0.51)*0.51
#Having Girl -> Boy -> Boy
p_g_b_b <- (1-0.51)*0.51*0.51
#Pr(Two of them will be a boy)
p_b_b_g + p_b_g_b + p_g_b_b
## [1] 0.382347
Serving in volleyball. (4.30, p. 162) A not-so-skilled volleyball player has a 15% chance of making the serve, which involves hitting the ball so it passes over the net on a trajectory such that it will land in the opposing team’s court. Suppose that her serves are independent of each other.
#Pr(Making a serve/success)
succ <- 0.15
#Pr(Not making a serve/success)
fal <- 1 - succ
#nth Success
r<-3
#nth trial
x<-10
#Pr(3rd success/serve occur on the 10th trial)
choose((x-1),(r-1))*(succ**r)*((fal)**(x-r))
## [1] 0.03895012