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.
# use the DATA606::normalPlot function
normalPlot(c(-1.35))
normalPlot(c(-1.48))
normalPlot(bounds=c(-0.4,1.5))
normalPlot(bounds=c(-2,2))
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.
m_mean = 4313
m_sd = 583
f_mean = 5261
f_sd = 807
zscore_leo <- (4948-m_mean)/(m_sd)
zscore_leo
## [1] 1.089194
zscore_leo <- (4948-m_mean)/(m_sd)
zscore_leo
## [1] 1.089194
zscore_mary <- (5513-f_mean)/(f_sd)
zscore_mary
## [1] 0.3122677
Mary is the one who has better rank as her rank is closer to average.
pnorm(zscore_leo,lower.tail = FALSE)
## [1] 0.1380342
pnorm(zscore_leo,lower.tail = FALSE)
## [1] 0.1380342
There would be wider groups if the finishing times are not normal and it will not be possible to compare.
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)
mean_heights <- mean(heights)
sd_heights <- sd(heights)
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
hist(heights, probability = TRUE,ylim = c(0,0.2))
x <- 30:90
y <- dnorm(x = x, mean = mean_heights, sd = sd_heights)
lines(x = x, y = y, col = "blue")
qqnorm(heights)
qqline(heights)
sim_norm <- rnorm(n = length(heights), mean = mean_heights, sd = sd_heights)
qqnorm(sim_norm)
qqline(sim_norm)
Data has normal distribution
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
tenth_Probability = (1-0.02)^9 - 0.02
p=0.02
no_defect_probability = (1-0.02)^100
num_transistors_zero_defects <- 1/0.02
sd_num_transistors_zero_defects <- sqrt((1-0.02)/0.02^2)
machine_two_num_transistors_zero_defects <- 1/0.05
sd_machine_two_num_transistors_zero_defects <- sqrt((1-0.05)/0.05^2)
Mean and SD are inversely proportional to the probability
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.
total_kids = 3
num_boys = 2
prob_boys = 0.51
number_of_cases <- factorial(total_kids)/(factorial(num_boys)*factorial(total_kids - num_boys))
probability_two <- number_of_cases*(prob_boys^num_boys)*((1-p)^(total_kids-num_boys))
probability_two
## [1] 0.764694
The possible occurences are
BBB BBG GBB BGB BGG GGB GBG GGG
Probability will be (0.51)(0.51)(1-0.51)
The numer of kids is big and the combinations will be different
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.
total_serves = 10
num_serves = 3
prob_serves = 0.15
number_of_serves <- factorial(total_serves-1)/(factorial(num_serves-1)*factorial(total_serves - num_serves))
probability_three_bin <- number_of_serves*(prob_serves^num_serves)*((1-prob_serves)^(total_serves-num_serves))
probability_three_bin
## [1] 0.03895012
The Probability is always 0.15 for nth Serve.
Both are similar and it is calculated the other way around. One calculates probablility of 10th server to be successful and the other checks if the 10th try will be successful.