A Bayes rule in one dimension

Class 1 is \operatorname{N}(0,1) with prior 0.7 and class 2 is \operatorname{N}(2,1) with prior 0.3. Find the Bayes decision boundary and the Bayes error rate \sum_g\pi_g\mathrm{Err}_g.

At the boundary the two posterior numerators tie. Solve that equality, check which class wins on each side, and then integrate the two error regions. The boundary solves \pi_1 f_1(x)=\pi_2 f_2(x):

0.7\,e^{-x^2/2}=0.3\,e^{-(x-2)^2/2}.

Taking logarithms,

\ln(0.7/0.3) =\tfrac12\bigl[x^2-(x-2)^2\bigr] =\tfrac12(4x-4) =2x-2,

so

x^*=1+\tfrac12\ln(7/3)=1.4236.

Class 1 is predicted for x<x^*. The error rate is

\begin{align*} \sum_g\pi_g\mathrm{Err}_g &=0.7\,\mathbb{P}(X>x^*\mid Y=1)+0.3\,\mathbb{P}(X<x^*\mid Y=2)\\ &=0.7\bigl[1-\Phi(1.4236)\bigr]+0.3\,\Phi(1.4236-2)\\ &=0.7\times 0.0773+0.3\times 0.2822 =0.0541+0.0847 =0.139. \end{align*}

The unequal priors move the boundary away from the midpoint 1, toward the less probable class.