#3.6
#a) The cutoff time for the fastest 5% of athletes in the men's group, i.e. those who took the shortest 5% of time to finish.
#Men's: mean = 4313, sd = 583
qnorm(.05, 4313,583)
## [1] 3354.05
#(b) The cutoff time for the slowest 10% of athletes in the women's group.
#Women's: mean = 5261, sd = 807
qnorm(.90, 5261, 807)
## [1] 6295.212
#3.12 Speeding on the I-5, Part I. The distribution of passenger vehicle speeds traveling on the Interstate 5 Freeway (I-5) in California is nearly normal with a mean of 72.6 miles/hour and a standard deviation of 4.78 miles/hour.
#(a) What percent of passenger vehicles travel slower than 80 miles/hour?
pnorm(80, 72.6, 4.78)
## [1] 0.939203
#(b) What percent of passenger vehicles travel between 60 and 80 miles/hour?
pnorm(80, 72.6, 4.78) - pnorm(60, 72.6, 4.78)
## [1] 0.9350083
#(c) How fast do the fastest 5% of passenger vehicles travel?
qnorm(.95, 72.6, 4.78)
## [1] 80.4624
#(d) The speed limit on this stretch of the I-5 is 70 miles/hour. Approximate what percentage ofthe passenger vehicles travel above the speed limit on this stretch of the I-5.
1-pnorm(70, 72.6,4.78)
## [1] 0.7067562
#3.18 Heights of female college students. Below are heights of 25 female college students.
heights <- c(54,55,56,56,57,58,58,59,60,60,60,61,61,62,62,63,63,63,64,65,65,67,67,69,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.
avg <- 61.52
sd <- as.numeric(4.58)
#68
sigma1 <- heights <= (avg+sd) & heights >= (avg-sd)
length(sigma1[sigma1 == TRUE])/length(heights)*100
## [1] 68
#95
sigma2 <- heights <= (avg+sd*2) & heights >= (avg-sd*2)
length(sigma2[sigma2 == TRUE])/length(heights)*100
## [1] 96
#99
sigma3 <- heights <= (avg+sd*3) & heights >= (avg-sd*3)
length(sigma3[sigma3 == TRUE])/length(heights)*100
## [1] 100
#(b) Do these data appear to follow a normal distribution? Explain your reasoning using the graphs provided below.
#Yes the data appears to follow a normal distribution. The data closely matches the 68, 95, 99 rule. Furthermore the data set is almost perfect symmetric, and the histogram follows a bell curve.
#3.24 Speeding on the I-5, Part II. Exercise 3.12 states that the distribution of speeds of cars traveling on the Interstate 5 Freeway (I-5) in California is nearly normal with a mean of 72.6 miles/hour and a standard deviation of 4.78 miles/hour. The speed limit on this stretch of the I-5 is 70 miles/hour.
#(a) A highway patrol officer is hidden on the side of the freeway. What is the probability that 5 cars pass and none are speeding? Assume that the speeds of the cars are independent of each other.
ns <- (72.6 - 70)/4.78
pns <- pnorm(ns) #probability one car passes that isn't speeding
pns^5 #Probability this event occurs 5 times
## [1] 0.1763389
#(b) On average, how many cars would the highway patrol officer expect to watch until the first car that is speeding? What is the standard deviation of the number of cars he would expect to watch?
#The number of cars he would expect to passs
nc <- 1/pns
nc
## [1] 1.414915
Variance <- nc*pns*(1-pns)
#Standard Deviation
sqrt(Variance)
## [1] 0.5415199
#3.30 Survey response rate. Pew Research reported in 2012 that the typical response rate to their surveys is only 9%. If for a particular survey 15,000 households are contacted, what is the probability that at least 1,500 will agree to respond?
1-pbinom(1499,15000,.09)
## [1] 1.326331e-05
#3.36 Multiple choice quiz. In a multiple choice quiz there are 5 questions and 4 choices for each question (a, b, c, d). Robin has not studied for the quiz at all, and decides to randomly guess the answers. What is the probability that
#(a) the first question she gets right is the 3rd question?
pqr <- 0.25 ##Probability that the answer is right
pqw <- (1-pqr) ##Probability that the answer is wrong
(pqw^2)*pqr
## [1] 0.140625
#(b) she gets exactly 3 or exactly 4 questions right?
dbinom(4,5,0.25)+dbinom(3,5,0.25)
## [1] 0.1025391
#(c) she gets the majority of the questions right?
1-pbinom(2,5,0.25)
## [1] 0.1035156
#3.42 Serving in volleyball. 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?
prbS <- 0.15 #Prob of Success
k <- 3
n <- 10
factorial(n-1)/(factorial(k-1)*(factorial(n - k)))*prbS^k*(1-prbS)^(n-k)
## [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?
#15% because the events are independent.
#(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?
#This is because the eventas are independent. The previous events do not affect the success of an additional flip. Therefore the 10th flip would have a 15 percent success rate.