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.
percA <- (pnorm(q = -1.35, mean = 0, sd = 1))*100
ggplot(NULL, aes(c(-3,3))) +
geom_area(stat = "function", fun = dnorm, fill = "#00998a", xlim = c(-3, -1.35)) +
geom_area(stat = "function", fun = dnorm, fill = "grey80", xlim = c(-1.35, 3))
The probability of \(Z < -1.35\) is \(8.8507991\)%.
percB <- (1 - pnorm(q = 1.48, mean = 0, sd = 1))*100
ggplot(NULL, aes(c(-3,3))) +
geom_area(stat = "function", fun = dnorm, fill = "#00998a", xlim = c(1.48, 3)) +
geom_area(stat = "function", fun = dnorm, fill = "grey80", xlim = c(-3, 1.48))
The probability of \(Z > 1.48\) is \(6.9436623\)%.
percC <- (pnorm(q = 1.5, mean = 0, sd = 1) - pnorm(-0.4, 0, 1)) * 100
ggplot(NULL, aes(c(-3,3))) +
geom_area(stat = "function", fun = dnorm, fill = "#00998a", xlim = c(-.4, 1.5)) +
geom_area(stat = "function", fun = dnorm, fill = "grey80", xlim = c(-3,-.4))+
geom_area(stat = "function", fun = dnorm, fill = "grey80", xlim = c(1.5:3))
The probability of \(-0.4 < Z < 1.5\) is \(58.861454\)%.
percD <- (pnorm(-2, 0, 1)*2) * 100
ggplot(NULL, aes(c(-3,3))) +
geom_area(stat = "function", fun = dnorm, fill = "#00998a", xlim = c(-3,-2)) +
geom_area(stat = "function", fun = dnorm, fill = "#00998a", xlim = c(2,3))+
geom_area(stat = "function", fun = dnorm, fill = "grey80", xlim = c(-2,2))
The probability of \(|Z| > 2\) is \(4.5500264\)%.
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.
Leo - N(mean = 4313, sd =583) Mary - N(mean = 5261, sd =807)
Leo <- (4948-4313) / 583
Mary <- (5513-5261) / 807
The Z-score for Leo was \(1.0891938\), this tells us her deviation from the mean and that she ran longer than average. The Z- score for Mary was \(0.3122677\), this tells us her deviation from the mean and that she ran longer than average.
Mary ranked better than Leo in her respective group because both scores landed above the mean however Mary’s was closer towards the mean than was Leo.
Leo <- (1 - pnorm(Leo, 0, 1))*100
Leo ran faster than \(13.8034211\)% of people.
Mary <- (1 - pnorm(Mary, 0, 1))*100
Mary ran faster than \(37.7418559\)% of people.
Answers (b) and (c) would not change (b) is a factor of standard deviation and mean so unless they were to change our answer for (b) will be constant. For (c), the question is relating the two runners. It is possible that a alter how they did compared to one another. For instance if a runner runs a very very good time they will reduce the mean and increase the standard deviation, reducing the z-score. However it is unlikely even with a few major outliers that Leo did better than Mary in respect to their groups.
Answers (d) and (e) will change because these percentiles assume a normal distribution. If the distribution is not normal than the percent of runners who did better or worse than Mary and Leo will change.
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} \]
## [1] 0.68
(sum(heights < 61.52 + (2*4.58)) - sum(heights < 61.52 - (2*4.58))) / length(heights)
## [1] 0.96
(sum(heights < 61.52 + (3*4.58)) - sum(heights < 61.52 - (3*4.58))) / length(heights)
## [1] 1
The heights do follow the 68-95-99.7 rule indicating the normal distribution however all values fall within three standard deviations but it still appears to be distributed normally.
In the histogram we notice a unimodal peak at the same location of the normal distribution line’s peak. We also notice both tails decreasing in counts relative to the line. There are no counts beyond three standard deviations which is statistically normal.In the QQ plot the points are all relatively close to the line indicating normal probabilities. The theoretical and sample quantiles match very well with the exception of the two points at the 2 and -2 quantile, but statistically speaking this is to be expected.
# Use the DATA606::qqnormsim function
qqnormsim(heights)
This QQ plots above show our data and eight simulated plots. The “Normal QQ Plot (Data)” actually looks to be the most normal out of the bunch.
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.
trans_error_10 <- (.98*.98*.98*.98*.98*.98*.98*.98*.98*.02) * 100
There is a \(1.6674955\)% chance of the 10th transistor having a defect.
no_error <- (.98^100)
There is a \(`no_error`\)% chance of the 100 transistors not having a defect.
mean2 <- 1 / .02
sd2 <- ( (1-.02) / (.02^2) )^(1/2)
The first defect on average will occur after \(50\) transistors and the standard deviation is \(49.4974747\).
mean5 <- 1 / .05
sd5 <- ( (1-.05) / (.05^2) )^(1/2)
The first defect on average will occur after \(20\) transistors and the standard deviation is \(19.4935887\).
By increasing the probability of an event, the average occurance of the event also increases. Adversely increasing the probability will reduce the standard deviation of the event taking place.
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.
dbinom(2, 3, .51)
## [1] 0.382347
Out of three children you can have bbg, bgb, gbb.
(.51*.51*.49) + (.51*.49*.51) + (.49*.51*.51)
## [1] 0.382347
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.
dbinom(2, 9, .15) * .15
## [1] 0.03895012
.15
They are different because all events are independent of one another. For scenario (a) we need 7 fails and 2 successes and a success on the last attempt. We find out the probability of hitting any two shots our of 9 and multiply by the 15% chance of making the last shot. In part (b) we know that no matter what previous results are she has a 15% chance of making the next shot.