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.
library(DATA606)
8.85%
normalPlot(mean = 0, sd = 1, bounds = c(-4, -1.35), tails = FALSE)
6.94%
normalPlot(mean = 0, sd = 1, bounds = c(1.48, 4), tails = FALSE)
58.9%
normalPlot(mean = 0, sd = 1, bounds = c(-0.4, 1.5), tails = FALSE)
2.27%
normalPlot(mean = 0, sd = 1, bounds = c(2, 4), tails = FALSE)
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.
\[\begin{equation} N(\mu = 4313, \sigma = 583) \end{equation}\] \[\begin{equation} N(\mu = 5261, \sigma = 807) \end{equation}\]
\[\begin{equation} Z = \frac{X - \mu}{\sigma} \end{equation}\]
Leo <- (4948 - 4313) / 583; Leo
## [1] 1.089194
Mary <- (5513 - 5261) / 807; Mary
## [1] 0.3122677
These scores tell you where in the distribution of finishing times each participant sits.
Mary did better because her time was fewer standard deviations above the mean.
1 - pnorm(4948, mean = 4313, sd = 583, lower.tail = TRUE)
## [1] 0.1380342
He finished faster than 13.8% of participants in his group.
1 - pnorm(5513, mean = 5261, sd = 807, lower.tail = TRUE)
## [1] 0.3774186
Mary finished faster than 37.7% of her group.
Yes, of course. The area under the curve would be irregular in this case, meaning that the probability densities at each x value would have different values.
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)
m.height <- 61.52
s.height <- 4.58
within1 <- heights[heights >= m.height - s.height & heights <= m.height + s.height]
within2 <- heights[heights >= m.height - 2*s.height & heights <= m.height + 2*s.height]
within3 <- heights[heights >= m.height - 3*s.height & heights <= m.height + 3*s.height]
length(within1) / length(heights)
## [1] 0.68
length(within2) / length(heights)
## [1] 0.96
length(within3) / length(heights)
## [1] 1
Close enough for jazz!
qqnormsim(heights)
Judging by all representations of the data, these data do appear to follow a normal distribution. The histogram appears monomodal and symmetrical, with a mean roughly at the center. The QQ plots also show a collusion among sample data and theoretical quantities.
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.
p <- 0.02
(1 - p)^9 * p
## [1] 0.01667496
1.67% chance that the 10th is the first with a defect.
(1 - p)^100
## [1] 0.1326196
13.26%
\[\begin{equation} \sigma\textsuperscript{2} = \frac{1-p}{p\textsuperscript{2}} \end{equation}\]
1 / p
## [1] 50
sqrt((1-p)/(p^2))
## [1] 49.49747
p <- 0.05
1 / p
## [1] 20
sqrt((1-p)/(p^2))
## [1] 19.49359
The mean will decrease, as will the standard deviation.
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 <- 0.51
(p) * (p) * (1 - p) * 3
## [1] 0.382347
bbg bgb gbb
bbb ggg bgg gbg ggb
(p*p*(1-p)) + (p*(1-p)*p) + ((1-p)*p*p)
## [1] 0.382347
There are 256 combinations of rugrats in this scenario… The additive approach would be extremely tedious as it would have 256 terms!
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.
n <- 10
k <- 3
p <- 0.15
combos <- factorial(n-1) / (factorial(k-1) * factorial((n-1)-(k-1)))
threeInTen <- combos * p^k * (1-p)^(n-k)
threeInTen
## [1] 0.03895012
The trials are independent. p = 0.15
Because the trials are independent, the past cannot factor into the probability of one single trial being a success. However, if we are considering all the possibilities for the k success on the n trial, we can easily compute a negative binomial distribution.