# Calculate probability of distance for d-dimensional normal

Is there any simple way to calculate the probability of distance in the following form for d-dimensional normal distribution?

$P(||\mathbf{x}-\mathbf{\mu}||^2>||\mathbf{x}-\mathbf{a}||^2)$, where $f(\mathbf{x})=N(\mathbf{\mu},\sigma^2\mathbf{I})$, $\mathbf{I}$ is the identity matrix, $||\cdot||$ is a Euclid distance.

How can I get a formula for this? Especially, can I convert this to one-dimensional normal distribution to get the value of probability?

Rewrite the expression in your $\mathbb{P}$ operator:

\begin{align} ||(x-\mu)||^2 &> ||x-a||^2 \Longleftrightarrow \\ (x-\mu)^T(x-\mu)&>(x-a)^T(x-a) \Longleftrightarrow \\ x^Tx - 2\mu x + \mu^T\mu &> x^Tx - 2a^Tx + a^Ta \Longleftrightarrow \\ 2(a^T - \mu^T)x &> a^Ta - \mu^T\mu \end{align}

And note that since $X$ is normal and $a,\mu$ are constants, $2(a^T - \mu^T)X$ will also be normal. In particular, as

$\mathbb{E}(2(a^T - \mu^T)X) = 2(a^T - \mu^T)\mu$,

$Var(2(a^T - \mu^T)X) = 2(a^T - \mu^T)^TVar(X)2(a^T - \mu^T) = 4(a - \mu)I\sigma^2(a^T - \mu^T)$,

it will hold that $\mathbb{P}(||(x-\mu)||^2 > ||x-a||^2) = \mathbb{P}(2(a^T - \mu^T)x > a^Ta - \mu^T\mu) = \mathbb{P}(R > a^Ta - \mu^T\mu)$ with

$R \sim N(2(a^T - \mu^T)\mu, 4(a - \mu)I\sigma^2(a^T - \mu^T))$.

If you know $a, \mu$ you can now find an expression for the probabilty fairly easily using the normal distribution defined by $R$.