layout | title | date | categories | permalink | use_math |
---|---|---|---|---|---|
post |
Falling moments |
2023-11-27 |
writing |
/blog/falling-moments.html |
true |
Recently, I've been teaching some of the major discrete probability distributions, like the binomial, geometric and Poisson distributions.
When studying random variables, an important role is played by the moments. The $k$th moment of a random variable
In particular, the first moment
you need both the first and second moments.
But when it comes to discrete distributions, calculating the second moment can be rather awkward. For example, the second moments of the geometric and Poisson distributions are
respectively, which are not easy to calculate. Instead, it turns out to be much more convenient to calculate
For the geometric distribution (I'm using here the "number of failures before the first success" definition), we have
But the summand here is now, very conveniently, the second derivative of
so its value is the second derivative of
Similarly, for the Poisson distribution,
where the
Notice how in both cases the
These expressions
The falling moments are the expectations of the falling factorials
Here, I want to argue that the falling moments are, for discrete random variables, more natural objects than the usual plain vanilla moments. For a start, the famous distributions often have very pleasant formulas for the falling moments:
-
Bernoulli distribution: The PMF is
$p(1) = p$ ,$p(0) = 1- p$ . The falling moments are$\mathbb EX = p$ and$\mathbb EX^{\underline{k}} = 0$ for$k \geq 2$ . -
Binomial distribution: The PMF is
$p(x) = \binom nx p^x (1-p)^{n-x}$ . The falling moments are$\mathbb EX^{\underline{k}} = n^{\underline{k}} p^k$ . -
Geometric distribution: The PMF is
$p(x) = (1-p)^x p$ (using the "number of failures before the first success" definition). The falling moments are
-
Negative binomial distribution: The PMF is
$p(x) = \binom{n+x-1}{x} (1-p)^x p^n$ (using the "number of failures before the $n$th success" definition). The falling moments are
where
-
Poisson distribution: The PMF is
$p(x) = \mathrm{e}^{-x} \lambda^x/x!$ . The falling moments are$\mathbb EX^{\underline{k}} = \lambda^k$ . -
Hypergeometric distribution: The PMF is
The falling moments are
-
Discrete uniform distribution on
${0,1,\dots,n}$ : The PMF is$p(x) = 1/(n+1)$ . The falling moments are
These don't have such pleasant expressions for the usual moments -- generally, you can't do much better than using the formula
(also discussed in my earlier post) to write
(The exception would be the Bernoulli distribution, which has
Some of the discrete distributions have a "continuous equivalent" -- and in these cases, the falling moments of the discrete distribution are often very similar to the usual moments of the continuous equivalent.
Discrete | Falling moments | Continuous equiv. | Moments |
---|---|---|---|
Geometric | Exponential | ||
Negative binomial | Gamma | ||
Discrete uniform | Continuous uniform |
Note that
A convenient way of dealing with the moments
that is, an exponential generating function whose coefficients are the moments.
It seems, therefore, that a convenient discrete equivalent would be (what we could call) the falling moment generating function (FMGF)
Noting that
so we see that the FMGF can therefore be simplified as
Now, this FMGF is not a new invention. A widely used conveninent function is the probability generating function (PDF)
Distribution | PGF | FMGF |
---|---|---|
Bernoulli | ||
Binomial | ||
Geometric | ||
Negative binomial | ||
Poisson |
Of course, these contain exactly the same information, but I think I'll argue that the FMGFs are slightly more pleasant than the PGFs. (The discrete uniform ones are "fine but not great" either way.)
When teaching these distributions, I also had to tell my students that there are two different conventions for the geometric and negative binomial distributions.
(I was making some weird Tower of Babel metaphor about this, before realising I was out of time. This led to my finishing the lecture with the weird non-sequitor: "This is just further evidence of the fallen state of man. OK, see you next week!")
The two conventions are:
-
Convention 1:
- The geometric distribution is the number of trials up to and including the first success.
- The negative binomial distribution is the number of trials up and including the $n$th success.
-
Convention 2:
- The geometric distribution is the number of failures before the first success.
- The negative binomial distribution is the number of failures before the $n$th success.
I've always been a strong Convention 1-er. It seems more pleasant for the expectation of the geometric being
But writing this blogpost makes me wonder if I should change my mind.
The exponential is the "continuous equivalent" to the geometric. The moments and MGF of the exponential are
Compare this with the falling moments and FMGF of the geometric under Convention 1:
and under Convention 2:
Similarly, the Gamma distribution is the "continuous equivalent" to the negative binomial. The moments and MGF of the Gamma$(n, \lambda)$ are
Compare this with the falling moments and FMGF of the geometric under Convention 1:
and under Convention 2:
It's hard to argue anything other than that Convention 2 is the more natural here, with
A famous result called the "Poisson approximation to the binomial" -- and sometimes, slightly cheekily, the "law of small numbers" -- is the following. It says that if
You can just prove this "by hand". A nicer way is to show that the PGF of
as an immediate, almost trivial, application of perhaps the most famous limit in mathematics. Score another one for the falling moment generating function!
Update: It turns out I hadn't run out of things to say about this! See my follow-up post, "Falling and thinning".