Insight: The log-odds is the sum of the log-prior ratio and the log-likelihood ratios of each feature. For Gaussian NB, each feature's contribution is a simple quadratic difference. The probability is then just the sigmoid of the log-odds.
Exam route: Compute lnP(xi∣C1)−lnP(xi∣C0) for i=1,2. Sum them up to get the log-odds L. Then P(C1∣x)=1+eLeL.
Learning route:
Step 1 (why this method): The statement asks for the log-odds and the posterior probability. By definition, the log-odds is L=lnP(C0∣x)P(C1∣x). Using Bayes' theorem and the conditional independence of features:
L=lnP(C0)P(C1)+i=1∑2lnP(xi∣C0)P(xi∣C1).
Since priors are equal, the first term is 0. We just need to sum the log-likelihood ratios for each feature.
Step 2 (compute feature 1 contribution):
lnP(x1∣C1)=−21ln(2π)−2(1−2)2=−21ln(2π)−0.5.
lnP(x1∣C0)=−21ln(2π)−2(1−0)2=−21ln(2π)−0.5.
Difference for x1: (−0.5)−(−0.5)=0.
Step 3 (compute feature 2 contribution):
lnP(x2∣C1)=−21ln(2π)−2(1−(−2))2=−21ln(2π)−4.5.
lnP(x2∣C0)=−21ln(2π)−2(1−0)2=−21ln(2π)−0.5.
Difference for x2: (−4.5)−(−0.5)=−4.
Step 4 (combine and convert to probability):
Total log-odds L=0+(−4)=−4.
The posterior probability is:
P(C1∣x)=1+eLeL=1+e−4e−4.
Answer: Options A and C.
The tempting wrong path: A student might drop the negative sign in the Gaussian exponent, computing (1−(−2))2/2=4.5 but then adding it instead of subtracting, leading to a log-odds of +4 (Option B). Another common mistake is confusing P(C1∣x) with P(C0∣x), or using e−L in the numerator, which leads to 1+e−41 (Option D). The break in both cases is in Step 4: the sigmoid function is strictly 1+eLeL, and the sign of L determines which class is more probable.
Generalisation: For Gaussian NB, the log-likelihood ratio for a feature is −2σ2(x−μ1)2+2σ2(x−μ0)2. If the variances are equal, this simplifies to a linear function of x.
Verification: Since L=−4<0, we must have P(C1∣x)<0.5. Option C gives 1+e−4e−4≈1.0180.018≈0.018, which is indeed <0.5. Option D gives ≈0.982, which would imply L>0, a contradiction.