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.
#A
pnorm(-1.35)
## [1] 0.08850799
#B
1- pnorm(1.48)
## [1] 0.06943662
#C
pnorm(1.5) - pnorm(-0.4)
## [1] 0.5886145
#D
1-pnorm(2) + pnorm(-2)
## [1] 0.04550026
8.85%
6.94%
58.86%
4.55%
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, Ages 30 - 34: N(mean = 4313 seconds, sd = 583 seconds) Women, Ages 25 - 29: N(mean = 5261 seconds, sd = 807 seconds)
#Leo
(4948 - 4313)/583
## [1] 1.089194
#Mary
(5513 - 5261)/807
## [1] 0.3122677
Leo has a z score of 1.089 and Mary has a z score of 0.312. This indicates that both were slower than the average of their groups, and they are a multiple of their z scores away from their means.
Mary did better respectively, as her z score is lower than Leo’s.
1 - pnorm(1.089194)
## [1] 0.1380342
Leo finished faster than 13.80% in his group.
1 - pnorm(0.3122677)
## [1] 0.3774185
Mary finished faster than 37.74% in her group.
The answers to parts b-e are dependant on the assumption that the distributions are normal. If they are not normal, things like the z-scores used above will no longer be relevant.
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
sd <- 4.58
sds <- sd * c(1:3)
#This finds the proportion of heights within 1, 2, and 3 stdevs, respectively
pnorm(mean + sds, mean = mean, sd = sd) - pnorm(mean - sds, mean = mean, sd = sd)
## [1] 0.6826895 0.9544997 0.9973002
It does approximately follow the 68-95-99.7% rule
The data does approximately follow a normal distribution. The histogram appears to have an approximate bell curve, and the dots mostly fall on the line in the qq-plot
# 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.
#Setup
p = 0.02
(1-p)^9 * p
## [1] 0.01667496
(1-p)^100
## [1] 0.1326196
mean = 1/p
sd = ((1-p)/p^2)^0.5
mean
## [1] 50
sd
## [1] 49.49747
mean = 50 sd = 49.5
p2 <- 0.05
mean = 1/p2
sd = ((1-p2)/p2^2)^0.5
mean
## [1] 20
sd
## [1] 19.49359
mean = 20 sd = 19.5
The time until success is proportional to the increase of the likelyhood. In the problems above, the likelyhood of a defect increased 2.5X, and the mean and sd before a defect shrank 2.5X in accordance
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.
boyp = 0.51
boys = 2
girlp = 0.49
girls = 1
n = 3
prob = (factorial(n)/(factorial(n - boys)*factorial(boys)))*(boyp^boys)*(girlp^girls)
prob
## [1] 0.382347
boyp * boyp * girlp +
boyp * girlp * boyp +
girlp * boyp * boyp
## [1] 0.382347
The approach in part b would be more tedious becuase it would involve writing out every combination of 3 boys among 8 kids, which is significantly more combinations than possible in part b.
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.
successp = 0.15
successes = 2
failp = 1-successp
fails = 7
n = 9
prob = (factorial(n)/(factorial(fails)*factorial(successes)))*(successp^successes)*(failp^fails) * 0.15
prob
## [1] 0.03895012
Finds probability of 2 successes within the first 9 tries, and multiplies by the chance of another success (on the 10th try)
0.15, assuming the events are independent. The first 9 attempts have no bearing on the 10th.
The questions are different. Part a asks for the probability of 2 successes in 9 and then another success; part b asks for the probability of one success, which just happens to be on the 10th try.