Fix the mistake: Probability ② (Conditional Probability)

Conditional Probability ① Law of Total Probability

When B₁,B₂,… form a partition of the entire sample space:
P(A) = P(A|B₁)P(B₁) + P(A|B₂)P(B₂) + …

Example ①
Factory A (60%) has a defect rate of 2%, and Factory B (40%) has a defect rate of 5%. Probability that one product is defective:
P(defective)=0.6×0.02+0.4×0.05=0.012+0.020=0.032

Bayes' Theorem

P(B|A) = P(A|B)P(B)/P(A) (used to find the posterior probability)

Example ②
In the example above, probability that a defective product came from Factory A:
P(A|defective)=0.012/0.032=3/8

Practice Problems

  1. A box is selected by coin toss from Box 1 (3 red, 2 white) and Box 2 (1 red, 4 white), and one ball is drawn. What is the probability of a red ball?
  2. In the problem above, given that a red ball was drawn, what is the probability that it came from Box 1?
  3. P(A)=0.5、P(B|A)=0.6、P(B|Ā)=0.3. Find P(A|B).

Answers

  1. 1/2×3/5+1/2×1/5=2/5
  2. (1/2×3/5)/(2/5)=3/4
  3. P(B)=0.45 → P(A|B)=0.3/0.45=2/3