A feature x has class-conditional densities N(μ1=1,σ2=4) for class C1 and N(μ2=5,σ2=4) for class C2, with priors P(C1)=0.8 and P(C2)=0.2. For equal-variance 1-D Gaussians, the Bayes decision boundary is x∗=μ1+μ22+σ2μ2−μ1ln⁡P(C1)P(C2). What is x∗, which class is predicted for x=4, and how does the unequal prior shift the boundary?

Supervised learning, Bayes decision theory
Level L2 Elementary. Length Medium. Nature Mat Mathematical.

What's being asked

Whether you can apply the 1-D equal-variance Gaussian Bayes boundary formula and see how a higher prior widens that class's decision region.

Key idea

The boundary x∗=μ1+μ22+σ2μ2−μ1ln⁡P(C1)P(C2) equals the midpoint between the class means plus a shift from the class priors. When P(C1)>P(C2), the boundary shifts towards μ2 so more inputs fall in the C1 region.

Steps

  1. Compute the equal-prior midpoint: μ1+μ22=1+52=3. If both classes had prior 0.5, we would simply predict the closer mean.
  2. Compute the prior shift: σ2μ2−μ1ln⁡P(C1)P(C2)=45−1ln⁡0.80.2=1×ln⁡4≈1.386. Note that σ2=4 is the variance, not the standard deviation σ=2.
  3. Add them to get the Bayes boundary: x∗=3+1.386=4.386. Since μ1<μ2, we predict C1 for x<4.386 and C2 for x>4.386.
  4. Classify x=4 and interpret the shift: because 4<4.386, we predict C1. With equal priors the boundary was 3 and x=4 would be assigned to C2, so the large prior on C1 pushes the boundary towards C2 (deriving this formula from the Gaussian log-densities comes next).

Common mistakes

How long your answer should be

A few lines of arithmetic and a short comparison; 2–3 minutes.

Read this

Previous in Supervised learning: Write the hinge loss and the logistic loss as functions of the margin m=t f(x), where t∈{−1,+1} is the label and f(x) the classifier's score, and evaluate both at m=−1,0,1,2. What does the difference in their shapes mean for the classifiers they produce?
Next in Supervised learning: A screening test must decide between "disease" (D) and "healthy" (H). The loss is 0 for a correct decision, 20 for declaring "healthy" when the person has the disease, and 1 for declaring "disease" when the person is healthy. For one patient the posterior is P(D∣x)=0.1. Which decision minimises the expected loss, and above what posterior probability of disease should we declare "disease"?