  Consider a group word w in n letters. For a compact group G, w induces a map
G^n \rightarrow G$ and thus a pushforward measure {\mu}_w on G from the Haar
measure on G^n. We associate to each word w a 2-dimensional cell complex X(w)
and prove in Theorem 2.5 that {\mu}_w is determined by the topology of X(w).
The proof makes use of non-abelian cohomology and Nielsen's classification of
automorphisms of free groups [Nie24]. Focusing on the case when X(w) is a
surface, we rediscover representation-theoretic formulas for {\mu}_w that were
derived by Witten in the context of quantum gauge theory [Wit91]. These
formulas generalize a result of Erd\H{o}s and Tur\'an on the probability that
two random elements of a finite group commute [ET68]. As another corollary, we
give an elementary proof that the dimension of an irreducible complex
representation of a finite group divides the order of the group; the only
ingredients are Schur's lemma, basic counting, and a divisibility argument.
