3.2

\(Z > -1.13\)

#Find percentage
p <- round(1-pnorm(-1.13, 0, 1), 4)*100
print(paste0("Percentage is: ", p, "%"))
## [1] "Percentage is: 87.08%"
visualize.norm(-1.13, mu = 0, sd = 1, section = "upper")

\(Z < 0.18\)

#Find percentage
p <- round(pnorm(0.18, 0, 1), 4)*100
print(paste0("Percentage is: ", p, "%"))
## [1] "Percentage is: 57.14%"
visualize.norm(0.18, mu = 0, sd = 1)

\(Z > 8\)

#Find percentage
p <- round(1-pnorm(8, 0, 1), 4)*100
print(paste0("Percentage is: ", p, "%"))
## [1] "Percentage is: 0%"
visualize.norm(8, mu = 0, sd = 1, section = "upper")

\(|Z| < 0.5\)

#Find percentage
p.left <- round(pnorm(-.5), 4)*100
p.right <- round(1-pnorm(.5), 4)*100
p <- 100 - (p.left+p.right)
print(paste0("Percentage is: ", p, "%"))
## [1] "Percentage is: 38.3%"
visualize.norm(c(-.5,.5), mu = 0, sd = 1, section = "bounded")

3.4

Men \[\mu = 4313\] \[\sigma = 583\] Women \[\mu = 5261\] \[\sigma = 807\]

  1. Z-scores

Leo ran 1.089 standard deviations above the mean

leo.mu <- 4313
leo.sd <- 583
leo.time <- 4948

leo.z <- round((leo.time - leo.mu)/leo.sd, 2)
leo.z
## [1] 1.09

Mary ran 0.312 standard deviations above the mean

mary.mu <- 5261
mary.sd <- 807
mary.time <- 5513

mary.z <- (5513 - 5261)/807
mary.z
## [1] 0.3122677
  1. Since Mary had the lower Z-score, her time was comparably faster than Leo’s since she was closer to the average time for her age group.

  2. Leo’s Percentage

leo.p <- round(1-pnorm(leo.time, leo.mu, leo.sd),4 )*100
print(paste0("Leo's percentage is: ", leo.p, "%"))
## [1] "Leo's percentage is: 13.8%"
visualize.norm(leo.time, mu = leo.mu, sd = leo.sd, section = "upper")

E) Mary’s Percentage

mary.p <- round(1-pnorm(mary.time, mean = mary.mu, sd = mary.sd),4 )*100
print(paste0("Mary's percentage is: ", mary.p, "%"))
## [1] "Mary's percentage is: 37.74%"
visualize.norm(mary.time, mu = mary.mu, sd = mary.sd, section = "upper")

F) We could calculate the Z-score since that only tells us how many standard deviations away from the mean it is. We wouldn’t be able to compare it since the probabilities and percentiles are not normally distributive and wouldn’t be the same for each age group.

3.18

Import data

height <- read_delim("https://raw.githubusercontent.com/jbryer/DATA606Fall2017/master/Data/Data%20from%20openintro.org/Ch%203%20Exercise%20Data/fheights.txt", "\\n", col_names = T)
head(height)
## # A tibble: 6 x 1
##   heighs
##    <int>
## 1     54
## 2     55
## 3     56
## 4     56
## 5     57
## 6     58

Calculate Mean

m <- mean(height$heighs)
m
## [1] 61.375

Calculate Standard Deviation

sd <- sd(height$heighs)
sd
## [1] 4.623311

Percentage of Area between \(Z = -1\) and \(Z = 1\)

p <- 1 - pnorm((m-sd), m, sd) - (1 - pnorm((m+sd), m, sd))
round(p, 2)*100
## [1] 68

Percentage of Area between \(Z = -2\) and \(Z = 2\)

p <- 1 - pnorm((m-(2*sd)), m, sd) - (1 - pnorm((m+(2*sd)), m, sd))
round(p, 2)*100
## [1] 95

Percentage of Area between \(Z = -3\) and \(Z = 3\)

p <- 1 - pnorm((m-(3*sd)), m, sd) - (1 - pnorm((m+(3*sd)), m, sd))
round(p, 3)*100
## [1] 99.7

The heights follow the 68-95-97 rule

  1. The histogram is unimodal and appears to be symmetric. We could tell better if there was more data to compare. The normal probability plot follows a straight line except for a minor outlier after the second positive standard deviation

3.22

A. Finding the probability the 10th transistor has a defect.

tenth <- (.98^9)*.02

print(paste0(round(tenth, 4)*100, "%"))
## [1] "1.67%"
  1. Probability of no defects in a batch of 100
print(paste0(round(.98^100,4)*100, "%"))
## [1] "13.26%"
  1. Average amount of transistors to be produced before 1st defect. \(1/p\)
1/.02
## [1] 50

Standard deviation \(\sqrt{\frac{1-p}{p^2}}\)

sqrt(.98/(.02^2))
## [1] 49.49747

D)Find the average amount of transistors to be produced before 1st defect with 5% defect rate. \(1/p\)

1/.05
## [1] 20

Standard deviation \(\sqrt{\frac{1-p}{p^2}}\)

sqrt(.95/(.05^2))
## [1] 19.49359
  1. The larger the chance of a success, the less time you will have to wait before the first success happens. This means the average amount of time or trials will decrease and the standard deviation will narrow.

3.38

Probability of having a boy is 0.51. Suppose a couple plans to have 3 kids

A)Probability that two of them would be boys: \(\frac{n!}{k!((n-k)!}p^k(1-p)^{n-k}\)

dbinom(2, 3, .51)
## [1] 0.382347
  1. Possible orderings of 3 children with 2 boys. \(\frac{n!}{k!(n-k)!}\)
  • BBG
  • BGB
  • GBB
num <- factorial(3)/(factorial(2)*factorial(1))
num
## [1] 3

Probability using addition rule for disjoint outcomes. \(P(BBG or BGB or GBB)\)

bbg <- .51*.51*.49
bgb <- .51*.49*.51
gbb <- .49*.51*.51

total <- bbg+bgb+gbb
total
## [1] 0.382347

C)Number of different orderings of 3 boys out of 8 kids is 56. Using the addition rule would be very labor intensive.

num <- factorial(8)/(factorial(3)*factorial(5))
num
## [1] 56

3.42

Volleyball player has 15% chance of making the serve

A)Probability that on the 10th try, she will make her 3rd successful serve \[\left( \begin{array}{c} n - 1 \\ p - 1 \end{array} \right)p^k(1-p)^{n-k}\]

prob <- (factorial(9)/(factorial(2)*factorial(7)))*(.15^3)*(.85^7)
prob*100        
## [1] 3.895012
  1. 10th attempt is successful after she made 2 successful serves in the previous 9 attempts \(\frac{n!}{k!((n-k)!}p^k(1-p)^{n-k} * p\)
prob <- dbinom(3,9,.15) * .15
prob*100
## [1] 1.603828
  1. With part A we are calculating the probability of a 3rd success on the 10th attempt. With part B we calculated the probability of having 2 successful servers in 9 attempts plus a successful server on the 10th.