Let G be a compact group with two given subgroups H and K. Let \(\pi \) be an irreducible representation of G such that its space of H-invariant vectors as well as the space of K-invariant vectors are both one dimensional. Let \(v_H\) (resp. \(v_K\) ) denote an H-invariant (resp. K-invariant) vector of unit norm in a given G-invariant inner product \(\langle ~,~ \rangle _\pi \) on \(\pi \) . We are interested in calculating the correlation coefficient \(\begin{aligned} c(\pi \text {;}\,H,K) = |\langle v_H,v_K \rangle _\pi |^2. \end{aligned}\) In this paper, we compute the correlation coefficient of an irreducible representation of the multiplicative group of the p-adic quaternion algebra with respect to any two tori. In particular, if \(\pi \) is such an irreducible representation of odd minimal conductor with non-trivial invariant vectors for two tori H and K, then its root number \(\varepsilon (\pi )\) is \(\pm 1\) and \(c(\pi \text {;}\, H, K)\) is non-vanishing precisely when \(\varepsilon (\pi ) = 1\) .