  For any (Hausdorff) compact group $G$ with the normalized Haar measure
${\mathbf m}_G$, denote by ${\rm cp}(G)$ the probability ${\mathbf m}_{G\times
G}(\{(x,y)\in G\times G \;|\; xy=yx\})$ of commuting a randomly chosen pair of
elements of $G$. Here we prove that if ${\rm cp}(G)>0$, then there exists a
finite group $H$ such that ${\rm cp}(G)= \frac{{\rm cp}(H)}{|G:F|^2}$, where
$F$ is the FC-center of $G$ i.e. the set of all elements of $G$ whose conjugacy
classes are finite and $H$ is isoclinic to $F$ with ${\rm cp}(F)={\rm cp}(H)$.
The latter equality enables one to transfer many existing results concerning
commuting probability of finite groups to one of compact groups. For example,
here for a compact group $G$ we prove that if ${\rm cp}(G)>\frac{3}{40}$ then
either $G$ is solvable or, else $G\cong A_5 \times T$ for some abelian group
$T$, in which case ${\rm cp}(G)=\frac{1}{12}$; where $A_5$ denotes the
alternating group of degree $5$.
