# Distribution of distances to an observation from the normal and the median of these distances

Given $x\sim \mathcal{N}(\mu=0, \sigma^2=1)$, the squared distances of the $x$ values to $\mu$ are distributed $\chi^2_1$.

I am interested in the distribution of the squared distances to an arbitrary $x$. For instance, what is the distribution of the squared distances of the observations to $x=2$?

In particular, I would like to know for a given value of $x$ what the median squared distance of the observations to that $x$ is (so, the 50% quantile of that distribution) .

-

You use $x$ in two ways here, so I'm replacing the arbitrary one by $x_0$. It is noncentral chi-square with 1 df and noncentrality parameter $\lambda=x_0^2$, assuming that $\mu=0$. Note that different texts use different versions of the noncentrality parameter, e.g., some people use the square root or a factor of 2. But the version I used is the same as in the R and SAS routines for this distribution.
PS the logic of my answer is this: Consider $y\sim N(x_0,1)$, and observe that the squared distance from $y$ to $0$ has the same distribution as that of the squared distance from $x$ to $x_0$.