Distributions of Random Variables

3.2

What percent of a standard normal distribution N(μ = 0, sd = 1) is found in each region? Be sure to draw a graph.

Z >-1.13

μ <- 0
sd <- 1
Z <- -1.13
# finding value for 'x'
x <- Z * sd + μ
x
## [1] -1.13
# finding probability
1 - pnorm(x, mean = 0, sd = 1)
## [1] 0.8707619
# graph
normalPlot(bounds=(c(-1.13,Inf)))

Z <0.18

μ <- 0
sd <- 1
Z <- 0.18
# finding value for 'x'
x <- Z * sd + μ
x
## [1] 0.18
# finding probability
1 - pnorm(x, mean = 0, sd = 1)
## [1] 0.4285763
# graph
normalPlot(bounds=(c(0.18,Inf)))

Z > 8

μ <- 0
sd <- 1
Z <- 8
# finding value for 'x'
x <- Z * sd + μ
x
## [1] 8
# finding probability
1 - pnorm(x, mean = 0, sd = 1)
## [1] 6.661338e-16
# graph
normalPlot(bounds=(c(8,Inf)))

|Z|<0.5

μ <- 0
sd <- 1
Z <- 0.5
# finding value for 'x'
x <- Z * sd + μ
x
## [1] 0.5
# finding probability |x| < 0.5 = -x < 0.5 < x
x1 <- pnorm(-x, mean = 0, sd = 1)
x2 <- pnorm(x, mean = 0, sd = 1)
x2 - x1
## [1] 0.3829249
# graph
normalPlot(bounds=(c(-x,x)))

3.4

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

Answer a)

N(μ=4313, sd=583) → Men, Ages 30 - 34

N(μ=5261, sd=807) → Women, Ages 25 - 29

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

Answer b)

# Z score for Leo's finishing time
μ <- 4313
sd <- 583
x <- 4948
# finding value for 'x'
Z <- (x - μ) / sd
Z
## [1] 1.089194
# Z score for Mary's finishing time
μ <- 5261
sd <- 807
x <- 5513
# finding value for 'x'
Z <- (x - μ) / sd
Z
## [1] 0.3122677

The Z score of an observation is the number of standard deviations it falls above or below the mean.

For Leo, its Z score is 1.089, the number of standard deviation is above the mean.

For Mary, its Z score is 0.312, the number of standard deviation is below the mean.

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

Answer c)

Mary get lower Zscore:0.312 than Leo Zscore: 1.089, that mean mary get faster time than their respective groups.

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

Answer d)

Percent_Leo <- 1-pnorm(1.089)
Percent_Leo
## [1] 0.1380769
  1. What percent of the triathletes did Mary finish faster than in her group?

Answer e)

Percent_Mary <- 1-pnorm(0.312)
Percent_Mary
## [1] 0.3775203
  1. If the distributions of finishing times are not nearly normal, would your answers to parts (b) - (e) change? Explain your reasoning.

Answer f)

The part b and c would not be changed, because the ranking will not be changed and Zscore still reflect above or below mean. But the part d & e will be changed, “Pnorm” only used for normal distribution.

3.18

  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.

Answer a)

hgt <- 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)

summary(hgt)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   54.00   58.00   61.00   61.52   64.00   73.00
pnorm(61.52+1*4.58,mean=61.52,sd=4.58)
## [1] 0.8413447
pnorm(61.52+2*4.58,mean=61.52,sd=4.58)
## [1] 0.9772499
pnorm(61.52+3*4.58,mean=61.52,sd=4.58)
## [1] 0.9986501

Probability for falling within 1 standard deviation of the mean is close to 99.7%.

So the distribution of the heights does not approximately follow the 68-95-99.7% Rule.

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

Answer b)

It appear that it follows normal distribution. The point of the q-q plot fall within the boundries.The QQ-plot of the data shows that points tend to follow the line but with some deviation on both high and low ends.

3.22

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

Answer a)

probability that the transistor is defective = .02

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

Answer b)

The probabilty that the 101th transistor is defective

pgeom(100,0.02)
## [1] 0.8700328
  1. On average, how many transistors would you expect to be produced before the first with a defect? What is the standard deviation?

Answer c)

#mean
1/0.02
## [1] 50
#standard deviation
sqrt((1-0.02)/0.02^2)
## [1] 49.49747
  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?

Answer d)

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

Answer e)

Increasing the probability of success decreases the wait time for success and decreases the spread in the distribution

3.38

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

Answer a)

dbinom(2,3,0.51)
## [1] 0.382347
  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.

Answer b)

# BBG GBB BGB #
(0.51^2)*0.49*3
## [1] 0.382347

Confirm that your answers from parts (a) and (b) match.

My answer for (a) and (b) matched - 0.382347.

  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).

Answer c)

The approach from part (b) will be more tedious because you have to manually draw all the possible combinations of 3 boys from 8 siblings while in (a) the choose function will compute that number for you

3.42

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

Answer a)

choose(9,2)*0.15^3*0.85^7
## [1] 0.03895012
  1. Suppose she has made two successful serves in nine attempts. What is the probability that her 10th serve will be successful?

Answer b)

Since each attempt is independent of each other and the probability of success is the same for each attempt, the probability of success on the 10th serve is the same as the probability of success for the previous 9 servers - 0.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?

Answer c)

  1. fits the case of a negative binonmial distribution - (probability of kth success on the nth trial). For (a) we are looking for the 3rd success (the last attempt being a success) after the 10th attempt. For (b), we are not concern about the probabilities of the first 9 attempts - we are only concern about the probability of success on the 10 attempt.