Chapter 3: Baye's Theorem

Bayes’ Theorem Explained with Detailed Solved Examples

Bayes’ Theorem is one of the most important concepts in probability theory. It helps us determine the probability of an event based on prior information. In this article, we explain the theorem and solve 4 detailed examples of Bayes’ Theorem step by step.

Bayes’ Theorem Formula

If \(A_1,A_2,\dots,A_n\) are mutually exclusive and exhaustive events, then:

\[ P(A_i|B)=\frac{P(A_i)P(B|A_i)}{\sum P(A_i)P(B|A_i)} \]

For two events \(A\) and \(B\):

\[ P(A|B)=\frac{P(A)P(B|A)}{P(B)} \]

Solved Examples of Bayes’ Theorem

Example 1: Probability of Selecting the First Bag

A bag contains 3 red and 2 blue balls. Another bag contains 4 red and 6 blue balls. One bag is chosen at random, and a red ball is drawn. Find the probability that it came from the first bag.

\[ P(A_1)=P(A_2)=\frac12 \] \[ P(B|A_1)=\frac35,\quad P(B|A_2)=\frac25 \] Using Bayes’ theorem: \[ P(A_1|B)=\frac{\frac12\cdot\frac35}{\frac12\cdot\frac35+\frac12\cdot\frac25} \] \[ =\frac{3/10}{5/10}=\frac35 \]

Final Answer: \(\boxed{\frac35}\)

Example 2: Probability a Defective Bulb Came from Machine B

Machine A produces 60% of bulbs and Machine B produces 40%. Their defect rates are 2% and 5% respectively. Find the probability that a defective bulb came from Machine B.

\[ P(A)=0.6,\quad P(B)=0.4 \] \[ P(D|A)=0.02,\quad P(D|B)=0.05 \] \[ P(B|D)=\frac{0.4\times0.05}{0.6\times0.02+0.4\times0.05} \] \[ =\frac{0.02}{0.032}=0.625 \]

Final Answer: \(\boxed{0.625}\)

Example 3: Probability of Having a Disease After Testing Positive

A disease affects 1% of the population. A test is 99% accurate. If a person tests positive, what is the probability they actually have the disease?

\[ P(D)=0.01,\quad P(D^c)=0.99 \] \[ P(T|D)=0.99,\quad P(T|D^c)=0.01 \] \[ P(D|T)=\frac{0.01\times0.99}{0.01\times0.99+0.99\times0.01} \] \[ =\frac{0.0099}{0.0198}=0.5 \]

Final Answer: \(\boxed{0.5}\)

Example 4: Probability of Selecting Urn II

Urn I contains 2 white and 3 black balls, and Urn II contains 4 white and 1 black ball. A white ball is drawn. Find the probability that Urn II was selected.

\[ P(U_1)=P(U_2)=\frac12 \] \[ P(W|U_1)=\frac25,\quad P(W|U_2)=\frac45 \] \[ P(U_2|W)=\frac{\frac12\cdot\frac45}{\frac12\cdot\frac25+\frac12\cdot\frac45} \] \[ =\frac{4/10}{6/10}=\frac23 \]

Final Answer: \(\boxed{\frac23}\)

More Solved Examples of Bayes’ Theorem

Example 5: Choosing a Coin

Box I contains 2 gold coins and 3 silver coins. Box II contains 4 gold coins and 1 silver coin. One box is chosen at random, and a gold coin is drawn. Find the probability that the coin came from Box II.

Solution:

Let:
  • \(B_1\): Box I is chosen
  • \(B_2\): Box II is chosen
  • \(G\): Gold coin is drawn
\[ P(B_1)=P(B_2)=\frac12 \] \[ P(G|B_1)=\frac25,\quad P(G|B_2)=\frac45 \] Using Bayes’ theorem: \[ P(B_2|G)=\frac{P(B_2)P(G|B_2)}{P(B_1)P(G|B_1)+P(B_2)P(G|B_2)} \] \[ =\frac{\frac12\times\frac45}{\frac12\times\frac25+\frac12\times\frac45} \] \[ =\frac{4/10}{2/10+4/10} \] \[ =\frac{4/10}{6/10}=\frac23 \]

Final Answer: \(\boxed{\frac23}\)

Example 6: Student Passing Probability

In a college, 70% of students are undergraduates and 30% are postgraduates. The probability of passing an exam is 0.8 for undergraduates and 0.9 for postgraduates. If a student passes, what is the probability that the student is a postgraduate?

Solution:

Let:
  • \(U\): student is undergraduate
  • \(P\): student is postgraduate
  • \(E\): student passes exam
\[ P(U)=0.7,\quad P(P)=0.3 \] \[ P(E|U)=0.8,\quad P(E|P)=0.9 \] By Bayes’ theorem: \[ P(P|E)=\frac{P(P)P(E|P)}{P(U)P(E|U)+P(P)P(E|P)} \] \[ =\frac{0.3\times0.9}{0.7\times0.8+0.3\times0.9} \] \[ =\frac{0.27}{0.56+0.27} \] \[ =\frac{0.27}{0.83}=0.3253 \]

Final Answer: \(\boxed{0.3253}\)

Example 7: Factory Defect Analysis

A factory has three machines producing bulbs:

  • Machine A produces 30% with 1% defect
  • Machine B produces 45% with 2% defect
  • Machine C produces 25% with 3% defect

If a bulb selected is defective, find the probability it was made by Machine C.

Solution:

Let \(D\) be the event that the bulb is defective. \[ P(A)=0.30,\quad P(B)=0.45,\quad P(C)=0.25 \] \[ P(D|A)=0.01,\quad P(D|B)=0.02,\quad P(D|C)=0.03 \] Using Bayes’ theorem: \[ P(C|D)=\frac{P(C)P(D|C)}{P(A)P(D|A)+P(B)P(D|B)+P(C)P(D|C)} \] \[ =\frac{0.25\times0.03}{0.30\times0.01+0.45\times0.02+0.25\times0.03} \] \[ =\frac{0.0075}{0.003+0.009+0.0075} \] \[ =\frac{0.0075}{0.0195}=0.3846 \]

Final Answer: \(\boxed{0.3846}\)

Example 8: Insurance Claim Probability

An insurance company has 60% male policyholders and 40% female policyholders. The probability of making a claim is 0.1 for males and 0.05 for females. If a policyholder makes a claim, what is the probability that the policyholder is female?

Solution:

Let:
  • \(M\): policyholder is male
  • \(F\): policyholder is female
  • \(C\): policyholder makes a claim
\[ P(M)=0.6,\quad P(F)=0.4 \] \[ P(C|M)=0.1,\quad P(C|F)=0.05 \] By Bayes’ theorem: \[ P(F|C)=\frac{P(F)P(C|F)}{P(M)P(C|M)+P(F)P(C|F)} \] \[ =\frac{0.4\times0.05}{0.6\times0.1+0.4\times0.05} \] \[ =\frac{0.02}{0.06+0.02} \] \[ =\frac{0.02}{0.08}=0.25 \]

Final Answer: \(\boxed{0.25}\)

Conclusion

These Bayes’ theorem solved examples demonstrate how prior probabilities and conditional probabilities combine to determine posterior probabilities. This theorem is widely used in statistics, machine learning, medical diagnosis, and decision-making.

No comments:

Post a Comment

Assignment: Probability and Statistics Basic

Sticky Ad Probability Problems with Detailed Solutions Click each question to expand the detailed interpretation and solution. ...