{
  "id": "beta-function",
  "title": "Beta Function",
  "lang": "en",
  "source_lang": "en",
  "summary": "The beta function is a two-variable special function defined by an Euler integral, related to the gamma function and central to beta distributions and incomplete beta integrals.",
  "category": "mathematics",
  "subcategory": "analysis",
  "type": "concept",
  "aliases": [
    "Euler beta function",
    "Euler integral of the first kind"
  ],
  "generated_at": "2026-11-05",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/beta-function/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/beta-function/",
      "json": "https://aiwiki.page/zh/beta-function.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "The beta function, denoted \\(B(a,b)\\), is a function of two variables defined, for parameters with positive real parts, by\n\n\\[B(a,b)=\\int_0^1 t^{a-1}(1-t)^{b-1}\\,dt.\\]\n\nIt is closely related to the gamma function through\n\n\\[B(a,b)=\\frac{\\Gamma(a)\\Gamma(b)}{\\Gamma(a+b)}.\\]\n\nThe beta function provides exact values for many definite integrals, supplies the normalizing constant of the beta distribution, and extends to complex parameters by analytic continuation. Its incomplete forms are important in probability calculations and statistical computation."
    },
    {
      "heading": "Definition and convergence",
      "text": "For real parameters \\(a>0\\) and \\(b>0\\), the defining integral is positive and finite. Its convergence is determined by the two endpoints:\n\n- Near \\(t=0\\), the integrand behaves like \\(t^{a-1}\\), which is integrable precisely when \\(a>0\\).\n- Near \\(t=1\\), it behaves like \\((1-t)^{b-1}\\), which is integrable precisely when \\(b>0\\).\n\nFor complex parameters, the same integral converges absolutely when\n\n\\[\\operatorname{Re}(a)>0,\\qquad \\operatorname{Re}(b)>0.\\]\n\nBecause \\(t\\) and \\(1-t\\) are positive inside the interval of integration, their complex powers are unambiguously defined using their real logarithms:\n\n\\[t^{a-1}=\\exp\\bigl((a-1)\\log t\\bigr).\\]\n\nThe integral defines an analytic function of both parameters in this domain. Values outside it require an extension of the function rather than ordinary evaluation of the original improper integral."
    },
    {
      "heading": "Relationship with the gamma function",
      "text": "The beta–gamma identity is\n\n\\[\\boxed{B(a,b)=\\frac{\\Gamma(a)\\Gamma(b)}{\\Gamma(a+b)}}.\\]\n\nIt connects a two-parameter integral on a finite interval with products of one-parameter gamma integrals.\n\nFor \\(\\operatorname{Re}(a),\\operatorname{Re}(b)>0\\), begin with\n\n\\[\\Gamma(a)\\Gamma(b) = \\int_0^\\infty\\int_0^\\infty x^{a-1}y^{b-1}e^{-(x+y)}\\,dx\\,dy.\\]\n\nMake the change of variables\n\n\\[x=rt,\\qquad y=r(1-t),\\]\n\nwhere \\(r>0\\) and \\(0<t<1\\). The absolute value of the Jacobian determinant is \\(r\\), so\n\n\\[\\Gamma(a)\\Gamma(b) = \\left(\\int_0^\\infty r^{a+b-1}e^{-r}\\,dr\\right) \\left(\\int_0^1 t^{a-1}(1-t)^{b-1}\\,dt\\right).\\]\n\nThe first factor is \\(\\Gamma(a+b)\\), giving the identity.\n\nThis factorization also explains why beta and gamma distributions frequently appear together in probability theory: the variables \\(r=x+y\\) and \\(t=x/(x+y)\\) separate a total magnitude from a proportion."
    },
    {
      "heading": "Symmetry, recurrence relations, and special values",
      "text": "The substitution \\(t\\mapsto1-t\\) gives the symmetry relation\n\n\\[B(a,b)=B(b,a).\\]\n\nThe gamma identity, or integration by parts, yields the recurrence relations\n\n\\[B(a+1,b)=\\frac{a}{a+b}B(a,b), \\qquad B(a,b+1)=\\frac{b}{a+b}B(a,b).\\]\n\nConsequently,\n\n\\[B(a+1,b)+B(a,b+1)=B(a,b).\\]\n\nThese formulas hold directly in the convergence domain and extend as identities between meromorphic functions.\n\nFor positive integers \\(m,n\\),\n\n\\[B(m,n)=\\frac{(m-1)!(n-1)!}{(m+n-1)!},\\]\n\nwhere the exclamation marks denote factorials. In particular,\n\n\\[B(1,b)=\\frac1b,\\qquad B(a,1)=\\frac1a,\\]\n\nand\n\n\\[B(2,3)=\\frac1{12}.\\]\n\nUsing \\(\\Gamma(1/2)=\\sqrt{\\pi}\\),\n\n\\[B\\left(\\frac12,\\frac12\\right)=\\pi, \\qquad B\\left(a,\\frac12\\right) = \\frac{\\sqrt{\\pi}\\,\\Gamma(a)} {\\Gamma(a+\\tfrac12)}.\\]\n\nEuler's reflection formula for the gamma function also gives\n\n\\[B(a,1-a)=\\frac{\\pi}{\\sin(\\pi a)}.\\]\n\nAs an ordinary beta integral, this identity applies when \\(0<\\operatorname{Re}(a)<1\\); elsewhere it is understood through meromorphic continuation."
    },
    {
      "heading": "Alternative integral representations",
      "text": "Several changes of variables make the beta function useful for recognizing apparently different integrals.\n\nWith \\(t=u/(1+u)\\),\n\n\\[B(a,b) = \\int_0^\\infty \\frac{u^{a-1}}{(1+u)^{a+b}}\\,du, \\qquad \\operatorname{Re}(a),\\operatorname{Re}(b)>0.\\]\n\nThus\n\n\\[\\int_0^\\infty \\frac{x^{p-1}}{(1+x)^q}\\,dx = B(p,q-p),\\]\n\nprovided\n\n\\[\\operatorname{Re}(p)>0,\\qquad \\operatorname{Re}(q-p)>0.\\]\n\nWith \\(t=\\sin^2\\theta\\),\n\n\\[B(a,b) = 2\\int_0^{\\pi/2} (\\sin\\theta)^{2a-1} (\\cos\\theta)^{2b-1}\\,d\\theta.\\]\n\nFor real \\(p,q>-1\\), this becomes\n\n\\[\\int_0^{\\pi/2} \\sin^p\\theta\\,\\cos^q\\theta\\,d\\theta = \\frac12 B\\left(\\frac{p+1}{2},\\frac{q+1}{2}\\right).\\]\n\nThis representation is particularly useful in calculus and in geometric integrals expressed through angular coordinates.\n\nMore generally, for \\(L>0\\),\n\n\\[\\int_0^L x^{a-1}(L-x)^{b-1}\\,dx = L^{a+b-1}B(a,b).\\]\n\nThe scaling factor follows immediately from \\(x=Lt\\)."
    },
    {
      "heading": "Analytic continuation",
      "text": "The gamma quotient provides an analytic continuation of the beta function to a meromorphic function of two complex variables:\n\n\\[B(a,b)=\\Gamma(a)\\Gamma(b)\\frac1{\\Gamma(a+b)}.\\]\n\nThe gamma function has simple poles at the nonpositive integers and no zeros; its reciprocal is entire and vanishes at those integers. Accordingly, the beta function has polar divisors along\n\n\\[a=0,-1,-2,\\ldots \\qquad\\text{and}\\qquad b=0,-1,-2,\\ldots.\\]\n\nFor a generic fixed value of one parameter, these produce simple poles in the other. Special fixed parameter values can cause cancellations.\n\nFor example, fixing \\(b=1\\) gives\n\n\\[B(a,1)=\\frac1a,\\]\n\nwhose only pole is at \\(a=0\\), although the separate gamma factors have poles at other nonpositive integers. Such cancellations must be handled through the meromorphic expression or an appropriate limit, not by separately assigning infinite values to its factors.\n\nThe beta function is therefore distinct from its defining integral: the continued function can have finite values at parameter pairs for which the original integral diverges."
    },
    {
      "heading": "Incomplete and regularized beta functions",
      "text": "The incomplete beta function truncates the upper limit of integration:\n\n\\[B_z(a,b)=\\int_0^z t^{a-1}(1-t)^{b-1}\\,dt.\\]\n\nFor real \\(a,b>0\\) and \\(0\\le z\\le1\\), the regularized incomplete beta function is\n\n\\[I_z(a,b)=\\frac{B_z(a,b)}{B(a,b)}.\\]\n\nThe distinction is important: \\(B_z\\) is an unnormalized integral, whereas \\(I_z\\) ranges from zero to one.\n\nIts endpoint values and complement identity are\n\n\\[I_0(a,b)=0,\\qquad I_1(a,b)=1,\\]\n\n\\[I_z(a,b)=1-I_{1-z}(b,a).\\]\n\nDifferentiation with respect to the endpoint gives\n\n\\[\\frac{d}{dz}I_z(a,b) = \\frac{z^{a-1}(1-z)^{b-1}}{B(a,b)}, \\qquad 0<z<1.\\]\n\nExtensions to complex \\(z\\) require choices of branches and integration paths because the integrand can have branch points at \\(0\\) and \\(1\\)."
    },
    {
      "heading": "Probability and statistics",
      "text": "Beta distributions\n\nFor positive parameters \\(a,b\\), the beta distribution has probability density function\n\n\\[f(x)=\\frac{x^{a-1}(1-x)^{b-1}}{B(a,b)}, \\qquad 0<x<1.\\]\n\nThe beta function is exactly the constant needed to make the density integrate to one.\n\nIf \\(X\\) has this distribution, its real moments satisfy\n\n\\[\\mathbb{E}[X^r] = \\frac{B(a+r,b)}{B(a,b)}, \\qquad a+r>0.\\]\n\nIn particular, its mean and variance are\n\n\\[\\mathbb{E}[X]=\\frac{a}{a+b}, \\qquad \\operatorname{Var}(X) = \\frac{ab}{(a+b)^2(a+b+1)}.\\]\n\nIts cumulative distribution function is\n\n\\[\\Pr(X\\le z)=I_z(a,b).\\]\n\nGamma variables and proportions\n\nIf \\(U\\) and \\(V\\) are independent variables with gamma distributions, having shapes \\(a,b>0\\) and the same scale parameter, then\n\n\\[\\frac{U}{U+V}\\sim\\operatorname{Beta}(a,b).\\]\n\nMoreover, this ratio is independent of the sum \\(U+V\\). The result follows from the same change of variables used to derive the beta–gamma identity.\n\nBinomial probabilities and Bayesian inference\n\nFor \\(X\\sim\\operatorname{Binomial}(n,p)\\),\n\n\\[\\Pr(X\\le k) = I_{1-p}(n-k,k+1), \\qquad 0\\le k<n.\\]\n\nThus incomplete beta routines can compute binomial tail probabilities without explicitly summing many individual terms.\n\nIn Bayesian inference, a beta prior is a conjugate prior for a Bernoulli or binomial success probability. If a beta prior has parameters \\(a,b\\), and the observations contain \\(s\\) successes and \\(f\\) failures, the posterior has parameters\n\n\\[a+s,\\qquad b+f.\\]\n\nRatios of beta functions then appear in integrated likelihoods and predictive probabilities."
    },
    {
      "heading": "Multivariate generalization",
      "text": "The multivariate beta function is\n\n\\[B(\\alpha_1,\\ldots,\\alpha_k) = \\frac{\\prod_{i=1}^{k}\\Gamma(\\alpha_i)} {\\Gamma\\left(\\sum_{i=1}^{k}\\alpha_i\\right)}, \\qquad \\alpha_i>0.\\]\n\nIt is the normalizing integral for the Dirichlet distribution, the multivariate counterpart of the beta distribution.\n\nWriting \\(x_k=1-\\sum_{i=1}^{k-1}x_i\\), its integral representation is\n\n\\[B(\\alpha_1,\\ldots,\\alpha_k) = \\int_{\\substack{x_i>0\\\\ \\sum_{i=1}^{k-1}x_i<1}} \\left(\\prod_{i=1}^{k-1}x_i^{\\alpha_i-1}\\right) \\left(1-\\sum_{i=1}^{k-1}x_i\\right)^{\\alpha_k-1} \\,dx_1\\cdots dx_{k-1}.\\]\n\nFor \\(k=2\\), this reduces to the ordinary beta integral."
    },
    {
      "heading": "Numerical evaluation",
      "text": "Directly evaluating\n\n\\[\\frac{\\Gamma(a)\\Gamma(b)}{\\Gamma(a+b)}\\]\n\ncan overflow or underflow in floating-point arithmetic, even when the final result is representable. For positive real parameters, a standard approach is to compute\n\n\\[\\log B(a,b) = \\log\\Gamma(a)+\\log\\Gamma(b)-\\log\\Gamma(a+b),\\]\n\nand exponentiate only if the beta value itself is required. Keeping results in logarithmic form is often preferable in likelihood calculations.\n\nLogarithmic evaluation does not remove every source of error: subtraction of large, nearly equal quantities can still reduce accuracy. Specialized implementations use parameter-dependent transformations, recurrences, and asymptotic formulas.\n\nIncomplete beta evaluation additionally uses power series, continued fractions, and asymptotic expansions in different parameter regions. For tail probabilities, numerical stability may require computing the small complementary tail directly rather than subtracting a value close to one from one."
    }
  ],
  "links": [
    "mathematical-function",
    "gamma-function",
    "real-number",
    "integral",
    "complex-number",
    "analytic-function",
    "jacobian-matrix",
    "integration-by-parts",
    "recurrence-relation",
    "integer",
    "factorial",
    "calculus",
    "analytic-continuation",
    "beta-distribution",
    "probability-density-function",
    "expected-value",
    "variance",
    "cumulative-distribution-function",
    "statistical-independence",
    "binomial-distribution",
    "bayesian-inference",
    "conjugate-prior",
    "dirichlet-distribution",
    "floating-point-arithmetic",
    "power-series",
    "continued-fraction",
    "asymptotic-expansion",
    "numerical-stability"
  ],
  "sources": [],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}