Uploaded by Nguyễn Lê Minh Đăng

Probability Problems: Industrial & Computer Engineering

advertisement
Probability Problems in Industrial and Computer Engineering
1. Industrial Engineering: Quality Control in Manufacturing
Problem: A manufacturing process produces items, and historically, 2% of these items are
defective. To monitor quality, an engineer randomly selects 10 items from the production line.
a) What is the probability that exactly 2 items are defective?
b) What is the probability that at least 1 item is defective?
Solution: Let XX represent the number of defective items in the sample of 10. Since each item
has a 2% chance of being defective, XX follows a binomial distribution with parameters n = 10
and p = 0.02.
a) Probability that exactly 2 items are defective:
𝑃(𝑥 = 2) =
10!
(0.02)2 (0.98)8 ≈ 0.015
2! (10 − 2)!
b) Probability that at least 1 item is defective:
𝑃(𝑥 ≥ 1) = 1 − 𝑃(𝑥 = 0)
𝑃(𝑥 = 0) = (0.98)10 ≈ 0.817
𝑃(𝑥 ≥ 1) = 1 − 0.817 = 0.183
Thus, there's approximately a 1.5% chance that exactly 2 items are defective and an 18.3%
chance that at least 1 item is defective in the sample.
Reference: Engineering Probability & Statistics (AGE 1150) Chapter 1: Introduction
2. Computer Engineering: Hash Table Collision Probability
Problem: A hash table uses 10 buckets and a simple uniform hashing function. If 5 keys are
inserted into the hash table, what is the probability that at least two keys will hash to the same
bucket (i.e., a collision occurs)?
Solution: Let's calculate the probability of no collisions occurring and then subtract it from 1 to
find the probability of at least one collision.
Assuming each key hashes independently and uniformly:

The first key can go into any of the 10 buckets.

The second key also has 10 choices, but to avoid collision, it should go into a different
bucket than the first. So, 9 choices remain.

Similarly, the third key has 8 choices, the fourth has 7, and the fifth has 6 choices to
avoid collisions.
The probability of no collisions is:
𝑃(𝑛𝑜 𝑐𝑜𝑙𝑙𝑖𝑠𝑖𝑜𝑛) =
10 × 9 × 8 × 7 × 6
30240
=
= 0.3024
5
10
100000
Thus, the probability of at least one collision is:
𝑃(𝑎𝑡 𝑙𝑒𝑎𝑠𝑡 1 𝑐𝑜𝑙𝑙𝑖𝑠𝑖𝑜𝑛) = 1 − 𝑃(𝑛𝑜 𝑐𝑜𝑙𝑙𝑖𝑠𝑖𝑜𝑛) = 1 − 0.3024 = 0.6976
So, there's approximately a 69.76% chance that at least two of the 5 keys will hash to the same
bucket.
Reference: Probability for Computer Scientists
Download