Beta function

From HandWiki
Revision as of 23:08, 6 February 2024 by AIposter (talk | contribs) (add)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Short description: Mathematical function
Contour plot of the beta function

In mathematics, the beta function, also called the Euler integral of the first kind, is a special function that is closely related to the gamma function and to binomial coefficients. It is defined by the integral

[math]\displaystyle{ \Beta(z_1,z_2) = \int_0^1 t^{z_1-1}(1-t)^{z_2-1}\,dt }[/math]

for complex number inputs [math]\displaystyle{ z_1, z_2 }[/math] such that [math]\displaystyle{ \Re(z_1), \Re(z_2)\gt 0 }[/math].

The beta function was studied by Leonhard Euler and Adrien-Marie Legendre and was given its name by Jacques Binet; its symbol Β is a Greek capital beta.

Properties

The beta function is symmetric, meaning that [math]\displaystyle{ \Beta(z_1,z_2) = \Beta(z_2,z_1) }[/math] for all inputs [math]\displaystyle{ z_1 }[/math] and [math]\displaystyle{ z_2 }[/math].[1]

A key property of the beta function is its close relationship to the gamma function:[1]

[math]\displaystyle{ \Beta(z_1,z_2)=\frac{\Gamma(z_1)\,\Gamma(z_2)}{\Gamma(z_1+z_2)}. }[/math]

A proof is given below in § Relationship to the gamma function.

The beta function is also closely related to binomial coefficients. When m (or n, by symmetry) is a positive integer, it follows from the definition of the gamma function Γ that[1]

[math]\displaystyle{ \Beta(m,n) =\frac{(m-1)!\,(n-1)!}{(m+n-1)!} = \frac{m + n}{mn} \Bigg/ \binom{m + n}{m}. }[/math]

Relationship to the gamma function

A simple derivation of the relation [math]\displaystyle{ \Beta(z_1,z_2) =\frac{\Gamma(z_1)\,\Gamma(z_2)}{\Gamma(z_1+z_2)} }[/math] can be found in Emil Artin's book The Gamma Function, page 18–19.[2] To derive this relation, write the product of two factorials as

[math]\displaystyle{ \begin{align} \Gamma(z_1)\Gamma(z_2) &= \int_{u=0}^\infty\ e^{-u} u^{z_1-1}\,du \cdot\int_{v=0}^\infty\ e^{-v} v^{z_2-1}\,dv \\[6pt] &=\int_{v=0}^\infty\int_{u=0}^\infty\ e^{-u-v} u^{z_1-1}v^{z_2-1}\, du \,dv. \end{align} }[/math]

Changing variables by u = st and v = s(1 − t), because u + v = s and u / (u+v) = t, we have that the limits of integrations for s are 0 to ∞ and the limits of integration for t are 0 to 1. Thus produces

[math]\displaystyle{ \begin{align} \Gamma(z_1)\Gamma(z_2) &= \int_{s=0}^\infty\int_{t=0}^1 e^{-s} (st)^{z_1-1}(s(1-t))^{z_2-1}s\,dt \,ds \\[6pt] &= \int_{s=0}^\infty e^{-s}s^{z_1+z_2-1} \,ds\cdot\int_{t=0}^1 t^{z_1-1}(1-t)^{z_2-1}\,dt\\ &=\Gamma(z_1+z_2) \cdot \Beta(z_1,z_2). \end{align} }[/math]

Dividing both sides by [math]\displaystyle{ \Gamma(z_1+z_2) }[/math] gives the desired result.

The stated identity may be seen as a particular case of the identity for the integral of a convolution. Taking

[math]\displaystyle{ \begin{align}f(u)&:=e^{-u} u^{z_1-1} 1_{\R_+} \\ g(u)&:=e^{-u} u^{z_2-1} 1_{\R_+}, \end{align} }[/math]

one has:

[math]\displaystyle{ \Gamma(z_1) \Gamma(z_2) = \int_{\R}f(u)\,du\cdot \int_{\R} g(u) \,du = \int_{\R}(f*g)(u)\,du =\Beta(z_1,z_2)\,\Gamma(z_1+z_2). }[/math]

