Area under the curve, Part I. (4.1, p. 142) What percent of a standard normal distribution \(N(\mu=0, \sigma=1)\) is found in each region? Be sure to draw a graph.

  1. \(Z < -1.35\)

    normalPlot(mean = 0, sd = 1, bounds = c( -Inf, -1.35), tails = FALSE)

    round(pnorm(-1.35, lower.tail=T), 4)
    ## [1] 0.0885
  2. \(Z > 1.48\)

    normalPlot(mean = 0, sd = 1, bounds = c( 1.48, Inf), tails = FALSE)

    1 - round(pnorm(1.48, lower.tail=T), 4)
    ## [1] 0.0694
  3. \(-0.4 < Z < 1.5\)

    normalPlot(mean = 0, sd = 1, bounds = c( -0.4, 1.5), tails = FALSE)

    round(pnorm(1.5, lower.tail=T), 4) - (round(pnorm(-0.4, lower.tail=T), 4) )
    ## [1] 0.5886
  4. \(|Z| > 2\)

    normalPlot(mean = 0, sd = 1, bounds = c( 2, Inf), tails = FALSE)

    1 - round(pnorm(2, lower.tail=T), 4)
    ## [1] 0.0228

Triathlon times, Part I (4.4, p. 142) 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.

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

    #short-hand for men normal distributions  
    paste('N(\U00B5 =', mean.men, ', \U03C3=', sd.men, ')', sep= " ")
    ## [1] "N(µ = 4313 , s= 583 )"
    #short-hand for women normal distributions  
    paste('N(\U00B5 =', mean.women, ', \U03C3 =', sd.women, ')', sep= " ")
    ## [1] "N(µ = 5261 , s = 807 )"
  2. What are the Z-scores for Leo’s and Mary’s finishing times? What do these Z-scores tell you?

    # Z-score for Leo's
    zscore.leo <- (race.leo - mean.men)/sd.men
    paste('Z-score for Leo is ', zscore.leo)
    ## [1] "Z-score for Leo is  1.08919382504288"
    # Z-score for Mary's
    zscore.mary <- (race.mary - mean.women)/sd.women
    paste('Z-score for Mary is ', zscore.mary)
    ## [1] "Z-score for Mary is  0.312267657992565"

    Leo had a better faster run but the Z-score of Mary is better then Leo.

  3. Did Leo or Mary rank better in their respective groups? Explain your reasoning.

    Mary ranked better then Leo in her group. Her z-score is jsut 0.3 SD from its groups mean ; whereas, Leo z-score is 1.09 SD from its groups mean.

  4. What percent of the triathletes did Leo finish faster than in his group?

    pnorm(race.leo, mean = mean.men, sd = sd.men, lower.tail=FALSE)
    ## [1] 0.1380342

    Leo finish faster than 13.8 percent of the triathletes did in his group.

  5. What percent of the triathletes did Mary finish faster than in her group?

    pnorm(race.mary, mean = mean.women, sd = sd.women, lower.tail=FALSE)
    ## [1] 0.3774186

    Mary finish faster than 37.7 percent of the triathletes did in his group.

  6. If the distributions of finishing times are not nearly normal, would your answers to parts (b) - (e) change? Explain your reasoning.

    The Z-score would still remain same, based on the fact that the mean and SD not changing. If the distribution are not normal then the percentile would change.


Heights of female college students Below are heights of 25 female college students.

