$P(|x - \mu_1| < |x-\mu_2|)$ for two Gaussian distributions with identical $\sigma^2$

57 Views Asked by At

I've derived a Bayesian decision boundary for a two-category decision problem such that I choose a given category if $P(|x - \mu_1| < |x-\mu_2|)$. I'm trying to find the probability of this for two Gaussian distributions $N(\mu_i, \sigma^2)$,

$$p(x)=\frac{\exp[-\frac{1}{2}](\frac{x-\mu_i}{\sigma})^2]}{\sqrt{2\pi}\sigma}$$

I'm a bit rusty on my stats and I'm not quite remembering how I might find $P(|x - \mu_1| < |x-\mu_2|)$, could anyone point me in the right direction?

1

There are 1 best solutions below

0
On BEST ANSWER

I suspect you want

$$\text{Pr}\left(\left| x_i-\mu_1\right| < \left| x_i-\mu_2\right|\right)$$

for $i=1$ and $i=2$.

This answer doesn't "point you in the right direction" but gives you the answer from using Mathematica:

If $\mu_1=\mu_2$, then the probability is zero for both $i=1$ and $i=2$. If $\mu_1<\mu_2$, then for $i=1$ the probability is $\Phi \left(\frac{\mu_2-\mu_1}{2 \sigma }\right)$ while for $i=2$ the probability is $1-\Phi \left(\frac{\mu_2-\mu_1}{2 \sigma }\right)$. If $\mu_1>\mu_2$, then for $i=1$ the probability is $1-\Phi \left(\frac{\mu_2-\mu_1}{2 \sigma }\right)$ and for $i=2$ the probability is $\Phi \left(\frac{\mu_2-\mu_1}{2 \sigma }\right)$ with $\Phi(\cdot)$ being the standard normal cumulative distribution function.

The Mathematica code displays as the following:

Image of Mathematica code

The actual code is

(* i = 1 *)
FullSimplify[
 Probability[Abs[x - μ1] < Abs[x - μ2], 
    x \[Distributed] NormalDistribution[μ1, σ],
    Assumptions -> {σ > 0, μ1 ∈ Reals, μ2 ∈ Reals}] /.
   Erf[z_] -> 1 - Erfc[z] /. Erfc[z_] -> 2 Φ[-Sqrt[2] z]]

(* i = 2 *)
FullSimplify[
 Probability[Abs[x - μ1] < Abs[x - μ2], 
    x \[Distributed] NormalDistribution[μ2, σ],
    Assumptions -> {σ > 0, μ1 ∈ Reals, μ2 ∈ Reals}] /.
   Erf[z_] -> 1 - Erfc[z] /. Erfc[z_] -> 2 Φ[-Sqrt[2] z]]