GATE 2025 DA – Question 35
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}$ and $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*)
Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: 0.39 to 0.41
Explanation
The posterior is proportional to $P(x \mid y)P(y)$: for $y_1$ it is $\frac{3}{4} \times \frac{1}{3} = \frac{1}{4}$ and for $y_2$ it is $\frac{1}{4} \times \frac{2}{3} = \frac{1}{6}$. The total is $\frac{5}{12}$, so $P(y_1 \mid x) = \frac{1/4}{5/12} = 0.6$ and $P(y_2 \mid x) = 0.4$. The classifier chooses $y_1$, and it is wrong with the probability of the other class, 0.40.