Let $X,X'$ follow the $n$ dimensional Gaussian distribution (zero mean unit variance for simplicity). My question is: what is the distribution of $Y = e^{-\|X-X'\|^2}$, particuarly when $n$ is odd?
$n$ even case: I believe I know the answer for $n$ even. We know (or at least I think I know) that $Z = \|X-X'\|^2 \sim \chi^2 (n)$, which has density: $$\rho_Z (z) = \frac{1}{2^{n/2} \Gamma (\frac{n}{2})} z^{\frac{n}{2}-1} e^{-\frac{z}{2}}$$ The density of $Y$ will therefore be: $$\begin{array}{rl} \rho_Y (y) &= \frac{dz}{dy} \rho_Z (z) \\ &= \frac{dz}{dy} \frac{1}{2^{n/2} \Gamma (\frac{n}{2})} z^{\frac{n}{2}-1} e^{-\frac{z}{2}} \end{array}$$ where $y = e^{-z}$, so $z = -\log(y)$, and: $$\begin{array}{rl} \rho_Y (y) &= -\frac{d \log(y)}{dy} \frac{1}{2^{n/2} \Gamma (\frac{n}{2})} (-1)^{\frac{n}{2}-1} \log(y)^{\frac{n}{2}-1} e^{\frac{\log(y)}{2}} \\ &= (-1)^{\frac{n}{2}} \frac{1}{2^{n/2} \Gamma (\frac{n}{2})} \sqrt{\frac{\log(y)^{n-2}}{y}} \end{array}$$
$n$ odd case: the above derivation fails as the density becomes complex, so I'm wondering if anyone could suggest a way forward? Or is the density simply ill-defined for $n$ odd? (see below)
(the closest answer I found was this one, but this only helps for $e^{\|X-X'\|^2}$, not (at least as far as I can tell) for $e^{-\|X-X'\|^2}$).
PS: also, does this distribution have a name?
UPDATE: as noted by whuber, I forgot to take the absolute value of the Jacobian. Also note that $y \in (0,1]$, so $(-\log (y))^{\frac{n}{2}-1}$ is well defined. Corrected derivation is: $$\begin{array}{rl} \rho_Y (y) &= \left| \frac{dz}{dy} \right| \rho_Z (z) \\ &= \left| \frac{dz}{dy} \right| \frac{1}{2^{n/2} \Gamma (\frac{n}{2})} z^{\frac{n}{2}-1} e^{-\frac{z}{2}} \\ &= \left| \frac{d \log(y)}{dy} \right| \frac{1}{2^{n/2} \Gamma (\frac{n}{2})} (-\log(y))^{\frac{n}{2}-1} e^{\frac{\log(y)}{2}} \\ &= \frac{1}{2^{n/2} \Gamma (\frac{n}{2})} \sqrt{\frac{(-\log(y))^{n-2}}{y}} \end{array}$$