Matching moments to estimate a parameter
Today let's work out how to estimate a parameter by matching arithmetic you already know how to do, a mean, a variance, straight to the distribution's own version of it, then solving.
Priya runs the helpdesk for a small software company, and she logs everything that moves through it. She has logged forty hourly counts of how many tickets came in, which average 4 an hour. She has timed forty gap times between one ticket and the next, which average 15 minutes. And she has fifty handling times, how long it took to close a ticket once someone picked it up, which average 8 minutes with a moment variance of 16 around that average.
Each of those logs hides a parameter Priya wants a number for: how many tickets to expect in an hour, how long a gap between tickets typically runs, and how a handling time is spread around its own average. For every one of them, this lesson uses the same three moves.
That is the whole shape of it. Everything from here works this exact recipe on Priya's own numbers, one distribution at a time.
The method of moments on one parameter: tickets per hour
Start with Priya's simplest log: how many tickets arrive in an hour. Over forty different hours she counted the tickets that came in each time, and those forty counts average 4 tickets an hour.
A Poisson distribution is the usual model for a count like this, the number of events in a fixed window with no upper limit. It has exactly one parameter, written \(\lambda\) (lambda), and lambda is not just some number attached to the distribution. It is literally the Poisson's own mean. Whatever value lambda takes, that is also the average count the Poisson produces.
So the method of moments here is short. Compute the sample's own mean, Priya's forty counts. Set it equal to the Poisson's mean, lambda. Solve for lambda, which takes one line because the Poisson's mean already equals lambda with nothing else attached.
Compute that sample mean directly in R.
The forty counts average exactly 4, so lambda-hat, the method-of-moments estimate of lambda, is 4. Nothing was optimised and nothing was searched for. The sample's own mean was already the answer the moment equation asked for.
The chart below plots the full shape of those forty counts, not just their average.
Twenty of the forty hours sat at exactly 4 tickets, with ten running a little lower at 3 and ten a little higher at 5. That is the shape behind the single number 4. Not every hour saw exactly 4 tickets, but 4 is exactly where the counts centre, which is why it is also the Poisson's own mean.