# Parameters
n <- 20
p <- 0.50
k_values <- 9:12

# Calculate binomial probabilities for each k
probabilities <- dbinom(k_values, n, p)

# Sum the probabilities
total_probability <- sum(probabilities)
ans <- round(total_probability, 4)
print(ans)
## [1] 0.6167

So, there’s a 61.67% chance that between 9 and 12 buyers out of the 20 randomly selected would prefer the color red.

n <- 13
p <- 0.20
k_values <- 4:5

# Calculate binomial probabilities for each k
probabilities <- dbinom(k_values, n, p)

# Sum the probabilities
total_probability <- sum(probabilities)
ans <- round(total_probability, 4)
print(ans)
## [1] 0.2226

So, there’s a 22.26% chance that less than 6 but more than 3 bulbs out of the 13 sampled are defective.

lambda <- 4.2
k_values <- 0:3

# Calculate Poisson probabilities for each k
probabilities <- dpois(k_values, lambda)

# Sum the probabilities
total_probability <- sum(probabilities)
ans <- round(total_probability, 4)
print(ans)
## [1] 0.3954

So, there’s a 39.54% chance that, for any given day, the number of special orders sent out by the auto parts department will be no more than 3.

N <- 17
K <- 6
n <- 3
k_values <- 0:1

# Calculate hypergeometric probabilities for each k
probabilities <- dhyper(k_values, K, N-K, n)

# Sum the probabilities
total_probability <- sum(probabilities)
ans <- round(total_probability, 4)
print(ans)
## [1] 0.7279

So, there’s a 72.79% chance that less than 2 of the 3 tested bottles are contaminated.

N <- 25
K <- 6
n <- 6
k_values <- 2:6

# Calculate hypergeometric probabilities for each k
probabilities <- dhyper(k_values, K, N-K, n)

# Sum the probabilities
total_probability <- sum(probabilities)
ans <- round(total_probability, 4)
print(ans)
## [1] 0.4529

So, there’s a 45.29% chance that more than 1 of the 6 dismissed employees was over 50 years of age.

mu <- 800
sigma <- sqrt(90000)

# Calculate z-scores for the given weights
z_1040 <- (1040 - mu) / sigma
z_1460 <- (1460 - mu) / sigma

# Calculate the probabilities using the pnorm function
prob_1040 <- pnorm(z_1040)
prob_1460 <- pnorm(z_1460)

# Find the probability that the weight is between 1040 and 1460 lbs
probability <- prob_1460 - prob_1040
ans <- round(probability, 4)
print(ans)
## [1] 0.198

So, there’s a 19.80% chance that the weight of a randomly selected steer is between 1040 and 1460 lbs.

mu <- 106
sigma <- 4

# Calculate z-scores for the given diameters
z_103 <- (103 - mu) / sigma
z_111 <- (111 - mu) / sigma

# Calculate the probabilities using the pnorm function
prob_103 <- pnorm(z_103)
prob_111 <- pnorm(z_111)

# Find the probability that the diameter is between 103 and 111 millimeters
probability <- prob_111 - prob_103
ans <- round(probability, 4)
print(ans)
## [1] 0.6677

So, there’s a 66.77% chance that the diameter of a randomly selected bearing is between 103 and 111 millimeters.

mu <- 3.34
sigma <- 0.07

# Find the length that separates the bottom 3%
L1 <- qnorm(0.03, mu, sigma)

# Find the length that separates the top 3%
L2 <- qnorm(0.97, mu, sigma)
ans1 <- round(L1, 2)
ans2 <- round(L2, 2)
print(ans1)
## [1] 3.21
print(ans2)
## [1] 3.47

So, nails with lengths less than approximately 3.21 centimeters or greater than approximately 3.47 centimeters should be rejected, as they fall in the bottom 3% or top 3% of the length distribution, respectively.

mu <- 75.8
sigma <- 8.1

# Find the score that separates the top 9%
S <- qnorm(0.91, mu, sigma)
ans <- round(S, 0)
print(ans)
## [1] 87

So, students would need a score of at least 87 to earn an A grade on the test.

n <- 155
p <- 0.61
mu <- n * p
sigma <- sqrt(n * p * (1 - p))

# Using continuity correction
z_lower <- (95.5 - mu) / sigma
z_upper <- (96.5 - mu) / sigma

# Calculate the probabilities using the pnorm function
prob_lower <- pnorm(z_lower)
prob_upper <- pnorm(z_upper)

# Find the probability that exactly 96 computers will not crash
probability <- prob_upper - prob_lower
ans <- round(probability, 4)
print(ans)
## [1] 0.0638

So, there’s a 6.36% chance that exactly 96 out of the 155 computers will not crash in a day when using the normal distribution to approximate the binomial probability.