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.
cat('z < -1.35 is', pnorm(-1.35))
## z < -1.35 is 0.08850799
DATA606::normalPlot(mean = 0, sd = 1, bounds = c(-1.35,4), tails = TRUE)
cat('z > 1.48 is', pnorm(1.48))
## z > 1.48 is 0.9305634
DATA606::normalPlot(mean = 0, sd = 1, bounds = c(1.48,4), tails = FALSE)
cat('-0.4 < z < 1.5 is', (pnorm(-0.4) - pnorm(1.5)))
## -0.4 < z < 1.5 is -0.5886145
DATA606::normalPlot(mean = 0, sd = 1, bounds = c(-0.4,1.5), tails = FALSE)
abs <- pnorm(2) - pnorm(-2)
cat('|z| > 2 is', 1 - abs)
## |z| > 2 is 0.04550026
DATA606::normalPlot(mean = 0, sd = 1, bounds = c(-2,2), tails = TRUE)
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.
Write down the short-hand for these two normal distributions. Leo: N(4313, 583) x1 = 4948 seconds Mary: N(5261, 807) x2 = 5513 seconds
What are the Z-scores for Leo’s and Mary’s finishing times? What do these Z-scores tell you? The z_score describes where that value falls relative to the standardized normal distribution (mean of 0 and std dev of 1), which is what the z_score is based on.
cat('Leo z_score:', round(pnorm((4948 - 4313)/583),2), '\n')
## Leo z_score: 0.86
cat('Mary z_score:', pnorm((5513 - 5261)/583))
## Mary z_score: 0.667219
Did Leo or Mary rank better in their respective groups? Explain your reasoning. Leo ranked better because he is in the top 14% of his age group, while Mary is in the top 33% of her age group.
What percent of the triathletes did Leo finish faster than in his group? Leo finished faster than 86% of the triathletes in his age group.
What percent of the triathletes did Mary finish faster than in her group? Mary finished faster than 67% of the triathletes in her age group.
If the distributions of finishing times are not nearly normal, would your answers to parts (b) - (e) change? Explain your reasoning. There would most likely be some fluctuation, but it wouldn’t be statistically significant. I say this because given sample sizes this large some deviation from a normal distribution does not negate the value of the results obtained by making the assumption that it normal. This should be stated as an assumption though.
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 <- 61.52
std <- 4.58
cat('Based off the calculation below the heights follow the 68-95-99.7 rule\n')
## Based off the calculation below the heights follow the 68-95-99.7 rule
cat('Expected results if normal distribution\n')
## Expected results if normal distribution
cat(25 * 0.68, 'students should fall between', mean - std, 'and', mean + std, '\n')
## 17 students should fall between 56.94 and 66.1
cat(round(25 * 0.95), 'students should fall between', mean - (std * 2), 'and', mean + (std * 2), '\n')
## 24 students should fall between 52.36 and 70.68
cat(round(25 * 0.997), 'students should fall between', mean - (std * 3), 'and', mean + (std * 3), '\n\n')
## 25 students should fall between 47.78 and 75.26
cat('Actual results\n')
## Actual results
17
## [1] 17
24
## [1] 24
25
## [1] 25
# Use the DATA606::qqnormsim function
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)
DATA606::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.
#9 transistors are good, 10th transistor is defect
(0.98**9) * 0.02
## [1] 0.01667496
0.98**100
## [1] 0.1326196
mean <- 1/0.02
stddev <- sqrt((1 - 0.02)/(0.02**2))
cat('average:', mean, 'and std dev:', stddev)
## average: 50 and std dev: 49.49747
mean <- 1/0.05
stddev <- sqrt((1 - 0.05)/(0.05**2))
cat('average:', mean, 'and std dev:', stddev)
## average: 20 and std dev: 19.49359
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.
# P(x) = N!/x!(N-x!) * p**x * (1-p)**(N-x)
N = 3
x = 2
p = 0.51
first_part <- factorial(3)/(factorial(x) * factorial(N-x))
second_part <- p**x
third_part <- (1-p)**(N-x)
parta <- first_part * second_part * third_part
cat('Probability of two boys is', parta)
## Probability of two boys is 0.382347
# gbb bgb bbg
partb <- (0.49 * 0.51**2) + (0.51 * 0.49 * 0.51) + (0.51**2 * 0.49)
cat('parta is', parta, 'and partb is', partb, 'They match.')
## parta is 0.382347 and partb is 0.382347 They match.
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.
#P(3rd success will be on the 10th try)
N = 10
x = 3
p = 0.15
first_part <- factorial(9)/(factorial(2) * factorial(7))
second_part <- p**x
third_part <- (1-p)**(N-x)
first_part
## [1] 36
second_part
## [1] 0.003375
third_part
## [1] 0.3205771
cat('There is a', first_part * second_part * third_part, 'probability')
## There is a 0.03895012 probability
Suppose she has made two successful serves in nine attempts. What is the probability that her 10th serve will be successful? There is a 15% probability because the problem stated that she has a 15% chance of making any given single serve.
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? Part a did not have any successful serves, while part b had two successful serves already completed. Each serve is an independent event and the problem states that for any given serve she has a 15% chance of success.