Random Permutations (Part 9)
Posted by John Baez
In our quest to understand the true nature of random permutations, Part 7 took us into a deeper stratum: their connection to Poisson distributions. I listed a few surprising facts. For example, these are the same:
- The probability that raindrops land on your head in a minute, if on average one lands on your head every minutes.
- The probability that a random permutation of a huge finite set has cycles of length .
Here the raindrops are Poisson distributed, and ‘huge’ means I’m taking a limit as the size of a finite set goes to infinity.
Now let’s start trying to understand what’s going on here! Today we’ll establish the above connection between raindrops and random permutations by solving this puzzle:
Puzzle 12. Treat the number of cycles of length in a random permutation of an -element set as a random variable. What do the moments of this random variable approach as ?
First, let me take a moment to explain moments.
To be a bit more formal about our use of probability theory: I’m treating the symmetric group as a probability measure space where each permutation has measure . Thus, any function can be thought of as a random variable.
One thing we do with this random variable is compute its expected value or mean, defined by
But this only says a little about our random variable. To go further, we can compute for any natural number . This is called the th moment of .
If the mean of is zero, its second moment is called its variance: it’s a measure of how spread-out our random variable is. If the mean of is zero, its third moment is a measure of how ‘skewed’ our random variable is:
Suitably normalized, gives a quantity called the ‘skewness’. And if the mean of is zero, its fourth moment is a measure of how ‘long-tailed’ our random variable is, beyond what you’d expect from its variance.. Suitably normalized, gives a quantity called the ‘kurtosis’. This sounds like a disease, but it’s from a Greek word that means ‘arching’.
I don’t know if there are names for the higher moments. Somebody must have thought of some, and after ‘skewness’ and ‘kurtosis’ I’d expect terms like ‘anomie’, ‘dyspepsia’ and ‘lassitude’, but whatever they are, they haven’t caught on.
While the higher moments say increasingly subtle things about our random variable, taken together they tell us everything we’d want to know about it, at least in good cases.
I will resist expanding on this, because I want to start solving the puzzle!
For this, we’re interested in the number of cycles of length in a permutation. This defines a function
which we can treat as a random variable. What are its moments? In Puzzle 7 we saw that its mean is whenever . Of course it’s zero when , since in this case a cycle of length is too big to be possible. So, we have
What about the second moment, ? This is the expected number of ordered pairs of cycles of length .
It’s actually easier to compute . This is the expected number of ordered pairs of distinct cycles of length . Equivalently, it’s the expected the number of ordered pairs of disjoint cycles of length .
Why does this help?
Here’s why. Instead of going through all permutations and counting pairs of disjoint cycles of length , we can reverse the order: go through pairs of disjoint subsets of size and counting permutations having these as cycles! Since all pairs of disjoint subsets of size ‘look alike’, this is easy.
So, to compute , we count the pairs of disjoint -element subsets of our -element set. For any such pair we count the permutations having and as cycles. We multiply these numbers, and then we divide by .
If the answer is obviously zero. Otherwise, there are
ways to choose and — this number is called a multinomial coefficient. For each choice of there are ways to make these sets into cycles and ways to pick a permutation on the rest of our -element set. Multiplying these numbers we get
Dividing by we get our answer:
It would be nice to explain why the answer is so much simpler than the calculation. But let’s move on to higher moments!
Computing was just as good as computing , since we already knew . Continuing on with this philosophy, let’s compute the expected value of the th falling power of , which is defined by
This random variable counts the ordered -tuples of disjoint cycles of length .
Last time I explained how to express ordinary powers in terms of falling powers, so we can compute the moments if we know the expected values . This trick is so popular that these expected values have a name: they’re called factorial moments. I’d prefer to call them ‘falling moments’, but I’m not king of the world… yet.
To compute , we just generalize what I did a moment ago.
First we count the -tuples of disjoint -element subsets of our -element set. For any such -tuple we count the permutations having these sets as cycles. We multiply these numbers, and then we divide by .
If the answer is zero. Otherwise, there are
ways to choose a -tuple of disjoint -element subsets. There are ways to make these sets into cycles and ways to pick a permutation on the rest of our -element set. Multiplying all these, we get
Dividing this by we get our answer:
Again, lots of magical cancellations! Summarizing everything so far, we have
Now, last time we saw that the factorial moments of a Poisson distribution with mean are all equal to . The same sort of calculation shows that the th factorial moment of a Poisson distribution with mean is .
So, we’re seeing that the first factorial moments of the random variable match those of a Poisson distribution with mean . But we can express ordinary powers in terms of falling powers. I showed how this works in Part 8:
Even if you don’t understand the coefficients, which are Stirling numbers of the second kind, it follows straightaway that we can express the first moments of a random variable in terms of its first factorial moments.
So, the first moments of match those of the Poisson distribution with mean .
This solves the puzzle! Of course there are various notions of convergence, but now is the not the time for subtleties of analysis. If we fix a value of , we know now that the th moment of approaches that of the Poisson distribution with mean as . And if we can get the analysis to work out, it follows that these are equal:
- The probability that raindrops land on your head in a minute, if on average one lands on your head every minutes, and each falls independently of all those before it.
- The probability that a random permutation of a huge finite set has cycles of length .
One thing I need to do is next is examine the computations that led to this result and figure out what they mean. Last time we worked out the factorial moments of a Poisson distribution. This time we worked out the factorial moments of the random variable that counts cycles of length . The combinatorics involved in why these calculations match as well as they do — that’s what I need to ponder. There is something nice hiding in here. If you want to help me find it, that’d be great!
Roland Speicher has already pointed me to a good clue, which I need to follow up on.
By the way, if you think my answer to the puzzle was not sufficiently concrete, I can rewrite it a bit. Last time we saw that the th moment of the Poisson distribution with mean is the number of partitions of a -element set, also called the Bell number . The th moment of the Poisson distribution with mean is thus .
So, for any , we have
Re: Random Permutations (Part 9)
There’s nothing more restful and conducive to mental calculations than proctoring a 3-hour calculus exam. I figured out a nice conceptual explanation of the main result here:
using some category theory. When , is the cardinality of a groupoid that’s equivalent to the product of (viewed as a one-object groupoid) and a groupoid that obviously has cardinality 1. I’ll explain next time!