GATE DA 2025 | Question 35

NAT · 1 mark

The naive Bayes classifier is used to solve a two-class classification problem with class-labels \(y_1, y_2\). Suppose the prior probabilities are \(P(y_1) = \frac{1}{3}\) and \(P(y_2) = \frac{2}{3}\). Assuming a discrete feature space with

\[P(x|y_1) = \frac{3}{4} \quad \text{and} \quad P(x|y_2) = \frac{1}{4}\]

for a specific feature vector \(x\). The probability of misclassifying \(x\) is __________
(Round off to two decimal places)

Answer

0.39 to 0.41

Explanation

Naive Bayes compares prior times likelihood for the two classes:

  • \(P(y_1)P(x|y_1) = \frac{1}{3} \cdot \frac{3}{4} = \frac{1}{4}\)
  • \(P(y_2)P(x|y_2) = \frac{2}{3} \cdot \frac{1}{4} = \frac{1}{6}\)

So \(P(x) = \frac{1}{4} + \frac{1}{6} = \frac{5}{12}\), giving posteriors \(P(y_1|x) = \frac{3}{5}\) and \(P(y_2|x) = \frac{2}{5}\). The classifier picks the larger posterior, \(y_1\), and it is wrong exactly when \(x\) really belongs to \(y_2\), which has probability \(P(y_2|x) = 0.40\). The larger prior of \(y_2\) is outweighed by the much higher likelihood under \(y_1\).

Answer: 0.40