Some Statistical Gamma Fun
Nothing takes place in the world whose meaning is not that of some maximum or minimum. — Leonhard Euler
Cantor’s Paradise page |
Kasper Müller is a mathematics and data science writer for Medium, where he contributes primarily to the blogs Cantor’s Paradise and Towards Data Science. He wrote a nice article last April titled, “The Beautiful Gamma Function and the Genius Who Discovered It.”
Today we discuss the relevance of the gamma function to statistics and use statistics to suggest a new kind of estimate for it.
The “Genius” that Müller refers to is Leonhard Euler. Euler proved that for all integers ,
where the latter equation uses the substitution . The right-hand side produces a value for any complex number in place of provided . This leads to the formal definition
whose analytic extension is defined everywhere except for . Because has no zeroes, its reciprocal is an entire function. One neat value is . We will be mainly concerned with ratios of two values of .
What is Gamma For?
For all except the non-positive integers, obeys the formula
Of course, this follows from for positive integers . Also
but there is a discrepancy. This and the lack of a simple explicit formula for at all have always made the function seem opaque to me. Two notable values are and .
The function is not even the only uniformly continuous interpolation of the factorial function. It is the unique one whose logarithm is a convex function. This is the first of many reasons given in Müller’s article for to be salient and beautiful, culminating in its relation to the Riemann zeta function given by
Yet the log-convex uniqueness was proved only 99 years ago, and none of these tell me at a flash what the function is.
What is the simplest label for its corner of the sky? The leading example is the formula for the volume of a sphere of radius in dimensions:
But I wonder whether a different application is more fundamental. Since we are dealing with already here, let us define the function
Noting via (1), this is a tweak of the square-root function. Here are some values of it:
Here is the significance:
For integer , the expected Euclidean norm of a vector of independent samples from the standard Gaussian distribution is
That’s it: Gamma gives the norm of Gaussians. The norm is of order but not exactly. The function gives it exactly.
An Inferior But Curious Estimate
The norm of independent Gaussians is called the chi distribution. Its square is the better-known chi-squared distribution. This idea is used in the statistical chi-squared test, but what follows is simpler.
We let stand for the square norm divided by , so that stands for the Euclidean norm divided by . From (2) we have
We will estimate a different way and use that to estimate . First we note that since the vector entries are independent and normally distributed, we have the exact values
Since we have , computing either or suffices to get the other, by the relation . Our also having enables estimating via the delta method, in a particular form I noticed here. The derivation requires no special properties of :
For our particular with , this yields a quadratic equation in :
This yields
Changing variables to and rearranging, we get the estimate
It has been traditional to estimate what we would call instead, so putting we finally get:
As an estimate, this is barely competitive with the simple and far inferior to
which is the first of several estimates of the form given by Cristinel Mortici in 2010. But it is curious that we got a formula with nested radicals and non-dyadic coefficients from a simple statistical estimate. It makes us wonder whether formulas with nested radicals can be tuned for greater accuracy, and whether this might knock back to statistical estimation.
Open Problems
Can vectors of Gaussian variables be leveraged to say further interesting things about the gamma function and its applications? What are your favorite properties of the gamma function?
[fixed missing “ds” in intro, typo n–>sqrt(n) at end of sentence with “divided by”]
Minor correction: “We let {X^2} stand for the square norm divided by {n}, so that {X} stands for the Euclidean norm divided by {n}.” I think you mean divided by \sqrt{n} at the end there.
Thanks!—fixed
Minor correction: There’s a ds missing in the first integral.
Thanks, too!