In one dimension, class 1 has density N(0,1) and class 2 has density N(0,4) (variance 4), with equal priors. Where are the Bayes decision boundaries, and which class is chosen in each region? Why is the boundary not a single point?

Supervised learning, Quadratic discriminant analysis
Level L3 Intermediate. Length Medium. Nature Mat Mathematical.

What's being asked

Whether you can equate two Gaussian discriminants with different variances and solve the resulting quadratic.

Key idea

With unequal variances the x2 terms do not cancel, so g1(x)=g2(x) is a quadratic and can have two roots.

Steps

  1. Discriminant gk(x)=−(x−μk)22σk2−ln⁡σk+ln⁡P(Ck) (dropping the common −12ln⁡2π). Priors are equal, so they cancel.
  2. With μ=0: g1(x)=−x22 (since ln⁡1=0) and g2(x)=−x28−ln⁡2 (since σ2=2).
  3. Class 1 wins when −x22>−x28−ln⁡2. Rearranging: ln⁡2>x22−x28=3x28.
  4. So x2<8ln⁡23≈1.848, giving ∣x∣<1.360.
  5. Decision: class 1 for ∣x∣<1.36 and class 2 for ∣x∣>1.36. The boundaries are x=±1.36.
  6. Why two points: the narrow Gaussian is taller near the centre but dies off faster. Far out in either tail the wider class 2 density is larger. So class 1 owns only a middle interval, and the region of class 2 is disconnected.

Common mistakes

How long your answer should be

Half a page; 4 minutes.

Last checked on 4 December 2026.

Read this

Previous in Supervised learning: In Gaussian discriminant analysis with x∣y=k∼N(μk,Σ) (the same Σ for both classes) and P(y=1)=ϕ, show that P(y=1∣x)=σ(w⊤x+b), the logistic function of a linear function of x. Give w and b. For μ0=0, μ1=2, Σ=1, ϕ=0.5 in one dimension, what is P(y=1∣x=1.5)?
Next in Supervised learning: A Gaussian naive Bayes classifier has two classes. Class A has prior 0.6, feature means (1,2) and feature variances (1,4). Class B has prior 0.4, means (3,0) and variances (1,1). Which class is the point x=(2,1) assigned to?