# Whence the beta distribution?

As I'm sure everyone here knows already, the PDF of the Beta distribution $X \sim B(a,b)$ is given by

$f(x) = \frac{1}{B(a,b)}x^{a-1}(1-x)^{b-1}$

I've been hunting all over the place for an explanation of the origins of this formula, but I can't find it. Every article I've found on the Beta distribution seems to give this formula, illustrate a few of its shapes, then go straight on to discussing its moments and on from there.

I don't like using mathematical formulae I can't derive and explain. For other distributions (e.g. the gamma or the binomial) there's a clear derivation I can learn and use. But I can't find anything like that for the Beta distribution.

So my question is: what are the origins of this formula? How can it be derived from first principles in whatever context it was originally developed?

[To clarify, I'm not asking about how to use the Beta distribution in Bayesian statistics, or what it means intuitively in practice (I've read the baseball example). I just want to know how to derive the PDF. There was a previous question that asked something similar, but it was marked (I think incorrectly) as a duplicate of another question that did not address the issue, so I haven't been able to find any help on here so far.]

EDIT 2017-05-06: Thanks everyone for the questions. I think a good explanation of what I want comes from one of the answers I got when I asked this of some of my course instructors:

"I guess people could derive the normal density as a limit of a sum of n things divided by sqrt(n), and you can derive the poisson density from the idea of events occurring at a constant rate. Similarly, in order to derive the beta density, you would have to have some kind of idea of what makes something a beta distribution independantly from, and logically prior to, the density."

So the "ab initio" idea in the comments is probably closest to what I'm looking for. I am not a mathematician, but I feel most comfortable using mathematics that I can derive. If the origins are too advanced for me to handle, so be it, but if not I would like to understand them.

• Derived from what? If the binomial-conjugate-prior approach is not acceptable, several alternatives are here (e.g. order statistics of a uniform random variable, proportions of Gamma variables). – GeoMatt22 May 4 '17 at 20:33
• Note: the whole history of the Beta distribution is provided in the unbelievable Wikipedia page on this distribution, which contains about every possible detail! – Xi'an May 4 '17 at 21:00
• The previous question was marked as a duplicate of the other after the OP clarified what they were after in a comment. whuber asked the same question there as @Geomatt22 does here: "A derivation means a logical connection from something assumed to something to be established. What do you want to assume?" – Scortchi May 4 '17 at 21:06
• @Aksakal but then the question is too broad -- it may be derived an all manner of ways; if you're right, I'll close it as too broad until the question is narrowed down enough to be something other than a grab bag of possible answers – Glen_b May 5 '17 at 3:15
• Some brief discussion of a little historical context is here (at least in terms of its relationship to the incomplete beta function). It has connections to the gamma distribution, and many, many other distributions besides and arises quite reasonably in a number of different ways; as Xi'an points out it's also got historical origins in the Pearson system. What kind of answer are you seeking here? What's given/what must be derived? – Glen_b May 5 '17 at 3:16

## 2 Answers

As a former physicist I can see how it could have been derived. This is how physicists proceed:

when they encounter a finite integral of a positive function, such as beta function: $$B(x,y) = \int_0^1t^{x-1}(1-t)^{y-1}\,dt$$ they instinctively define a density: $$f(s|x,y)=\frac{s^{x-1}(1-s)^{y-1}}{\int_0^1t^{x-1}(1-t)^{y-1}\,dt}=\frac{s^{x-1}(1-s)^{y-1}}{B(x,y)},$$ where $0<s<1$

They do this to all kinds of integrals all the time so often that it happens reflexively without even thinking. They call this procedure "normalization" or similar names. Notice how by definition trivially the density has all the properties that you want it to have, such as always positive and adds up to one.

The density $f(t)$ that I gave above is of Beta distribution.

UPDATE

@whuber's asking what's so special about Beta distribution while the above logic could be applied to an infinite number of suitable integrals (as I noted in my answer above)?

The special part comes from the binomial distribution. I'll write its PDF using similar notation to my beta, not the usual notation for parameters and variables: $$f'(x,y|s) = \binom {y+x} x s^x(1-s)^{y}$$

