Q1. A researcher wishes to conduct a study of the color preferences of new car buyers.

Suppose that 50% of this population prefers the color red. If 20 buyers are randomly selected, what is the probability that between 9 and 12 (both inclusive) buyers would prefer red?

\(n=20\)

\(\pi = 50\% =.5\)

\(P(9 \le X \le12 | n=20, \pi =.5 )\)

plot(x    = 0:20, 
     y    = dbinom(x    = 0:20, 
                   size = 20, 
                   prob = .5
                  ), 
     type = 'h',
     main = 'Binomial Distribution (n=20, p=0.5)',
     ylab = 'Probability',
     xlab = '# Successes',
     lwd  = 3
     )

dbinom(x = 9:12, size = 20, prob = .5)
## [1] 0.1601791 0.1761971 0.1601791 0.1201344
sum(dbinom(x = 9:12, size = 20, prob = .5))
## [1] 0.6166897
round(x = sum(dbinom(x = 9:12, size = 20, prob = .5)),digits = 4)
## [1] 0.6167
print(round(x = sum(dbinom(x = 9:12, size = 20, prob = .5)),digits = 4))
## [1] 0.6167

Answer: 0.6167

Q2. A quality control inspector has drawn a sample of 13 light bulbs from a recent production lot. Suppose 20% of the bulbs in the lot are defective. What is the probability that less than 6 but more than 3 bulbs from the sample are defective?

i. Identify the distribution. This is a binomial distribution problem. The binomial distribution is used to describe the number of successes in a fixed number of trials, and here the success is defined as bulb being defective. You can think of the bulb being “special” and not necessarily bad/“failure” from a manufacturing perspective if that helps.

ii. Identify the parameters

\(n=13\)

\(\pi = 20\% =.2\)

iii. See what is the Probability Statement Required to be Solved so that you know what to compute

Let X be the count of defective bulbs.

In Words : Probability that less than 6 but more than 3 bulbs from the sample are defective.

In Math: \(P(3<X<6 | n=13, \pi =.2 )\)

iv. Compute/Evaluate

plot(x    = 0:13, 
     y    = dbinom(x    = 0:13, 
                   size = 13, 
                   prob = .2
                  ), 
     type = 'h',
     main = 'Binomial Distribution (n=13, p=0.2)',
     ylab = 'Probability',
     xlab = '# Successes',
     lwd  = 3
     )

dbinom(x = 4:5, size = 13, prob = .2)
## [1] 0.15354508 0.06909529
sum(dbinom(x = 4:5, size = 13, prob = .2))
## [1] 0.2226404
round(x = sum(dbinom(x = 4:5, size = 13, prob = .2)),digits = 4)
## [1] 0.2226
print(round(x = sum(dbinom(x = 4:5, size = 13, prob = .2)),digits = 4))
## [1] 0.2226

Answer: 0.2226

#3 The auto parts department of an automotive dealership sends out a mean of 4.2 special orders daily. What is the probability that, for any day, the number of special orders sent out will be no more than 3?

Poisson distribution

lamba = 4.2 X <= 3

distr <- sum( dpois(x = 0:3, lambda = 4.2))
print(distr, digits = 4)
## [1] 0.3954

Answer: 0.3954

#4 A pharmacist receives a shipment of 17 bottles of a drug and has 3 of the bottles tested. If 6 of the 17 bottles are contaminated, what is the probability that less than 2 of the tested bottles are contaminated.

p_less2 <- phyper(1, 6, 11, 3)
p_less2
## [1] 0.7279412
print(p_less2, digits = 4)
## [1] 0.7279

Answer: 0.7279

#5 A town recently dismissed 6 employees in order to meet their new budget reductions. The town had 6 employees over 50 years of age and 19 under 50. If the dismissed employees were selected at random, what is the probability that more than 1 employee was over 50?

prob_more1 <- 1-phyper(1, 6, 19, 6)
print(prob_more1, digits = 4)
## [1] 0.4529

Answer: 0.4529

#6 The weights of steers in a herd are distributed normally. The variance is 90,000 and the
mean steer weight is 800 lbs. Find the probability that the weight of a randomly
selected steer is between 1040 and 1460 lbs.

pnorm1 <- pnorm(1460, mean = 800, sd = 300)

pnorm2 <- pnorm(1040, mean = 800, sd = 300)

finalpnorm <- pnorm1 - pnorm2
print(finalpnorm, digits = 4)
## [1] 0.198

Answer: 0.1980

#7 The diameters of ball bearings are distributed normally. The mean diameter is 106 millimeters and the standard deviation is 4 millimeters. Find the probability that the diameter of a selected bearing is between 103 and 111 millimeters.

p111 <- pnorm(111, mean = 106, sd = 4)
p103 <- pnorm(103, mean = 106, sd = 4)
finalpnorm2 <- p111 - p103
print(finalpnorm2, digits = 4)
## [1] 0.6677

Answer: 0.6677

#8 The lengths of nails produced in a factory are normally distributed with a mean of 3.34 centimeters and a standard deviation of 0.07 centimeters. Find the two lengths that separate the top 3% and the bottom 3%. These lengths could serve as limits used to identify which nails should be rejected.

bottom3 <- qnorm(.03, mean = 3.34, sd = .07)
bottom3
## [1] 3.208344
top3 <- qnorm(1-.03, mean = 3.34, sd = .07)
top3
## [1] 3.471656

Answer: Bottom 3% is 3.21 and top 3% is 3.47 - nails below or above these lengths in cm should be rejected

#9 A psychology professor assigns letter grades on a test according to the following scheme.

A: Top 9% of scores B: Scores below the top 9% and above the bottom 63% C: Scores below the top 37% and above the bottom 17% D: Scores below the top 83% and above the bottom 8% F: Bottom 8% of scores

Scores on the test are normally distributed with a mean of 75.8 and a standard deviation of 8.1. Find the minimum score required for an A grade. Round your answer to the nearest whole number, if necessary

agrade <- qnorm(1-.09, mean = 75.8, sd = 8.1)
print(agrade, digits = 1)
## [1] 87

Answer: 87

#10 Consider the probability that exactly 96 out of 155 computers will not crash in a day. Assume the probability that a given computer will not crash in a day is 61%. Approximate the (binomial) probability using the normal distribution.

q10 <-dbinom(96, 155, .61)
print(q10, digits = 4)
## [1] 0.06402

Answer: 0.0640