In a particular manufacturing plant, two machines (A and B) produce a particular part. One machine (B) is newer and faster. In one five-minute period, a lot consisting of 32 parts is produced. Twenty-two are produced by machine B and the rest by machine A. Suppose an inspector randomly samples a dozen of the parts from this lot.

a. What is the probability that exactly two parts were produced by machine A?
b. What is the probability that half of the parts were produced by each machine?
c. What is the probability that all of the parts were produced by machine B?
d. What is the probability that seven, eight, or nine parts were produced by machine B?

To solve this problem, we need to use the concept of probability and the binomial probability formula. The binomial probability formula is given by:

P(X = k) = C(n, k) * p^k * (1-p)^(n-k)

where:
- P(X = k) is the probability of having exactly k successes (in this case, parts produced by machine A)
- n is the total number of trials (in this case, the number of parts inspected)
- k is the number of successes (in this case, parts produced by machine A)
- p is the probability of success (in this case, probability of a part being produced by machine A)
- (1-p) is the probability of failure (in this case, probability of a part being produced by machine B)
- C(n, k) is the number of combinations of n items taken k at a time (n choose k)

a. To calculate the probability that exactly two parts were produced by machine A, we have:
- n = 12 (the number of parts inspected)
- k = 2 (the number of parts produced by machine A)
- p = (number of parts produced by machine A) / (total number of parts) = (32 - 22) / 32 = 10/32 = 5/16

Plugging these values into the binomial probability formula:

P(X = 2) = C(12, 2) * (5/16)^2 * (1 - 5/16)^(12-2)

Simplifying the formula:

P(X = 2) = (12! / (2!(12-2)!)) * (5/16)^2 * (11/16)^10

Using a calculator or software to compute the factorial, we can find the value of C(12, 2) as 66:

P(X = 2) = 66 * (5/16)^2 * (11/16)^10

Calculating this expression will give us the probability.

b. To calculate the probability that half of the parts were produced by each machine, we have:
- n = 12 (the number of parts inspected)
- k = 6 (the number of parts produced by machine A)
- p = 5/16 (probability of a part being produced by machine A)

Using the same formula as before, we can plug these values in and calculate the probability.

c. To calculate the probability that all parts were produced by machine B, we have:
- n = 12 (the number of parts inspected)
- k = 0 (the number of parts produced by machine A)
- p = 5/16 (probability of a part being produced by machine A)

Again, we can use the binomial probability formula and calculate the probability.

d. To calculate the probability that seven, eight, or nine parts were produced by machine B, we need to calculate the individual probabilities for each value and then sum them up. Using the binomial probability formula for each value of k (7, 8, and 9), we can find the probabilities and add them together.

Note: It is crucial to remember that the probabilities calculated in this problem assume a random sampling process and that the proportions observed in this sample are reflective of the overall production proportions.