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.
pnorm(-1.35)
## [1] 0.08850799
visualize.norm(stat=-1.35,mu=0,sd=1,section="lower")
pnorm(1.48)
## [1] 0.9305634
visualize.norm(stat=1.48,mu=0,sd=1,section="upper")
visualize.norm(stat=c(0.4,1.5),mu=0,sd=1,section="bounded")
visualize.norm(stat=c(-2,2),mu=0,sd=1,section="bounded")
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.
#Ages of men 30-40:
m_mean <- 4313
m_sd <- 583
#Ages of women 30-34:
w_mean <- 5261
w_sd <- 807
Zscores_Leo <- (4948 - 4313) / 583
Zscores_Leo
## [1] 1.089194
Zscores_Mary <- (5513 - 5261) / 807
Zscores_Mary
## [1] 0.3122677
Leo’s result is 1.09 standard deviations from the mean while Mary’s results is 0.31 standard deviations from the mean.
Solution: Mary ranks better since her result is closer to the median than Leo’s.The Z-score for Mary’s time is 0.31 which means she finished 0.31 standard deviations above the mean for her age group.
pnorm(Zscores_Leo)
## [1] 0.8619658
Solution: Leo finished faster then 86% of the other competitors in his group.
pnorm(Zscores_Mary)
## [1] 0.6225814
Solution: Mary finished faster then 62% of the other competitors in her group.
Solution: Z-scores for non normal distributions are relevant for analysis in a multiple group. We will not be able to compare two people from different groups based on Z-scores of non normal distributions. We cannot use the normal probability table to calculate the probabililties and percentiles without a normal model for parts (d) through (e).
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)
heights
## [1] 54 55 56 56 57 58 58 59 60 60 60 61 61 62 62 63 63 63 64 65 65 67 67
## [24] 69 73
mean_heights <- 61.52
sd_heights <- 4.58
1-2*pnorm(mean_heights+sd_heights,mean=mean_heights,sd=sd_heights,lower=FALSE)
## [1] 0.6826895
1-2*pnorm(mean_heights+2*sd_heights,mean=mean_heights,sd=sd_heights,lower=FALSE)
## [1] 0.9544997
1-2*pnorm(mean_heights+3*sd_heights,mean=mean_heights,sd=sd_heights,lower=FALSE)
## [1] 0.9973002
Solution: The heights of the students seems to follow the 68-95-99.7% Rule since they appear to be normally distributed.
The data appear to follow a normal distribution from the histogram but in the normal probability plot, the data follows a straight line with some 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.
p <- .02
n <- 10
P <- (1-p)^(n-1)*p
p
## [1] 0.02
Solution: The probability that the 10th transistor produced is the first with a defect is 0.02.
round((1-p)^100, 3)
## [1] 0.133
There is 0.133 chance that the machine produces no defective transistors in a batch of 100.
Ex_Val <- 1/p
Ex_Val
## [1] 50
sd <- sqrt((1-p)/(p^2))
sd
## [1] 49.49747
On average that 50 transistors would be produced before the first with a defect with a standard deviation of 49.5.
p <- .05
Ex_Val <- 1/p
Ex_Val
## [1] 20
sd <- sqrt((1-p)/(p^2))
sd
## [1] 19.49359
On average 20 transistors would be produced before the first with a defect on this machine with a standard deviation of 19.5.
Solution: Increasing the probability of an event makes both the expected value and the standard deviation to decrease.
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.
#getting two boys
p = .51
P = round(dbinom(2,3,p),3)
P
## [1] 0.382
Solution: There is a 0.382 chance that exactly two of the kids will be boys.
P <- .51*.51*.49 + .51*.49*.51 + .49*.51*.51
P
## [1] 0.382347
p(a Boy) = 0.51 p(a Birl) = 0.49
There’re 3 possibilities: BBG BGB GBB
The approach from part (b) would be more tedious because it will be harder to list all the cases with 3 boys and 5 girls than cases with 2 boys and a girl.
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.
p = .15
P = dbinom(2,9,p)
round(P * .15,3)
## [1] 0.039
Solution: There a 0.039 chance that she will make her 3rd successful serve on the 10th trial.
Solution: With two successful serve in nine attempts, the probability that the 10th serve will be successful is the probability of making one successful serve, which is .15 or 15%.
Solution: Part (b) calculates the probability that two of the previous nine attempts are successesful, while part (a) calculates the probability that the 10th attempt is a successful with the previou nine attempts successful.