library(DATA606)
# a. Z > -1.13
normalPlot(bounds = c(-1.13, Inf))
# b. Z < 0.18
normalPlot(mean = 0, sd = 1, bounds = c(-Inf,0.18))
# c. Z > 8
normalPlot(mean = 0, sd = 1, bounds = c(8,Inf))
# d. |Z| < 0.5
normalPlot(mean = 0, sd = 1, bounds = c(-0.5,0.5))
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.
Write down the short-hand for these two normal distributions.
Men (30-34): \(N(\mu = 4313, \sigma = 583)\) Women (25-29): \(N(\mu = 5261, \sigma = 807)\)
What are the Z-scores for Leo’s and Mary’s finishing times? What do these Z-scores tell you?
Z_leo <- (4948 - 4313) / 583;Z_leo
## [1] 1.089194
Z_mary <- (5513 - 5261) /807;Z_mary
## [1] 0.3122677
Did Leo or Mary rank better in their respective groups? Explain your reasoning. Mary rank better in her group than Leo did in his group since Mary’s Z score is closer to the mean
What percent of the triathletes did Leo finish faster than in his group?
p_leo <- (1-pnorm((4948 - 4313) / 583)) * 100; p_leo
## [1] 13.80342
p_mary <- (1-pnorm((5513 - 5261) /807)) * 100; p_mary
## [1] 37.74186
Below are heights of 25 female college students.
f_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)
# 68% or 1 standard deviation from the mean?
sd_1 <- sum(f_heights > (61.52 - 4.58) & f_heights < (61.52 + 4.58)) / length(f_heights) * 100; sd_1
## [1] 68
# 95% or 2 standard deviations from the mean?
sd_2 <- sum(f_heights > (61.52 - (2* 4.58)) & f_heights < (61.52 + (2* 4.58))) / length(f_heights) * 100; sd_2
## [1] 96
# 99% or 3 standard deviations from the mean?
sd_3 <- sum(f_heights > (61.52 - (3* 4.58)) & f_heights < (61.52 + (3* 4.58))) / length(f_heights) * 100; sd_3
## [1] 100
hist(f_heights, probability = TRUE, ylim = c(0, 0.10))
x <- min(f_heights):max(f_heights)
y <- dnorm(x = x, mean = 61.52, sd = 4.58)
lines(x = x, y = y, col = "blue")
qqnorm(f_heights)
qqline(f_heights)
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.
(.98^9)*(.02)
## [1] 0.01667496
(.98^100)
## [1] 0.1326196
# mean/expected value
1/.02
## [1] 50
#standard deviation
sqrt((1-.02)/(0.02^2))
## [1] 49.49747
# mean/expected value
1/.05
## [1] 20
#standard deviation
sqrt((1-.05)/(0.05^2))
## [1] 19.49359
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.
(choose(3,2)) * (0.51)^2 * (.49)
## [1] 0.382347
# combinations: bbg, bgb, gbb
(.51 * .51 * .49) + (.51 * .49 * .51) + (.49 * .51 * .51)
## [1] 0.382347
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.
(choose(9,2)) * (0.15)^3 * (.85)^7
## [1] 0.03895012
Suppose she has made two successful serves in nine attempts. What is the probability that her 10th serve will be successful? 0.15
Even though parts (a) and (b) discuss the same scenario, the probabilities you calculated should be different. Can you explain the reason for this discrepancy? In (b), the calculation pertains to the probability of a single independent event having 2 possible outcome of either success or failure; while the scenario in (a) is more involve in the probability of specific outcome of success in sequence, looking for the player’s 3rd successful serve in the 10th serve