What percent of a standard normal distribution \(N(\mu=0, \sigma=1)\) is found in each region? Be sure to draw a graph.
(a)\(Z\gt-1.13\) (b) \(Z\lt0.18\) (c) \(Z\gt8\) (d) \(|Z|<0.5\)
x = seq(-4,4,0.01)
y <- dnorm(x, 0, 1)
stdNorm <- data.frame(x,y)
# Plot
stdNorm %>% ggplot(aes(x,y)) + geom_line() +
geom_segment(aes(-1.13,0,xend=-1.13,yend=dnorm(-1.13,0,1)),
linetype=2,col="darkgreen") +
geom_ribbon(data=subset(stdNorm,x > -1.13),aes(x=x,ymax=y),
ymin=0,fill="darkgreen", alpha=0.3)
# Answer
a <- round(100 * pnorm(-1.13,0,1,lower.tail=FALSE),2)
# Plot
stdNorm %>% ggplot(aes(x,y)) + geom_line() +
geom_segment(aes(-0.18,0,xend=-0.18,yend=dnorm(-0.18,0,1)),
linetype=2,col="darkgreen") +
geom_ribbon(data=subset(stdNorm,x < -0.18),aes(x=x,ymax=y),
ymin=0,fill="darkgreen", alpha=0.3)
# Answer
b <- round(100 * pnorm(-0.18,0,1,lower.tail=TRUE),2)
# Plot
stdNorm %>% ggplot(aes(x,y)) + geom_line()
# Answer
c <- 100 * pnorm(8,0,1,lower.tail=FALSE)
# Plot
stdNorm %>% ggplot(aes(x,y)) + geom_line() +
geom_segment(aes(-0.5,0,xend=-0.5,yend=dnorm(-0.5,0,1)),
linetype=2,col="darkgreen") +
geom_segment(aes(0.5,0,xend=0.5,yend=dnorm(0.5,0,1)),
linetype=2,col="darkgreen") +
geom_ribbon(data=subset(stdNorm,x > -0.5 & x < 0.5),aes(x=x,ymax=y),
ymin=0,fill="darkgreen", alpha=0.3)
# Answer
d <- round(100 * pnorm(-0.5,0,1,lower.tail=TRUE) - pnorm(-0.5,0,1,lower.tail=TRUE),2)
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.
Remember: a better performance corresponds to a faster finish.
The distribution for the Men, Ages 30-34 group is \(N(4313,583)\). The distribution for the Women, Ages 25-29 group is \(N(5261,807)\).
# Manual method
zLeo <- (4948 - 4313)/583
# Function
zMary <- scale(5513,5261,807)
Leo’s Z-score is 1.09 and Mary’s is 0.31.
While both athletes were above (slower than) the mean Mary did better, as she was closer to the mean than Leo was. This is because her Z-score was lower (less number of standard deviations).
This part is asking for the percentile of Leo’s finish time. Since a higher number is a slower time, we need to reverse the typical calculation. In this case he finished in the 14 percentile.
Mary finished in the 38 percentile.
Yes. We couldn’t do a Z-score comparison if the finish times were not nearly normal. We’d have to calculate, most likely, from all participant times.
Below are heights of 25 female college students.
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)
# The range of 1 standard deviation is:
lower <- 61.52 - 4.58
upper <- 61.52 + 4.58
# We should then see about 68% of the 25 entries (~17) within 1 standard deviation
length(heights[which(heights < upper & heights > lower)])
## [1] 17
# Which we see
# The range of 2 standard deviations is:
lower <- 61.52 - (2 * 4.58)
upper <- 61.52 + (2 * 4.58)
# We should then see about 95% of the 25 entries (~24) within 2 standard deviations
length(heights[which(heights < upper & heights > lower)])
## [1] 24
# Which we also see
# The range of 3 standard deviations is:
lower <- 61.52 - (3 * 4.58)
upper <- 61.52 + (3 * 4.58)
# We should then see about 99.7% of the 25 entries (~24-25) within 3 standard deviations
length(heights[which(heights < upper & heights > lower)])
## [1] 25
# Which we more or less see
Do these data appear to follow a normal distribution? Explain your reasoning using the graphs provided.
The data does appear to be nearly normal. The Q-Q plot shows that the data is close to the theoretical straight line (with perhaps a small skew). The histogram with the normal curve overlaid also shows that these data may be nearly normal.
We can also sample normal data with the same mean and standard deviation to compare:
qqnormsim(heights)
This shows us that the heights have some similarity to the simulations of the normal distribution.
This is an application of the geometric distribution. That defines the probability of the first success (here, a faulty transistor) on the 10th trial as: \[(1-p)^9p\]
# Manual calculation
(0.98^9)*0.02
## [1] 0.01667496
# R function
dgeom(9,0.02)
## [1] 0.01667496
This is quite simply \((1-p)^n\) or 0.1326196.
This is the same as the mean of the geometric distribution, or \(\frac{1}{p}\), which is 50. That makes intuitive sense too, as 0.02 is 1 in 50.
Here we’d expect the first defect to show up around the 20th transitor. The standard deviation would be \(\sqrt{\frac{1-p}{p^2}}\), or 19.49.
As probability increases, the mean decreases, as does the standard deviation.
The probability of having 2 boys and 1 girl is 0.382.
There are 3 potential ways to have 2 boys and 1 girl out of 3 children: (B,B,G), (B,G,B), and (G,B,B). Each of these scenarios has \((0.51)^2*0.49 = 0.1274\). We then add those scenario probabilities: \(0.1274 + 0.1274 + 0.1274 = 0.3822\). This matches what we got above.
The method used in (b) above would be considerably more tedious because we’d have to count all the possible combinations of 3 boys amongst 8 kids. Then, we’d have to add all those probabilities.
This is an application of the negative binomial distribution. We want the 3rd success on the 10th trial, which is \({9 \choose 2}(0.15^3)(0.85^7)\) or 0.039
The same as her first, 0.15. Because each serve is an independent event the probability is the same each time, regardless of what may have happened on previous serves.
Each event is independent, so in (a) we’re adding probabilities of various disjoint independent events. In (b) it is simply the one independent event, the 10th serve.