\[ \stackrel{1}{54}, \stackrel{2}{55}, \stackrel{3}{56}, \stackrel{4}{56}, \stackrel{5}{57}, \stackrel{6}{58}, \stackrel{7}{58}, \stackrel{8}{59}, \stackrel{9}{60}, \stackrel{10}{60}, \stackrel{11}{60}, \stackrel{12}{61}, \stackrel{13}{61}, \stackrel{14}{62}, \stackrel{15}{62}, \stackrel{16}{63}, \stackrel{17}{63}, \stackrel{18}{63}, \stackrel{19}{64}, \stackrel{20}{65}, \stackrel{21}{65}, \stackrel{22}{67}, \stackrel{23}{67}, \stackrel{24}{69}, \stackrel{25}{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.

    # one SD
    pnorm(mean.hgt+(sd.hgt*1), sd = sd.hgt, mean=mean.hgt )
    ## [1] 0.8413447
    # two SD
    pnorm(mean.hgt+(sd.hgt*2), sd = sd.hgt, mean=mean.hgt )
    ## [1] 0.9772499
    # three SD
    pnorm(mean.hgt+(sd.hgt*3), sd = sd.hgt, mean=mean.hgt )
    ## [1] 0.9986501

    No. The sample data above does not follow the 68-95-99.7% rule; we are getting 84.1-97.7-99.9% for the test data.

  2. Do these data appear to follow a normal distribution? Explain your reasoning using the graphs provided below.

    It does not follow a normal distribution. the line plooted looks more of a parabola with slight curve at both the ends; suggesting outliners on both ends.


Defective rate. (4.14, p. 148) 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.

  1. What is the probability that the 10th transistor produced is the first with a defect?

    # Probability of defect is 0.02 ; Probabilit of not a defect is (1 - 0.02) = 0.98
    #  p -> p(not defect)^9 *  p(defect)^1
    (0.98**9) * (0.02**1)
    ## [1] 0.01667496
  2. What is the probability that the machine produces no defective transistors in a batch of 100?

    # Probability of defect is 0.02 ; Probabilit of not a defect is (1 - 0.02) = 0.98
    #  p -> p(not defect)^100 *  p(defect)^0
    (0.98**100) * (0.02**0)
    ## [1] 0.1326196
  3. On average, how many transistors would you expect to be produced before the first with a defect? What is the standard deviation?

    # Probability of defect is 0.02 ; Probabilit of not a defect is (1 - 0.02) = 0.98
    #  1/p(defect)
    paste( 1/0.02 ,' transistors expected to be produced before the first with a defect')
    ## [1] "50  transistors expected to be produced before the first with a defect"
    # SD will be  sqrt ((1-p(defect)/(p(defect)^2)))
    paste('Standard deviation is ',sqrt(((1-0.02)/(0.02**2))))
    ## [1] "Standard deviation is  49.4974746830583"
  4. 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?

    # Probability of defect is 0.05 ; Probabilit of not a defect is (1 - 0.05) = 0.95
    #  1/p(defect)
    paste( 1/0.05,' transistors expected to be produced before the first with a defect')
    ## [1] "20  transistors expected to be produced before the first with a defect"
    # SD will be  sqrt ((1-p(defect)/(p(defect)^2)))
    paste('Standard deviation is ',sqrt(((1-0.05)/(0.05**2))))
    ## [1] "Standard deviation is  19.4935886896179"
  5. 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?

    As the probability increases the Mean and SD will decrease. Higher the Probability ; better we can predict the outcome.


Male children. 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.

  1. Use the binomial model to calculate the probability that two of them will be boys.

    # Probability of boy is 0.51 ; Probabilit of not a boy is (1 - 0.51) = 0.49
    #  k=2 ; n=3 ; p(boy) = 0.51 ; p(not boy) = 0.49
    
    (factorial(3) /(factorial(2)*factorial(3-2) ) ) * (0.51**2 ) * (0.49**(3-2))
    ## [1] 0.382347
  2. 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.

    B being Boy and G being Girl; combinations will be as -> BBG BGB GBB

    # Probability of boy is 0.51 ; Probabilit of not a boy is (1 - 0.51) = 0.49
    # p(BBG or BGB or  GBB) ->  p(BBG) + p(BGB + p(GBB)
    (0.51)*(0.51)*(0.49) + (0.51)*(0.49)*(0.51) + (0.49)*(0.51)*(0.51)
    ## [1] 0.382347
  3. 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).

    As the number of occurances or observation increases the additions of so many combination of observations would become more tedious.


Serving in volleyball. (4.30, p. 162) 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.

  1. What is the probability that on the 10th try she will make her 3rd successful serve?

    # Probability of serve is 0.15 ; Probabilit of not a serve is (1 - 0.15) = 0.85
    # we can split this as success on 10th try  and 2 succeses in any order out of the first 9 trys.
    # [0.15] * [k=2 ; n=9 ; p(serve) = 0.15 ; p(not serve) = 0.85]
    
    (0.15) *  ((factorial(9) /(factorial(2)*factorial(9-2) ) ) * (0.15**2 ) * (0.85**(9-2)))
    ## [1] 0.03895012
  2. Suppose she has made two successful serves in nine attempts. What is the probability that her 10th serve will be successful?

    10th serve being independent serve will have same probability of success of 15%.

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

    Probability of a single event by itself would be differnt probabaility of the same event in a combination of observation/trys.