Differentiation of the Beta function

We have

[math]\displaystyle{ \frac{\partial}{\partial z_1} \mathrm{B}(z_1, z_2) = \mathrm{B}(z_1, z_2) \left( \frac{\Gamma'(z_1)}{\Gamma(z_1)} - \frac{\Gamma'(z_1 + z_2)}{\Gamma(z_1 + z_2)} \right) = \mathrm{B}(z_1, z_2) \big(\psi(z_1) - \psi(z_1 + z_2)\big), }[/math]
[math]\displaystyle{ \frac{\partial}{\partial z_m} \mathrm{B}(z_1, z_2, \dots, z_n) = \mathrm{B}(z_1, z_2, \dots, z_n) \left(\psi(z_m) - \psi\left( \sum_{k=1}^n z_k \right)\right), \quad 1\le m\le n, }[/math]

where [math]\displaystyle{ \psi(z) }[/math] denotes the digamma function.

Approximation

Stirling's approximation gives the asymptotic formula

[math]\displaystyle{ \Beta(x,y) \sim \sqrt {2\pi } \frac{x^{x - 1/2} y^{y - 1/2} }{( {x + y} )^{x + y - 1/2} } }[/math]

for large x and large y.

If on the other hand x is large and y is fixed, then

[math]\displaystyle{ \Beta(x,y) \sim \Gamma(y)\,x^{-y}. }[/math]

Other identities and formulas

The integral defining the beta function may be rewritten in a variety of ways, including the following:

[math]\displaystyle{ \begin{align} \Beta(z_1,z_2) &= 2\int_0^{\pi / 2}(\sin\theta)^{2z_1-1}(\cos\theta)^{2z_2-1}\,d\theta, \\[6pt] &= \int_0^\infty\frac{t^{z_1-1}}{(1+t)^{z_1+z_2}}\,dt, \\[6pt] &= n\int_0^1t^{nz_1-1}(1-t^n)^{z_2-1}\,dt, \\ &= (1-a)^{z_2} \int_0^1 \frac{(1-t)^{z_1-1}t^{z_2-1}}{(1-at)^{z_1+z_2}}dt \qquad \text{for any } a\in\mathbb{R}_{\leq 1}, \end{align} }[/math]

where in the second-to-last identity n is any positive real number. One may move from the first integral to the second one by substituting [math]\displaystyle{ t = \tan^2(\theta) }[/math].

The beta function can be written as an infinite sum[3]

[math]\displaystyle{ \Beta(x,y) = \sum_{n=0}^\infty \frac{(1-x)_n}{(y+n)\,n!} }[/math]
(where [math]\displaystyle{ (x)_n }[/math] is the rising factorial)

and as an infinite product

[math]\displaystyle{ \Beta(x,y) = \frac{x+y}{x y} \prod_{n=1}^\infty \left( 1+ \dfrac{x y}{n (x+y+n)}\right)^{-1}. }[/math]

The beta function satisfies several identities analogous to corresponding identities for binomial coefficients, including a version of Pascal's identity

[math]\displaystyle{ \Beta(x,y) = \Beta(x, y+1) + \Beta(x+1, y) }[/math]

and a simple recurrence on one coordinate:

[math]\displaystyle{ \Beta(x+1,y) = \Beta(x, y) \cdot \dfrac{x}{x+y}, \quad \Beta(x,y+1) = \Beta(x, y) \cdot \dfrac{y}{x+y}. }[/math][4]

The positive integer values of the beta function are also the partial derivatives of a 2D function: for all nonnegative integers [math]\displaystyle{ m }[/math] and [math]\displaystyle{ n }[/math],

[math]\displaystyle{ \Beta(m+1, n+1) = \frac{\partial^{m+n}h}{\partial a^m \, \partial b^n}(0, 0), }[/math]

where

[math]\displaystyle{ h(a, b) = \frac{e^a-e^b}{a-b}. }[/math]

