What percent of a standard normal distribution N(μ = 0, sigma = 1) is found in each region? Be sure to draw a graph.
normalPlot(bounds = c(-1.13,100))
p = 0.871
normalPlot(bounds = c(-100,0.18))
p = 0.571
normalPlot(bounds = c(8,1000))
p = 6.66e-16
normalPlot(bounds = c(-.5,.5))
p = 0.383
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. Mens race: N(mean = 4313, sigma = 583) Womens race: N(mean = 5261, sigma = 807)
What are the Z-scores for Leo’s and Mary’s finishing times? What do these Z-scores tell you? Leos Z-Score = (4948 - 4313)/583 = 1.089194 Marys Z-Score = (5513 - 5261)/807 = 0.3122677
These scores tell you how many standard deviations leo/marys times differ from the mean (negative z score is below mean, positive is above mean)
Did Leo or Mary rank better in their respective groups? Explain your reasoning. Mary ranked better in her group. In this case, the lower the z-score the better the performance (i.e. lower time to finish).
What percent of the triathletes did Leo finish faster than in his group?
male_mean <- 4313
male_sd <- 583
leo_time <- 4948
normalPlot(mean = male_mean, sd = male_sd, bounds = c(leo_time,100000))
Leo finished faster than 0.138 of his group.
female_mean <- 5261
female_sd <- 807
mary_time <- 5513
normalPlot(mean = female_mean, sd = female_sd, bounds = c(mary_time,100000))
Mary finished faster than 0.377 of her group.
Absolutely, we’ve been estimating the distribution to be normal, so all the calculations would change if the run times were not normally distributed.
Below are heights of 25 female college students:
f_hgt <- 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)
f_mean <- mean(f_hgt)
f_sd <- sd(f_hgt)
#68% is one SD wide of the mean
f_range <- c(f_mean - f_sd, f_mean + f_sd)
f_range
## [1] 56.93633 66.10367
sum(f_hgt > f_range[1] & f_hgt < f_range[2])/length(f_hgt)
## [1] 0.68
#Confirmed, 68% fall within 1 SD
#95% Fall within 2 SD
f_range <- c(f_mean - f_sd*2, f_mean + f_sd*2)
f_range
## [1] 52.35267 70.68733
sum(f_hgt > f_range[1] & f_hgt < f_range[2])/length(f_hgt)
## [1] 0.96
#Confirmed, 96% fall within 2 SD, a close approximation to 95%
#99.7 percent fall within 3 SD
f_range <- c(f_mean - f_sd*3, f_mean + f_sd*3)
f_range
## [1] 47.769 75.271
sum(f_hgt > f_range[1] & f_hgt < f_range[2])/length(f_hgt)
## [1] 1
#In this small sample, 100% fall within 3 SD.
hist(f_hgt, freq = FALSE)
x <- 50:75
y <- dnorm(x = x, mean = f_mean, sd = f_sd)
lines(x = x, y = y, col = "blue")
qqnorm(f_hgt)
qqline(f_hgt)
Yes, they do appear to follow a normal distrubtion. The histogram stays within the bell curve of the simulated normal distributions, and the QQ plot shows a tight adherances to the normal line (with some outliers that can be seen in normal distributions).
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.
In this case will be consider a “success” to be finding a defect.
p_success <- .02
n <- 10
#Finding success on the nth trial follows formula (1-p)^n-1 * p
(1 - p_success)^n * p_success
## [1] 0.01634146
In this case we will simply find the probability of no success (in this case 1 - .02, or .98), and since these are disjoint we can simply multiply for each trial (in this case 100).
(1-p_success)^100
## [1] 0.1326196
The average for geometric distributions is 1/p. Standard deviation is sqrt((1-p)/p^2)
average <- 1/p_success
average
## [1] 50
sigma <- sqrt((1-p_success)/p_success^2)
sigma
## [1] 49.49747
p_success <- .05
average <- 1/p_success
average
## [1] 20
sigma <- sqrt((1-p_success)/p_success^2)
sigma
## [1] 19.49359
Increasing the probability of an event decreases the mean and standard deviation.
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.
p <- .51
n <- 3
k <- 2
choose(n = n, k = k)*p^k*(1-p)^(n-k)
## [1] 0.382347
Confirm that your answers from parts (a) and (b) match.
BBG BGB GBB
BBG <- p * p * (1-p)
BGB <- p * (1-p) * p
GBB <- (1-p) * p * p
BBG + BGB + GBB
## [1] 0.382347
BBG + BGB + GBB == choose(n = n, k = k)*p^k*(1-p)^(n-k)
## [1] TRUE
There are 56 ways to choose 3 from 8, so the approach from part (b) would entail calculating outcomes from 56 individual combinations and then combining them. The approach in part (a) is generalized and can produce the same result with a single formula.
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.
For this we will calculate the probability of 2 successes within 9, and then multiply by the probability for an independent successful serve on the 10th.
p <- .15
n <- 9
k <- 2
(choose(n = n, k = k)*p^k*(1-p)^(n-k)) * .15
## [1] 0.03895012
Because the servers are independent, the probability of a success serve on any given attempt is still 15%.
Part (a) is asking for 2 successful serves within 9 AND a successful serve on the 10th. Part (b) is asking for the probability of a single successful serve, which is independent of previous serves.