Commuting fraction

In terms of probability of satisfaction of a word
The commuting fraction of a finite group is defined as the probability of satisfaction of the commutator as a word. Note that it does not matter which of the conventions (left or right) we choose to define the commutator. With the left convention, the commutator is $$xyx^{-1}y^{-1}$$, and with the right convention, the commutator is $$x^{-1}y^{-1}xy$$.

In terms of fraction of pairs that commute
For a finite group $$G$$, define:

$$CP(G) := \{ (x,y) \in G^2 \mid xy = yx \}$$

The commuting fraction or commuting probability of $$G$$ is the quotient:

$$\frac{|CP(G)|}{|G|^2}$$

It can also be viewed as the probability that two elements of the group, picked independently uniformly at random, commute.

Note that:

$$|CP(G)| = \sum_{g \in G} |C_G(g)|$$

So the commuting fraction of $$G$$ can be written as:

$$\sum_{g \in G} \frac{|C_G(g)|}{|G|^2}$$

Note that this can also be written as follows, where $$Z(G)$$ is the center of $$G$$:

$$\sum_{g \in Z(G)} \frac{|C_G(g)|}{|G|^2} + \sum_{g \in G \setminus Z(G)} \frac{|C_G(g)|}{|G|^2}$$

This simplifies to:

$$\frac{|Z(G)|}{|G|} + \sum_{g \in G \setminus Z(G)} \frac{|C_G(g)|}{|G|^2}$$

In terms of number of conjugacy classes
The commuting fraction of a finite group is defined as the quotient of its defining ingredient::number of conjugacy classes by its order.

In terms of index of centralizers
This formulation has the advantage that, in addition to making sense for a finite group, it also makes sense for a defining ingredient::FZ-group, i.e., a group whose center has finite index, i.e., the inner automorphism group is a finite group. If the whole group is finite, it agrees with the usual definition.

The commuting fraction is defined as:

$$\frac{1}{[G:Z(G)]} \sum_{t \in T} \frac{1}{[G:C_G(t)]}$$

where $$[G:H]$$ denotes the index of $$H$$ in $$G$$, $$Z(G)$$ denotes the defining ingredient::center of $$G$$, $$T$$ is a left transversal for $$Z(G)$$ in $$G$$, and $$C_G(t)$$ is the defining ingredient::centralizer of $$t$$ in $$G$$. Note that this involves a finite sum of finite numbers, hence it makes sense.

Also, since any two elements in the same coset of $$Z(G)$$ in $$G$$ have the same centralizer, $$C_G(t)$$ depends only on the coset of $$t$$, and the sum is hence independent of the choice of $$T$$.

Equivalence of definitions
The equivalence follows from the orbit-counting theorem.

Relation with subgroups, quotients, and direct products

 * Commuting fraction in subgroup is at least as much as in whole group
 * Commuting fraction in quotient group is at least as much as in whole group
 * Commuting fraction of direct product is product of commuting fractions
 * Commuting fraction of extension group is bounded by product of commuting fractions of normal subgroup and quotient group

High values of commuting fraction and indication of abelianness

 * A group is abelian if and only if its commuting fraction is $$1$$.
 * Commuting fraction more than five-eighths implies abelian
 * Commuting fraction equals five-eighths iff inner automorphism group is Klein four-group

Particular cases
Here are the commuting fractions for some non-abelian groups of small order. Note that all abelian groups have commuting fraction equal to $$1$$, so these are omitted from the list. Note that the commuting fraction is the quotient of the number of conjugacy classes to the order of the group.