  Let $\mu$ be a Frostman measure on $E\subset\mathbb{R}^d$. The spherical
average decay $$\int_{S^{d-1}}|\widehat{\mu}(r\omega)|^2\,d\omega\lesssim
r^{-\beta} $$ was originally used to attack Falconer distance conjecture, via
Mattila's integral. In this paper we consider the pinned distance problem, a
stronger version of Falconer distance problem, and show that spherical average
decay implies the same dimensional threshold on both of them. In particular,
with the best known spherical average estimates, we improve Peres-Schlag's
result on pinned distance problem significantly.
  The idea is to reduce the pinned distance problem to an integral where
spherical averages apply. The key ingredient is the following identity. Using a
group action argument, we show that for any Schwartz function $f$ on
$\mathbb{R}^d$ and any $x\in\mathbb{R}^d$, $$\int_0^\infty
|\omega_t*f(x)|^2\,t^{d-1}dt\,=\int_0^\infty|\widehat{\omega_r}*f(x)|^2\,r^{d-1}dr,$$
where $\omega_r$ is the normalized surface measure on $r S^{d-1}$. An
interesting remark is that the right hand side can be easily seen equal to
$$c_d\int\left|D_x^{-\frac{d-1}{2}}e^{-2\pi i
t\sqrt{-\Delta}}f(x)\right|^2\,dt=c_d'\int\left|D_x^{-\frac{d-2}{2}}e^{2\pi i
t\Delta}f(x)\right|^2\,dt.$$ An alternative derivation of Mattila's integral
via group actions is also given in the Appendix.
