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.

  1. \(Z < -1.35\)
pnorm(-1.35) *100
## [1] 8.850799
shadeDist(-1.35)

  1. \(Z > 1.48\)
Z<- (1- pnorm((1.48)))*100
Z
## [1] 6.943662
shadeDist(1.48,lower.tail=FALSE)

  1. \(-0.4 < Z < 1.5\)
Z<-diff(pnorm(c(-0.4,1.5)))*100
Z
## [1] 58.86145
shadeDist(c(-0.4,1.5),lower.tail=FALSE)

  1. \(|Z| > 2\)
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.

(a) Write down the short-hand for these two normal distributions.

(b) What are the Z-scores for Leo’s and Mary’s finishing times? What do these Z-scores tell you?

Leo Z-score:

lz <- (4948-4313)/583
lz
## [1] 1.089194

Mary Z-score

mz <- (5513-5261)/807
mz
## [1] 0.3122677

(c) Did Leo or Mary rank better in their respective groups? Explain your reasoning.

(d) What percent of the triathletes did Leo finish faster than in his group?

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"

(e) What percent of the triathletes did Mary finish faster than in her 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"

(f) If the distributions of finishing times are not nearly normal, would your answers to parts (b) - (e) change? Explain your reasoning.

++ 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} \]

(a) The mean height is 61.52 inches with a standard deviation of 4.58 inches. Use this information to determine if the heights approximately follow the 68-95-99.7% Rule.

68% Rule

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%"

95% Rule

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%"

99.7% Rule

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%"

(b) Do these data appear to follow a normal distribution? Explain your reasoning using the graphs provided below.

++ 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.

(a) What is the probability that the 10th transistor produced is the first with a defect?

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

(b) What is the probability that the machine produces no defective transistors in a batch of 100?

#Pr(That no defect/success occurs after the 100th batch)
n <- 100
fal**(n)
## [1] 0.1326196

(c) On average, how many transistors would you expect to be produced before the first with a defect? What is the standard deviation?

#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

(d) Another machine that also produces transistors has a 5% defective rate where each transistor is produced independent of the others. On average how many transistors would you expect to be produced with this machine before the first with a defect? What is the standard deviation?

#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

(e) Based on your answers to parts (c) and (d), how does increasing the probability of an event affect the mean and standard deviation of the wait time until success?

++ 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.

(a) Use the binomial model to calculate the probability that two of them will be boys.

#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

(b) Write out all possible orderings of 3 children, 2 of whom are boys. Use these scenarios to calculate the same probability from part (a) but using the addition rule for disjoint outcomes. Confirm that your answers from parts (a) and (b) match.

#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

(c) If we wanted to calculate the probability that a couple who plans to have 8 kids will have 3 boys, briefly describe why the approach from part (b) would be more tedious than the approach from part (a).


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.

(a) What is the probability that on the 10th try she will make her 3rd successful serve?

#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

(b) Suppose she has made two successful serves in nine attempts. What is the probability that her 10th serve will be successful?

(c) Even though parts (a) and (b) discuss the same scenario, the probabilities you calculated should be different. Can you explain the reason for this discrepancy?