Graded: 3.2 (see normalPlot), 3.4, 3.18 (use qqnormsim from lab 3), 3.22, 3.38, 3.42
What percent of a standard normal distribution \(N(\mu = 0, \sigma = 1)\) is found in each region? Be sure to draw a graph.
87.1 percent of a standard normal distribution is in the area above Z = −1.13.
normalPlot(mean = 0, sd = 1, bounds = c(-1.13, Inf), tails = FALSE)
57.1 percent of a standard normal distribution is in the area below Z = 0.18.
normalPlot(mean = 0, sd = 1, bounds = c(-Inf, 0.18), tails = FALSE)
Approximately 0 percent of a standard normal distribution is in the area above Z = 8. In a normal distribution any value more than 3 standard distributions away from the mean is extremely rare and over 4 standard distributions away from the mean is so rare as to be negligible.
normalPlot(mean = 0, sd = 1, bounds = c(8, Inf), tails = FALSE)
38.3 percent of a standard normal distribution is in the area between Z = -0.5 and Z = 0.5.
normalPlot(mean = 0, sd = 1, bounds = c(-0.5, 0.5), tails = FALSE)
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.
LeoZ <- (4948-4313)/583
round(LeoZ, 2)
## [1] 1.09
MaryZ <- (5513-5261)/807
round(MaryZ, 2)
## [1] 0.31
The Z-score for Leo’s finishing time is 1.09 which means he finished 1.09 standard deviations above the mean for his age group.
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.
Leo ranked better than Mary for his age group since his Z-score was much higher than Mary’s. The higher the Z-score the higher the percentile rank.
round(pnorm(LeoZ)*100, 2)
## [1] 86.2
Leo finished faster then 86.2 percent of the other competitors in his age group.
round(pnorm(MaryZ)*100, 2)
## [1] 62.26
Mary finished faster then 62.26 percent of the other competitors in her age group.
Yes, my answers to parts (b) - (e) would change if the distribution is not normal. You could still calculate a Z-score, but you cannot use Z-scores to estimate probabilities and percentile ranks in a non-normal distribution. In that case you would need to know more information about the distribution than just the mean and standard deviation. If you had the total number of competitors in their age groups and the number of competitors who did better or worse than Leo and Mary then you could calculate a percentile rank.
Below are heights of 25 female college students.
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
Yes, the heights of female college students in this dataset do seem to follow the 68-95-99.7% Rule since they appear to be normally distributed. In fact they follow a normal pattern even more closely than the simulations.
set.seed(250)
qqnormsim(heights)
provided below.
Yes the data represented by the graphs above appear to follow a normal distribution. It’s a little harder to tell based on the histogram than on the normal probability plot. In the histogram the shape created by the tops of the bars roughly follows the normal curve, but in the normal probability plot, it’s much clearer that the data follows a straight line.
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.
The probability that the 10th transistor produced is the first with a defect is 0.017.
# geometric distribution
p <- .02
n <- 10
P <- (1-p)^(n-1)*p
round(P, 3)
## [1] 0.017
There is a 0.133 probability that the machine produces no defective transistors in a batch of 100.
round((1-p)^100, 3)
## [1] 0.133
defect? What is the standard deviation?
You would expect on average that 50 transistors would be produced before the first with a defect with a standard deviation of 49.5.
EV <- 1/p
EV
## [1] 50
sd <- sqrt((1-p)/p^2)
round(sd, 2)
## [1] 49.5
You would expect on average that 20 transistors would be produced before the first with a defect on this machine, with a standard deviation of 19.5.
p <- .05
EV <- 1/p
EV
## [1] 20
sd <- sqrt((1-p)/p^2)
round(sd, 1)
## [1] 19.5
Increasing the probability of an event (that is a Bernoulli random variable) makes both the expected value and the standard deviation lower.
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.
There is a probability of 0.382 that exactly two of them will be boys.
# binomial distribution
p = .51
P = round(dbinom(2,3,p),3)
P
## [1] 0.382
# double check
n <- 3
k <- 2
p <- .51
factorial(n)/(factorial(k)*factorial(n-k))*p^k*(1-p)^(n-k)
## [1] 0.382347
There are three possible orderings of the children. Each with a probability of .51*.51*.49
# the addition rule for disjoint outcomes
P <- .51*.51*.49 + .51*.49*.51 + .49*.51*.51
P
## [1] 0.382347
In this approach there are 56 different ways you could have exactly 3 boys out of 8 kids, so you’d have to calculate the probability of having exactly 3 boys and then add it up 56 times!
# number of ways you can get k successes in n trials
fc=function(n,k){factorial(n)/(factorial(k)*factorial(n-k))}
fc(8, 3)
## [1] 56
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.
There is a 0.039 probability that she will make her 3rd successful serve on the 10th trial.
# first find the probability of exactly 2 successes in 9 trials
p = .15
P = dbinom(2,9,p)
# then multiply by the probability that she will be successful on her 10th try
round(P * .15,3)
## [1] 0.039
The probability that her 10th serve will be successful is still 0.15. The gambler’s fallacy makes you think that the outcome of prior trials might have an affect on the next trial, but if the trials are independent, each trial has exactly the same probability as every other trial.
Part (b) only asks about the probability of the 10th trial whereas part (a) asks about the joint probability of all of the first 10 trials.