TITLE: What relationship, if any, is there between the diameter of the Cayley graph and the average distance between group elements?
QUESTION [26 upvotes]: It's known that every position of Rubik's cube can be solved in 20 moves or less.  That page includes a nice table of the number of positions of Rubik's cube which can be solved in k moves, for $k = 0, 1, \ldots, 20$. (Some of the entries of the table are approximations, but they're good enough for the purposes of this question.)
In particular, the median number of moves needed is 18, and in fact about 70 percent of all positions require eighteen moves.
This seems a bit counterintuitive to me -- I'd expect the median to be around half the maximum number of moves needed. Consider for example generating $S_n$, the symmetric group on $n$ elements, from the adjacent transpositions $(k, k+1)$ for $k = 1, 2, \ldots, n-1$. The number of such transpositions needed to get from the identity permutation to any permutation $\sigma$ using adjacent transpositions is the number of inversions of that permutation -- that is, the number of pairs $(i,j)$ such that $i < j$ and $\sigma(i) > \sigma(j)$. The maximum number of inversions of a permutation in $S_n$ is ${n \choose 2}$. The mean is ${1 \over 2} {n \choose 2}$; this is also the median if it's a whole number; and the distribution is symmetric around ${1 \over 2} {n \choose 2}$. Another similar case is $(Z/2Z)^n$ generated by the generators of the factors -- the diameter is $n$, the typical distance between elements is $n/2$.
My question: which of these situations is, in some sense, "more typical"? More formally, what's known about the relationship between the diameter of the Cayley graph of a group and the typical distance between two vertices? And is there a third case, where the median or mean distance between two random elements is less than half the diameter? Here I'm looking for something like the distribution of Erdos numbers as given by Grossman -- the maximum Erdos number is 15 but the median is only 5 -- although of course there is the complication here that the collaboration graph is very far from being vertex-transitive.

REPLY [16 votes]: To expand on JSE's answer a bit: for simple finite groups of Lie type, the Gowers "quasirandom groups" argument with the additional trick of Nikolov-Pyber shows that once one has generated $|G|^{1-\delta}$ elements, three times that many steps give the whole group, for some $\delta>0$ which depends only on the Lie rank of the group (I think it is $1/9$ or so for $SL_2$). I've just written this up for my representation theory class
https://people.math.ethz.ch/~kowalski/representation-theory.pdf (Wayback Machine)
(section 4.7.1).
Such ideas are also already present in the work of Helfgott on growth in $SL_2$ -- part (b) of his "Key proposition" -- but the sharp constant $3$ was not; the crucial group-theoretic idea in the argument of Gowers is the use of the large size of a non-trivial representation of the group.