The Pascal-like identity above implies that this function is a solution to the first-order partial differential equation

[math]\displaystyle{ h = h_a+h_b. }[/math]

For [math]\displaystyle{ x, y \geq 1 }[/math], the beta function may be written in terms of a convolution involving the truncated power function [math]\displaystyle{ t \mapsto t_+^x }[/math]:

[math]\displaystyle{ \Beta(x,y) \cdot\left(t \mapsto t_+^{x+y-1}\right) = \Big(t \mapsto t_+^{x-1}\Big) * \Big(t \mapsto t_+^{y-1}\Big) }[/math]

Evaluations at particular points may simplify significantly; for example,

[math]\displaystyle{ \Beta(1,x) = \dfrac{1}{x} }[/math]

and

[math]\displaystyle{ \Beta(x,1-x) = \dfrac{\pi}{\sin(\pi x)}, \qquad x \not \in \mathbb{Z} }[/math][5]

By taking [math]\displaystyle{ x = \frac{1}{2} }[/math] in this last formula, it follows that [math]\displaystyle{ \Gamma(1/2) = \sqrt{\pi} }[/math]. Generalizing this into a bivariate identity for a product of beta functions leads to:

[math]\displaystyle{ \Beta(x,y) \cdot \Beta(x+y,1-y) = \frac{\pi}{x \sin(\pi y)} . }[/math]

Euler's integral for the beta function may be converted into an integral over the Pochhammer contour C as

[math]\displaystyle{ \left(1-e^{2\pi i\alpha}\right)\left(1-e^{2\pi i\beta}\right)\Beta(\alpha,\beta) =\int_C t^{\alpha-1}(1-t)^{\beta-1} \, dt. }[/math]

This Pochhammer contour integral converges for all values of α and β and so gives the analytic continuation of the beta function.

Just as the gamma function for integers describes factorials, the beta function can define a binomial coefficient after adjusting indices:

[math]\displaystyle{ \binom{n}{k} = \frac{1}{(n+1)\,\Beta(n-k+1, k+1)}. }[/math]

Moreover, for integer n, Β can be factored to give a closed form interpolation function for continuous values of k:

[math]\displaystyle{ \binom{n}{k} = (-1)^n\, n! \cdot\frac{\sin (\pi k)}{\pi \displaystyle\prod_{i=0}^n (k-i)}. }[/math]

Reciprocal beta function

The reciprocal beta function is the function about the form

[math]\displaystyle{ f(x,y)=\frac{1}{\Beta(x,y)} }[/math]

Interestingly, their integral representations closely relate as the definite integral of trigonometric functions with product of its power and multiple-angle:[6]

[math]\displaystyle{ \int_0^\pi\sin^{x-1}\theta\sin y\theta~d\theta=\frac{\pi\sin\frac{y\pi}{2}}{2^{x-1}x\Beta\left(\frac{x+y+1}{2},\frac{x-y+1}{2}\right)} }[/math]
[math]\displaystyle{ \int_0^\pi\sin^{x-1}\theta\cos y\theta~d\theta=\frac{\pi\cos\frac{y\pi}{2}}{2^{x-1}x\Beta\left(\frac{x+y+1}{2},\frac{x-y+1}{2}\right)} }[/math]
[math]\displaystyle{ \int_0^\pi\cos^{x-1}\theta\sin y\theta~d\theta=\frac{\pi\cos\frac{y\pi}{2}}{2^{x-1}x\Beta\left(\frac{x+y+1}{2},\frac{x-y+1}{2}\right)} }[/math]
[math]\displaystyle{ \int_0^\frac{\pi}{2}\cos^{x-1}\theta\cos y\theta~d\theta=\frac{\pi}{2^xx\Beta\left(\frac{x+y+1}{2},\frac{x-y+1}{2}\right)} }[/math]

Incomplete beta function

The incomplete beta function, a generalization of the beta function, is defined as[7][8]

[math]\displaystyle{ \Beta(x;\,a,b) = \int_0^x t^{a-1}\,(1-t)^{b-1}\,dt. }[/math]

