What percent of a standard normal distribution N(mean = 0, SD = 1) is found in each region?
Z < -1.35
# area greater than z= -1.13
pnorm(-1.13,lower.tail = FALSE)
## [1] 0.8707619
normalPlot(bounds = c(-1.13,4))
Z < 0.18 Area to the left of Z < 0.18
round(pnorm(0.18),4)
## [1] 0.5714
normalPlot(bounds = c(-4,0.18))
Z < 8 Z Greater than 8. This is essentially zero.
pnorm(8, lower.tail = FALSE)
## [1] 6.220961e-16
normalPlot(bounds = c(8,9))
|Z| < 0.5. This is picking the values in between .5 and -.5
pnorm(.5) - pnorm(-.5)
## [1] 0.3829249
normalPlot(bounds = c(-.5,.5))
Triathlon times, Part I. 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.
(a) Below are the Short-hand Notations:
Leo: \(N(\mu = 4313, \sigma = 583)\)
Mary: \(N(\mu = 5261,\sigma = 807)\)
(b) Using the following Formula: \(Z=\frac { x-\mu }{ \sigma }\)
Z-Score for Leo: \(Z=\frac { 4948-4313 }{ 583 } \cong 1.089\)
Z-Score for Mary: \(Z=\frac { 5513-5261 }{ 807 } \cong 0.3122\)
(c) Based on the Z scores, it looks like Leo fared better than Mary. Leo’s Z score was at least 1 standard deviation above the mean, where as Mary’s Z core was closer to the mean
(d) Leo feared better than 86.2% than the rest of the population. Mary fared better than 62.26% of the population.
# Leo
round(pnorm(4948, 4313, 583), 4)
## [1] 0.862
# Mary
round(pnorm(5513, 5261, 807), 4)
## [1] 0.6226
(f) If the distributions were not normal, then the answers would change because the data could be skewed and not truly represent accurate results.
(a) The mean height is 61.52 inches with a standard deviation of 4.58 inches. Use this information to determine if the heights approximately follow the 68-95-99.7% Rule.
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)
d.curve <-dnorm(heights,mean=mean(heights), sd=sd(heights))
mu <- mean(heights)
sigma <- sd(heights)
Using the pnorm function with 1 standard deviation from the mean, the result: 68.26 fits closely within the 68% rule
pnorm(q=mu+sigma, mean = mu,sd=sigma) - pnorm(q=mu-sigma, mean = mu, sd=sigma)
## [1] 0.6826895
Using the pnorm function with 2 standard deviations from the mean, the result: 95.44% fits closely within the 95% rule
pnorm(q=mu+2*sigma, mean = mu,sd=sigma) - pnorm(q=mu-2*sigma, mean = mu, sd=sigma)
## [1] 0.9544997
Using the pnorm function with 3 standard deviations from the mean, the result: 99.73% fits closely within the 99.7% rule
pnorm(q=mu+3*sigma, mean = mu,sd=sigma) - pnorm(q=mu-3*sigma, mean = mu, sd=sigma)
## [1] 0.9973002
(b) Do these data appear to follow a normal distribution? Explain your reasoning using the graphs provided below.
Overall, based on the histogram and qqplot, the results appear close to the normal line. The data does have a slight skew to the right that is a bit more visible in the histogram, but it is fairly normal.
qqnorm(heights)
qqline(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.
(a) What is the probability that the 10th transistor produced is the first with a defect? Using the following formula: \({ (1-p) }^{ n-1 }p\) \({ (1-.02) }^{ 9 }.02\) or 0.01667%
.98^9*.02
## [1] 0.01667496
(b) What is the probability that the machine produces no defective transistors in a batch of 100? This is just the P of no defective transitors to the 100 power. \({ (.98) }^{ 100 }\)
round(.98^100, 4)
## [1] 0.1326
(c) On average, how many transistors would you expect to be produced before the first with a defect? What is the standard deviation? Using \(\mu =\frac { 1 }{ p } = \mu =\frac { 1 }{ .02 }\) we can expect to see a defect in about 50 trials.
1/.02
## [1] 50
The standard deviation is \(\sigma =\sqrt { \frac { 1-p }{ { p }^{ 2 } } }\) = \(\sigma =\sqrt { \frac { 1-.02 }{ { .02 }^{ 2 } } }\)
x <- (1-.02)/(.02)^2
sqrt(x)
## [1] 49.49747
(d) Another machine that also produces transistors has a 5% defective rate where each transistor is produced independent of the others. On average how many transistors would you expect to be produced with this machine before the first with a defect? What is the standard deviation?
Using \(\mu =\frac { 1 }{ p }\) = \(\mu =\frac { 1 }{ .05 }\) we can expect to see a defect in about 20 trials.
1/.05
## [1] 20
The standard deviation is \(\sigma =\sqrt { \frac { 1-p }{ { p }^{ 2 } } }\) = \(\sigma =\sqrt { \frac { 1-.05 }{ { .05 }^{ 2 } } }\)
x <- (1-.05)/(.05)^2
sqrt(x)
## [1] 19.49359
(e) Based on your answers to parts (c) and (d), how does increasing the probability of an event affect the mean and standard deviation of the wait time until success? By increasing the probability, the number of trails before a success is reduced. In addition, the standard deviation is also reduced. In parts (c) and (d), we saw a reduction from ~50 to ~20.
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.
n <- 3
k <- 2
p <- .51
one.minus.p <- (1 - p)
n.fact <- factorial(n)
k.fact <- factorial(k)
(factorial(n)/(factorial(k)*factorial(n-k)))*(p^k)*(one.minus.p^(n-k))
## [1] 0.382347
{B, B, G}
{B, G, B}
{G, B, B}
\(\left( \frac { 8 }{ 3 } \right)\) is \(\frac { 8! }{ 3!5! } = 56\). This beginning part of the formula in part A would take a lot of computation and be prone to mistakes. This is not taking into account the 2nd part of the formula: \({ p }^{ k }{ (1-p) }^{ n-k }\)
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 problem, I broke it by calculating that there were exactly 2 successes in 9 trials.
p.success <- .15
pq.failure <- 1-p.success
n <- 9
k <- 2
two.successes.nine.trials <-round((factorial(n)/(factorial(k)*factorial(n-k)))*(p.success^k)*(pq.failure^(n-k)),4)
This comes out to 0.2597 To find the 10th trial given 2 successes, we multiply 0.15 (the probability of a single success) by the previous probability
round(two.successes.nine.trials * p.success,4)
## [1] 0.039
The 10th serve is just a single scenario, which is 15%
p.success
## [1] 0.15
The probability for case (a) assumes that there were already at least 9 successes. This is different than calculating an independent probability such as in case (b).