Set up workspace

Exercise 3.2

Percent of normal distribution under the curve at the follown z-scores

  1. Z > −1.13
# Normal plot
formals(normalPlot)
## $mean
## [1] 0
## 
## $sd
## [1] 1
## 
## $bounds
## c(-1, 1)
## 
## $tails
## [1] FALSE
normalPlot(bounds = c(-1.13, Inf))

87%

  1. Z < 0.18
normalPlot(bounds = c(-Inf, 0.18))

57%

  1. Z > 8
normalPlot(bounds = c(8, Inf))

~0%

  1. |Z| < 0.5
normalPlot(bounds = c(-0.5, 0.5))

38%

Exercise 3.4

Normal Distribution

Leo: 4948 seconds

Mary: 5513 seconds

Men:
mean: 4313 seconds
std: 583 seconds.

Women:
mean: 5261 seconds
std: 807 seconds

  1. Write down the short-hand for these two normal distributions.

Men: N(4313, 583)
Women: N(5261, 807)

  1. What are the Z-scores for Leo’s and Mary’s finishing times? What do these Z-scores tell you?

They tell you how each did with respect to their group.

Leo

  (4948 - 4313)/583
## [1] 1.089194

Mary

  (5513 - 5261)/807
## [1] 0.3122677
  1. Did Leo or Mary rank better in their respective groups? Explain your reasoning.

Leo did better in his group because his score is about 1 standard deviation above the mean; whereas, Mary’s is only 0.3 standard deviations above the mean.

  1. What percent of the triathletes did Leo finish faster than in his group?
pnorm(1.089)
## [1] 0.8619231

He finished faster than about 86% of his group.

  1. What percent of the triathletes did Mary finish faster than in her group?
pnorm(0.3122)
## [1] 0.6225557

She finishined faster than about 62% of her group.

  1. If the distributions of finishing times are not nearly normal, would your answers to parts
      1. change? Explain your reasoning.

This would change the answers to the above parts. For instance, if one of the plots were bimodal, this would be a completely different context for comparing their results.

Exercise 3.18

  scores <- 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)
  1. 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.
  length(scores[scores > (61.52 - 1*4.58) & scores < (61.52 + 1*4.58)])/length(scores)
## [1] 0.68
  length(scores[scores > (61.52 - 2*4.58) & scores < (61.52 + 2*4.58)])/length(scores)
## [1] 0.96
  length(scores[scores > (61.52 - 3*4.58) & scores < (61.52 + 3*4.58)])/length(scores)
## [1] 1

Expect: 68% between 56.94 and 66.1
95% between 52.36 and 70.68
99.7% between 47.78 and 75.26

As we can see, this is the case for our data.

  1. Do these data appear to follow a normal distribution? Explain your reasoning using the graphs provided below.
  qqnormsim(scores)

Given the above qq plot simulations, it doesl look like this data is approximately normally distributed.

Example 3.22

  1. What is the probability that the 10th transistor produced is the first with a defect?
  ((1-0.02)^9)*0.2
## [1] 0.1667496

About a 17% chance.

  1. What is the probability that the machine produces no defective transistors in a batch of 100?
  (1-0.02)^100
## [1] 0.1326196

About a 13% chance of no failures in batch of 100.

  1. On average, how many transistors would you expect to be produced before the first with a defect? What is the standard deviation?
  1/0.02
## [1] 50
  sqrt((1 - 0.02)/(0.02^2))
## [1] 49.49747

This is a geometric distribution. Expect about 50 transistors before having had the first defect (standard deviation of: 49.497)

  1. 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?
  1/0.05
## [1] 20
  sqrt((1 - 0.05)/(0.05^2))
## [1] 19.49359

Expect first defect with 20th (std of 19.49).

  1. 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?

Increasing the probability decreases the expected number before first defect and the standard deviation of the expected number before the first defect.

Exercise 3.38

P(boy) = 0.51
3 kids

  1. Use the binomial model to calculate the probability that two of them will be boys.
  ((3*2)/(2))*((0.51)^2)*(0.49)
## [1] 0.382347

About 38% chance of two boys

  1. Write out all possible orderings of 3 children, 2 of whom are boys. Use these scenarios to calculate the same probability from part (a) but using the addition rule for disjoint outcomes. Confirm that your answers from parts (a) and (b) match. bbb bbg ggb ggg bgb gbg gbb bgg
  3/8
## [1] 0.375
  1. If we wanted to calculate the probability that a couple who plans to have 8 kids will have 3 boys, briefly describe why the approach from part (b) would be more tedious than the approach from part (a).

There would be many more combinations to write out.

Exercise 3.42

P(success) = 0.15

  1. What is the probability that on the 10th try she will make her 3rd successful serve?
  (9*8/2) * ((0.15)^3) * ((0.85)^(7))
## [1] 0.03895012

About a 4% chance

  1. Suppose she has made two successful serves in nine attempts. What is the probability that her 10th serve will be successful?

Still 15%

  1. 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?

As probability of any single event is assumed to be independent, the expected chance of what will occur for a single event is different than what may occur over ten