# pattern classification when the prior probabilities are not equal

In the case of 2 class classification, the decision boundary occurs when 2 discriminant functions are equal: $$g_1(x) = g_2(x)$$ $$g_i(x) = p(x|w_i)P(w_i)$$ $$p(x|w_i) = \mathcal{N}(x;\mu,\,\Sigma)$$

solving $$g_1(x) = g_2(x)$$ we get $w^T(x-x_0)$, where $w^T$ is $\mu_1 - \mu_2$ and $x_0$ is $1/2*(\mu_1 + \mu_2)-(\sigma^2(\mu_1 - \mu_2)/||\mu_1 - \mu_2||^2)*ln[P(w_1)/P(w_2)]$ If $P(w_1)=P(w_2)$ $x_0$ is halfway between the means, but if $P(w_1)\neq P(w_2)$ then $x_0$ shifts away from the more likely mean. My question is in the diagram the point to be classified is closer to the mean of class 2 than class 1, and the prior prob. of class 1 is 0.9 and prior prob. of class 2 is 0.1, in this case will the point be classified as class 1 or class 2?

You would still be classifying as the group with higher posterior probability. If $Y$ is the class membership indicator, $\pi_i$ the prior probability of class $i$, $f$ the density of the predictor $x$ and $i = 1, 2$ this equals
$$P(Y = i \mid x) = \frac{\pi_i f(x \mid Y = i)}{f(x)} .$$
Your classification rule (after plugging in suitable estimates for the prior probabilities and conditional densities) is then $\text{arg max}_{i \in \{1, 2 \}} \pi_i f(x \mid Y = i)$.
• The picture above is not weighting the densities according to the prior probabilities, it's only looking at the conditional distribution of $x$ given the class. Just imagine in your example that the proportion of oranges in the population is vanishingly small. Shouldn't this affect your decision to classify something as an orange? Jul 16, 2015 at 20:09