Here, $x,y$ - number of successes and failures, and $s$ - probability of success. You can see how this is very similar to the numerator in the Beta distribution. In fact, if you look for the prior for Binomial distribution, it'll be the Beta distribution. It's not surprising also because the domain of Beta is 0 to 1, and that's what you do in Bayes theorem: integrate over the parameter $s$, which is the probability of success in this case as shown below: $$\hat f(x|X)=\frac{f'(X|s)f(s)}{\int_0^1 f'(X|s)f(s)ds},$$ here $f(s)$ - probability (density) of probability of success given the prior settings of Beta distribution, and $f'(X|s)$ - density of this data set (i.e. observed success and failures) given a probability $s$.

• @Xi'an OP doesn't seem to be interested in history. – Aksakal May 5 '17 at 11:09
• "Explanation of the origins of this formula ... in whatever context it was originally developed" sounds like history to me :-). – whuber May 5 '17 at 12:46
• I believe one can be interested both in history and first principles at the same time. :-) Although your answer is mathematically correct, it unfortunately is far too general: one can make a density of any non-negative function with finite integral. What, then, is so special about this particular family of distributions? As such, your approach does not seem to satisfy either point of view. – whuber May 5 '17 at 13:06
• @WillBradshaw, yes. Normally, we look at binomial distribution as a function of number of failures (or successes) given the probability and the number of trials as parameters. This way it's a discrete distribution. However, if you look at it as a function of probabilities given the number of successes and failures as parameters, then it becomes Beta distribution once you re-scale it, a continuous distribution, btw. – Aksakal May 6 '17 at 15:26
• The Wikipedia article on the Beta distribution traces it to Karl Pearson, exactly as suggested by @Xi'an. Stigler, in his The History of Statistics: The Measurement of Uncertainty Before 1900, gives a brief account of Pearson's derivation using modern notation. – whuber May 6 '17 at 15:49 Thomas Bayes (1763) derived the Beta distribution [without using this name] as the very first example of posterior distribution, predating Leonhard Euler (1766) work on the Beta integral pointed out by Glen_b by a few years, but the integral also appears in Euler (1729 or 1738) [Opera Omnia, I14, 1{24] as a way to generalise the factorial function $-$which may be why the normalising Beta constant $B(a,b)$ is also called the Euler function$-$. Davies mentions Wallis (1616-1703), Newton (1642-1726), and Stirling (1692-1770) dealing with special cases of the integral even earlier. Karl Pearson (1895) first catalogued this family of distributions as Pearson Type I. Although it did not historically appear in that order, an intuitive entry to the Beta distribution is through Fisher's $F(p,q)$ distribution, which corresponds to the distribution of a ratio $$\varrho=\hat\sigma^2_1\big/\hat\sigma_2^2\qquad p\hat\sigma_1^2\sim\chi^2_p\quad q\hat\sigma_1^2\sim\chi^2_q$$ where I purposely used the usual notations for variance estimators as this is how this distribution appeared and was motivated, for testing the equality of two variances. Then $$\frac{p\varrho}{q+p\varrho}\sim B(p/2,q/2)$$ while, conversely, if $\omega\sim B(a,b)$, then $$\dfrac{\omega/a}{(1-\omega)/b}\sim F(2a,2b)$$ Finding the density of a $B(a,b)$ distribution is thus a change of variable step: starting from the density of a $F(p,q)$ distribution, $$f_{p,q}(x) \propto \{px/q\}^{p/2-1}(1+px/q)^{-(p+q)/2}$$ and considering the change of variable$$y=\frac{\{px/q\}}{\{1+px/q\}}\quad y\in(0,1)$$which inverts into$$x=\frac{qy}{p(1-y)}$$ the Jacobian is$$\frac{\text{d}x}{\text{d}y}=\frac{q}{p(1-y)}+\frac{qy}{p(1-y)^2}=\frac{p}{q(1-y)^2}$$leads to the density of the transform $$g(y)\propto y^{p/2-1}(1-y)^{q/2+1}(1-y)^{-2}=y^{p/2-1}(1-y)^{q/2+1}$$ [where all normalisation constants are obtained by imposing for the density to integrate to one.

• +1. It might be worth noting that K. Pearson did not merely "catalog" the Beta distributions: he derived them via solutions of a family of differential equations inspired by a relationship he observed between difference equations for the Binomial and differential equations for the Normal distribution. Generalizing the Binomial difference equation to the hypergeometric distribution produced a generalization of the differential equation, whose solutions included the "Type I" and "Type II" Beta distributions. This is precisely the kind of ab initio derivation the OP seems to be seeking. – whuber May 5 '17 at 12:45
• I think I can learn a lot by studying this answer. It's too advanced for me at the moment, but when I have time I will come back and research the topics you mention, then try again to understand it. Many thanks. :) – Will Bradshaw May 6 '17 at 15:00