TITLE: The Odds 3 (or More) Group Elements Commute
QUESTION [8 upvotes]: Some time ago I asked about the odds 2 group elements commute.  I wonder about the odds that 3 group elements commute.  Is there a "closed" formula for the sum
$$ \frac{1}{|G|^3} \sum_{g,h,k} \delta([g,h]=1)\delta([h,k]=1)\delta([k,g]=1)$$
One approach, as mentioned in Kefeng Liu, might be to use the "Heat Kernel" for finite groups.
$$ H(t,x,y) = \frac{1}{|G|} \sum_{\lambda \in \mathrm{Irr}(G)} \mathrm{dim}(\lambda) \chi_\lambda(xy^{-1}) e^{-t f(\lambda)}$$
If I'm not mistaken $f(\lambda)$ is the quadratic Casimir, but not sure.  Really, for $t=0$ it reduces to the group theory identity:
$$ \delta(xy^{-1})=   \frac{1}{|G|} \sum_{\lambda \in \mathrm{Irr}(G)} \chi_\lambda(x) \overline{\chi_\lambda(y)}  = \frac{1}{|G|} \sum_{\lambda \in \mathrm{Irr}(G)} \chi_\lambda(1) \chi_\lambda(xy^{-1}) $$

REPLY [5 votes]: This question is studied in the article Isoclinism classes and commutativity degrees of finite groups by P. Lescot. The probability that $n+1$ elements of $G$ pairwise commute is called there the $n$-th commutativity degree $d_n(G)$. A kind of recursive formula for $d_n(G)$ in terms of $d_{n-1}$ of centralizers is proved (Lemma 4.1). Lescot also proves that if $G$ is not abelian then $d_n(G) \leq \frac{3 \cdot 2^n - 1}{2^{2n+1}}$ with equality if and only if $G$ is isoclinic to the quaternion group $Q_8$.