For x = 1, the incomplete beta function coincides with the complete beta function. The relationship between the two functions is like that between the gamma function and its generalization the incomplete gamma function. For positive integer a and b, the incomplete beta function will be a polynomial of degree a + b - 1 with rational coefficients.

The regularized incomplete beta function (or regularized beta function for short) is defined in terms of the incomplete beta function and the complete beta function:

[math]\displaystyle{ I_x(a,b) = \frac{\Beta(x;\,a,b)}{\Beta(a,b)}. }[/math]

The regularized incomplete beta function is the cumulative distribution function of the beta distribution, and is related to the cumulative distribution function [math]\displaystyle{ F(k;\,n,p) }[/math] of a random variable X following a binomial distribution with probability of single success p and number of Bernoulli trials n:

[math]\displaystyle{ F(k;\,n,p) = \Pr\left(X \le k\right) = I_{1-p}(n-k, k+1) = 1 - I_p(k+1,n-k). }[/math]

Properties

[math]\displaystyle{ \begin{align} I_0(a,b) &= 0 \\ I_1(a,b) &= 1 \\ I_x(a,1) &= x^a\\ I_x(1,b) &= 1 - (1-x)^b \\ I_x(a,b) &= 1 - I_{1-x}(b,a) \\ I_x(a+1,b) &= I_x(a,b)-\frac{x^a(1-x)^b}{a \Beta(a,b)} \\ I_x(a,b+1) &= I_x(a,b)+\frac{x^a(1-x)^b}{b \Beta(a,b)} \\ \int B(x;a,b) \mathrm{d}x &= x B(x; a, b) - B(x; a+1, b) \\ \Beta(x;a,b)&=(-1)^{a} \Beta\left(\frac{x}{x-1};a,1-a-b\right) \end{align} }[/math]

Continued fraction expansion

The continued fraction expansion

[math]\displaystyle{ \Beta(x;\,a,b) = \frac{x^{a} (1 - x)^{b}}{a \left( 1 + \frac{{d}_{1}}{1 +} \frac{{d}_{2}}{1 +} \frac{{d}_{3}}{1 +} \frac{{d}_{4}}{1 +} \cdots \right)} }[/math]

with odd and even coefficients respectively

[math]\displaystyle{ {d}_{2 m + 1} = - \frac{(a + m) (a + b + m) x}{(a + 2 m) (a + 2 m + 1)} }[/math]
[math]\displaystyle{ {d}_{2 m} = \frac{m (b - m) x}{(a + 2 m - 1) (a + 2 m)} }[/math]

converges rapidly when [math]\displaystyle{ x }[/math] is not close to 1. The [math]\displaystyle{ 4 m }[/math] and [math]\displaystyle{ 4 m + 1 }[/math] convergents are less than [math]\displaystyle{ \Beta(x;\,a,b) }[/math], while the [math]\displaystyle{ 4 m + 2 }[/math] and [math]\displaystyle{ 4 m + 3 }[/math] convergents are greater than [math]\displaystyle{ \Beta(x;\,a,b) }[/math].

For [math]\displaystyle{ x \gt \frac{a + 1}{a + b + 2} }[/math], the function may be evaluated more efficiently using [math]\displaystyle{ \Beta(x;\,a,b) = \Beta(a, b) - \Beta(1 - x;\,b,a) }[/math].[8]

Multivariate beta function

The beta function can be extended to a function with more than two arguments:

[math]\displaystyle{ \Beta(\alpha_1,\alpha_2,\ldots\alpha_n) = \frac{\Gamma(\alpha_1)\,\Gamma(\alpha_2) \cdots \Gamma(\alpha_n)}{\Gamma(\alpha_1 + \alpha_2 + \cdots + \alpha_n)} . }[/math]

This multivariate beta function is used in the definition of the Dirichlet distribution. Its relationship to the beta function is analogous to the relationship between multinomial coefficients and binomial coefficients. For example, it satisfies a similar version of Pascal's identity:

