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.
# .0885
normalPlot(0, 1, bound=c(-Inf, -1.35))
(b) \(Z > 1.48\)
# .0694
normalPlot(0, 1, bound=c(1.48, Inf))
(c) \(-0.4 < Z < 1.5\)
# .589
normalPlot(0, 1, bound=c(-0.4, 1.5))
(d) \(|Z| > 2\)
# 0.046
#normalPlot(0, 1, bound=c(-2, 2), tails = FALSE)
normalPlot(0, 1, bound=c(-2, 2), tails = TRUE)
print(1 - .954)
## [1] 0.046
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.
# Men: N(4313, 583)
# Women: N(5261, 807)
# higher number/time => slower/worse. Flip sign for interpretability
LeoZ = (4313 - 4948)/583
MaryZ = (5261 - 5513)/807
print(LeoZ)
## [1] -1.089194
print(MaryZ)
## [1] -0.3122677
# The Z score tells me that leo is more negative standard deviations (-1.089) away from the mean
# This means that compared to other men, he did worse than Mary did compared to other women
# (-.312).
# The Z-score is the normalized version of their raw scores (raw finish times in seconds)
# Leo ranked worse compared to Mary since he is -1.089 standard deviations away
# from the mean. Mary is only -.312 standard deviations away from the mean.
# They both did worse than average in their gender groups.
normalPlot(4313, 583, bounds = c(4948, Inf))
# He was faster than 13.8% of others in his group. Remember that plot should be
# flipped about x-axis for interpretability as higher times are worse/slower
normalPlot(5261, 807, bounds = c(5513, Inf))
# She was faster than 37.7% of others in her group. Remember that plot should be
# flipped about x-axis for interpretability as higher times are worse/slower
# If the finishing times are not nearly normal, the answers would most likely change for parts b-e
# The normal probability distribution has specific equations/formulas to calculate these percents
# with Z-scores, and if these distributions are not nearly normal, I do not expect the calculated
# numbers to hold. Normality could be checked for with histograms and QQ plots.
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} \]
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)
mean(heights)
## [1] 61.52
sd(heights)
## [1] 4.583667
rbound_68 = 1*4.58 + 61.52
rbound_68
## [1] 66.1
lbound_68 = 61.52 - 1*4.58
lbound_68
## [1] 56.94
print('1 standard deviation:')
## [1] "1 standard deviation:"
sum(heights > lbound_68 & heights < rbound_68)/length(heights) # 68%
## [1] 0.68
rbound_95 = 2*4.58 + 61.52
rbound_95
## [1] 70.68
lbound_95 = 61.52 - 2*4.58
lbound_95
## [1] 52.36
print('2 standard deviation:')
## [1] "2 standard deviation:"
sum(heights > lbound_95 & heights < rbound_95)/length(heights) # 96%
## [1] 0.96
rbound_99 = 3*4.58 + 61.52
rbound_99
## [1] 75.26
lbound_99 = 61.52 - 3*4.58
lbound_99
## [1] 47.78
print('3 standard deviation:')
## [1] "3 standard deviation:"
sum(heights > lbound_99 & heights < rbound_99)/length(heights) # 100%
## [1] 1
# heights approximately follows since it is 68-96-100 at 1/2/3 standard deviations
# Use the DATA606::qqnormsim function
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.
.98**9 * .02
## [1] 0.01667496
.98**100
## [1] 0.1326196
# geometric
# on average expect 1/.02 = 50 transistors
1/.02
## [1] 50
# standard devation = sqrt((1-p)/(p**2)) = 49.49747
sqrt((1-.02)/(.02**2))
## [1] 49.49747
# geometric
# on average expect 1/.05 = 20 transistors
1/.05
## [1] 20
# standard devation = sqrt((1-p)/(p**2)) = 19.49
sqrt((1-.05)/(.05**2))
## [1] 19.49359
# increasing the probability of the event decreases the mean and standard deviation of wait time
# until success
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.
nchoosek(3,2)*(.51**2)*(.49**1)
## [1] 0.382347
# bbg = (.51**2)*(.49**1) = 0.127449
# bgb = (.51**2)*(.49**1) = 0.127449
# gbb = (.51**2)*(.49**1) = 0.127449
(.51**2*.49) * 3
## [1] 0.382347
# it matches with a)
# The approach from part b is more tedious because we need to write a probability out for each
# way to have 3 boys in 8 kids. Part a) simplifies this with the nCk portion.
nchoosek(8,3)*(.51**3)*(.49**5)
## [1] 0.2098355
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.
# 10th shot is 3rd success:
nchoosek(9,2)*(.15**3)*(.85**7)
## [1] 0.03895012
# we are told her serves are independent, so 15%
# we are told her serves are independent. The previous successes/failures have no impact
# on the probaility of her next success if they are independent. Thust the probability
# of her next success is still 15%