3.2 What percent of a standard normal distribution N(µ =0, σ = 1) is found in each region? Be sure to draw a graph.? z>−1.35
1 - pnorm(-1.13)
## [1] 0.8707619
normalPlot(bounds = c(-1.13, 4))
z<0.18
pnorm(0.18)
## [1] 0.5714237
normalPlot(bounds = c(-4, 0.18))
z>8
1 - pnorm(8)
## [1] 6.661338e-16
normalPlot(bounds = c(8, Inf))
|z|<0.5
1 - pnorm(0.5)
## [1] 0.3085375
pnorm(0.5)
## [1] 0.6914625
normalPlot(bounds = c(-0.5, 0.5))
3.3 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:
- The finishing times of the Men, Ages 30 - 34 group has a mean of 4313 seconds with a standard deviation of 583 seconds.
- The finishing times of the Women, Ages 25 - 29 group has a mean of 5261 seconds with a standard deviation of 807 seconds.
- The distributions of finishing times for both groups are approximately Normal.
(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?
(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?
(e) What percent of the triathletes did Mary finish faster than in her group?
(f) If the distributions of finishing times are not nearly normal, would your answers to parts (b) - (e) change? Explain your reasoning.
#a
Distribution of Men: N(μ=4313,σ=583)
Distribution of Women: N(μ=5261,σ=807)
#b The Z-scores for Leo's finishing times is 1.09
leo_obs <- 4948
men_mean <- 4313
men_sd <- 583
(leo_obs - men_mean) / men_sd
## [1] 1.089194
# The Z-scores for Mary's finishing times is 0.31
mary_obs <- 5513
women_mean <- 5261
women_sd <- 807
(mary_obs - women_mean) / women_sd
## [1] 0.3122677
# The z-scores say that Leo and Mary are 1.09 and 0.31 standard deviation away from the mean, respectively.
#c
Mary rank better in their respective groups because she is closer to the mean.
#d Leo finished faster than 13.80% of the triathletes in his group.
1 - pnorm(leo_obs, men_mean, men_sd)
## [1] 0.1380342
#e Mary finished faster than 37.74% of the triathletes in her group.
1 - pnorm(mary_obs, women_mean, women_sd)
## [1] 0.3774186
#f If the distributions of finishing times are not nearly normal, answers to parts b and c would not change because
# z-scores is defined for any shape, but only when the distribution is normal, z-scores can be calcuated for percentiles.
# Hence, part d and e's answers would change.
3.18 Below are heights of 25 female college students.
(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.
(b) Do these data appear to follow a normal distribution? Explain your reasoning using the graphs provided below.
female_student_height <- 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 heights follow the 68-95-99.7% Rule
fsh_mean <- mean(female_student_height)
fsh_sd <- sd(female_student_height)
# 68% or more heights in 1 standard deviation
pnorm(fsh_mean + fsh_sd, fsh_mean, fsh_sd)
## [1] 0.8413447
# 95% of more heights in 2 standard deviation
pnorm(fsh_mean + 2 * fsh_sd, fsh_mean, fsh_sd)
## [1] 0.9772499
# 99.7% of more heights in 3 standard deviation
pnorm(fsh_mean + 3 * fsh_sd, fsh_mean, fsh_sd)
## [1] 0.9986501
# These data appear to follow a normal distirubtion because most of the points are on the line.
# Also, the data's normal probability plot matches simulated plot (top-right)
qqnormsim(female_student_height)
3.22 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 10 th transistor produced is the first with a defect?
(b) What is the probability that the machine produces no defective transistors in a batch of 100?
(c) On average, how many transistors would you expect to be produced before the first with a defect? What is the standard deviation?
(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?
(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?
#a The probability that the 10th transistor produced is the first with a defect is 1.67
dgeom(9, 2/100)
## [1] 0.01667496
#b The probability that the machine produces no defective transistors in a batch of 100 is 13.26
dbinom(0, 100, 2/100)
## [1] 0.1326196
#c On average, 50 transistors would be expected to be produced before the first with a defect.
# The standard deviation is 49.50
1/0.02 # expected value for geometric distribution 1/p
## [1] 50
sqrt((1-0.02)/(0.02^2))
## [1] 49.49747
#d On average, 20 transistors would be expected to be produced with this machine before the first with a defect.
# The standard deviation is 19.49
1/(5/100)
## [1] 20
sqrt((1-(5/100))/((5/100)^2))
## [1] 19.49359
#e Based on the answers to previous two questions, increasing the probability of an event decreases
# the mean and standard deviation of the wait time until success.
3.38 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.
(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.
(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).
#a The probability that two of them will be boys is 38.23
dbinom(2, 3, 0.51)
## [1] 0.382347
#b All possible orderings of 3 children: GBB, BGB, BBG
((.49*.51*.51)+(.51*.49*.51)+(.51*.51*.49)) #the answers are a match
## [1] 0.382347
#c The approach from part (b) would be more tedious that the approach from part (a)
# because we would have to calculate number of scenarios multiplied by probability of a single scenerio
# which could lead to errors.
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 10 th try she will make her 3 rd successful serve?
(b) Suppose she has made two successful serves in nine attempts. What is the probability that her 10 th 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?
#a The probability that on the 10th try she will make her 3rd successfull serve is 38.9
dnbinom(7,3,0.15)
## [1] 0.03895012
#b The probability that her 10th serve will be succesfull is 15% because serves are independent of each other.
#c Even though parts (a) and (b) discuss the same scenario, the probabilities calculated should be different and
# the reason for this discrepancy is because part b is asking for the probability of one independent outcome.
# Whereas, part a is asking for a combination of independent outcome.