[math]\displaystyle{ \Beta(\alpha_1,\alpha_2,\ldots\alpha_n) = \Beta(\alpha_1+1,\alpha_2,\ldots\alpha_n)+\Beta(\alpha_1,\alpha_2+1,\ldots\alpha_n)+\cdots+\Beta(\alpha_1,\alpha_2,\ldots\alpha_n+1) . }[/math]

Applications

The beta function is useful in computing and representing the scattering amplitude for Regge trajectories. Furthermore, it was the first known scattering amplitude in string theory, first conjectured by Gabriele Veneziano. It also occurs in the theory of the preferential attachment process, a type of stochastic urn process. The beta function is also important in statistics, e.g. for the Beta distribution and Beta prime distribution. As briefly alluded to previously, the beta function is closely tied with the gamma function and plays an important role in calculus.

Software implementation

Even if unavailable directly, the complete and incomplete beta function values can be calculated using functions commonly included in spreadsheet or computer algebra systems.

In Microsoft Excel, for example, the complete beta function can be computed with the GammaLn function (or special.gammaln in Python's SciPy package):

Value = Exp(GammaLn(a) + GammaLn(b) − GammaLn(a + b))

This result follows from the properties listed above.

The incomplete beta function cannot be directly computed using such relations and other methods must be used. In GNU Octave, it is computed using a continued fraction expansion.

The incomplete beta function has existing implementation in common languages. For instance, betainc (incomplete beta function) in MATLAB and GNU Octave, pbeta (probability of beta distribution) in R, or special.betainc in SciPy compute the regularized incomplete beta function—which is, in fact, the cumulative beta distribution—and so, to get the actual incomplete beta function, one must multiply the result of betainc by the result returned by the corresponding beta function. In Mathematica, Beta[x, a, b] and BetaRegularized[x, a, b] give [math]\displaystyle{ \Beta(x;\,a,b) }[/math] and [math]\displaystyle{ I_x(a,b) }[/math], respectively.

See also


References

  1. 1.0 1.1 1.2 Davis, Philip J. (1972), "6. Gamma function and related functions", Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables, New York: Dover Publications, p. 258, ISBN 978-0-486-61272-0, https://archive.org/details/handbookofmathe000abra/page/258/mode/2up?view=theater . Specifically, see 6.2 Beta Function.
  2. Artin, Emil, The Gamma Function, pp. 18–19, http://www.plouffe.fr/simon/math/Artin%20E.%20The%20Gamma%20Function%20(1931)(23s).pdf, retrieved 2016-11-11 
  3. Beta function : Series representations (Formula 06.18.06.0007), https://functions.wolfram.com/GammaBetaErf/Beta/06/03/0001/ 
  4. Mäklin, Tommi (2022), Probabilistic Methods for High-Resolution Metagenomics, Series of publications A / Department of Computer Science, University of Helsinki, Helsinki: Unigrafia, pp. 27, ISBN 978-951-51-8695-9, ISSN 2814-4031, https://helda.helsinki.fi/bitstream/handle/10138/349862/M%C3%A4klin_Tommi_dissertation_2022.pdf 
  5. Euler's Reflection Formula - ProofWiki, https://proofwiki.org/wiki/Euler%27s_Reflection_Formula, retrieved 2020-09-02 
  6. Paris, R. B. (2010), "Beta Function", in Olver, Frank W. J.; Lozier, Daniel M.; Boisvert, Ronald F. et al., NIST Handbook of Mathematical Functions, Cambridge University Press, ISBN 978-0-521-19225-5, http://dlmf.nist.gov/5.12 
  7. Zelen, M.; Severo, N. C. (1972), "26. Probability functions", Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables, New York: Dover Publications, pp. 944, ISBN 978-0-486-61272-0 
  8. 8.0 8.1 Paris, R. B. (2010), "Incomplete beta functions", in Olver, Frank W. J.; Lozier, Daniel M.; Boisvert, Ronald F. et al., NIST Handbook of Mathematical Functions, Cambridge University Press, ISBN 978-0-521-19225-5, http://dlmf.nist.gov/8.17 

External links