Intelligent Systems II · TEE · papers

Q1(b) Bayes posterior for red ball [5]

Re-examination · 25 Jun 2024

Actual historical paper ·100 marks attempted /140 offered · Q1 compulsory + any four of Q2–Q7. Source defects and solution assumptions are explicitly identified.

Question. Q1(b) [5 marks · 2024-06-25]

Bag A contains 3 red and 4 green balls. Bag B contains 4 red and 5 green balls. One ball is drawn at random from one of the bags and found red. Find the probability it came from Bag A.

Answer

Given

A has 7 balls, B has 9; red likelihoods 3/7 and 4/9.

To find

P(A|red).

Formula and why it applies

Reverse the direction of the evidence using Bayes. The probability of choosing each bag is a prior; the probability of red inside a chosen bag is a likelihood.

P(A\mid R)=\frac{P(R\mid A)P(A)}{P(R\mid A)P(A)+P(R\mid B)P(B)}LaTeX: P(A\mid R)=\frac{P(R\mid A)P(A)}{P(R\mid A)P(A)+P(R\mid B)P(B)}

Solution

Step 1. Weight each red likelihood by its bag prior
P(R,A)=\frac37\frac12=\frac3{14},\quad P(R,B)=\frac49\frac12=\frac29LaTeX: P(R,A)=\frac37\frac12=\frac3{14},\quad P(R,B)=\frac49\frac12=\frac29
Step 2. Add all ways to see red
P(R)=\frac3{14}+\frac29=\frac{27+28}{126}=\frac{55}{126}LaTeX: P(R)=\frac3{14}+\frac29=\frac{27+28}{126}=\frac{55}{126}
Step 3. Normalize the A contribution
P(A\mid R)=\frac{3/14}{55/126}=\frac{27}{55}\approx0.490909LaTeX: P(A\mid R)=\frac{3/14}{55/126}=\frac{27}{55}\approx0.490909
Final answer. 27/55 ≈ 0.490909 under equal bag-selection priors.