BetaDistribution
✖
BetaDistribution
Details

- The probability density for value
in a beta distribution is proportional to
for
, and is zero for
or
. »
- BetaDistribution allows α and β to be any positive real numbers.
- BetaDistribution allows α and β to be dimensionless quantities. »
- BetaDistribution can be used with such functions as Mean, CDF, and RandomVariate. »
Background & Context
- BetaDistribution[α,β] represents a statistical distribution defined over the interval
and parametrized by two positive values α, β known as "shape parameters", which, roughly speaking, determine the "fatness" of the left and right tails in the probability density function (PDF). Depending on the values of α and β, the PDF of the beta distribution may be monotonic increasing, monotonic decreasing, or unimodal with potential singularities approaching the boundaries of its domain.
- The beta distribution arises as a prior distribution for binomial proportions in Bayesian analysis. It is also commonly used to model random variables limited to a finite interval. For example, the distribution of the
smallest element in a continuous, independent, and uniformly distributed sample of size of
can be computed using OrderDistribution[{UniformDistribution[],n},k] and is precisely equal to BetaDistribution[k,n-k+1]. In addition to its statistical significance, the beta distribution also plays a fundamental role in a number of scientific fields, including phenomena related to allele frequency distribution, soil property variability, geological mineral-to-rock ratios, and HIV transmission behavior.
- RandomVariate can be used to give one or more machine- or arbitrary-precision (the latter via the WorkingPrecision option) pseudorandom variates from a beta distribution. Distributed[x,BetaDistribution[α,β]], written more concisely as xBetaDistribution[α,β], can be used to assert that a random variable x is distributed according to a beta distribution. Such an assertion can then be used in functions such as Probability, NProbability, Expectation, and NExpectation.
- The probability density and cumulative distribution functions may be given using PDF[BetaDistribution[α,β],x] and CDF[BetaDistribution[α,β],x]. The mean, median, variance, raw moments, and central moments may be computed using Mean, Median, Variance, Moment, and CentralMoment, respectively.
- DistributionFitTest can be used to test if a given dataset is consistent with a beta distribution, EstimatedDistribution to estimate a beta parametric distribution from given data, and FindDistributionParameters to fit data to a beta distribution. ProbabilityPlot can be used to generate a plot of the CDF of given data against the CDF of a symbolic beta distribution and QuantilePlot to generate a plot of the quantiles of given data against the quantiles of a symbolic beta distribution.
- TransformedDistribution can be used to represent a transformed beta distribution, CensoredDistribution to represent the distribution of values censored between upper and lower values, and TruncatedDistribution to represent the distribution of values truncated between upper and lower values. CopulaDistribution can be used to build higher-dimensional distributions that contain a beta distribution, and ProductDistribution can be used to compute a joint distribution with independent component distributions involving beta distributions.
- The beta distribution is related to a number of other distributions. For example, BetaDistribution is the so-called "conjugate prior" for the parameters of a number of other distributions, including BernoulliDistribution, BinomialDistribution, NegativeBinomialDistribution, and GeometricDistribution. Moreover, BetaDistribution generalizes both UniformDistribution and PowerDistribution in the sense that (modulo inclusion of the endpoints
and
), PDF[BetaDistribution[1,1],x] is equal to both PDF[UniformDistribution[],x] and PDF[PowerDistribution[1,1],x]. BetaDistribution can also be obtained as transformations of KumaraswamyDistribution and NoncentralBetaDistribution and is closely related to PERTDistribution, PearsonDistribution, ChiSquareDistribution, GammaDistribution, FRatioDistribution, and BetaPrimeDistribution.
Examples
open allclose allBasic Examples (4)Summary of the most common use cases

https://wolfram.com/xid/0g7kenjf9sq-6ghfcq


https://wolfram.com/xid/0g7kenjf9sq-xi7qe0


https://wolfram.com/xid/0g7kenjf9sq-crqw28

Cumulative distribution function:

https://wolfram.com/xid/0g7kenjf9sq-o4atla


https://wolfram.com/xid/0g7kenjf9sq-8fypqg


https://wolfram.com/xid/0g7kenjf9sq-xzaznn


https://wolfram.com/xid/0g7kenjf9sq-kc5


https://wolfram.com/xid/0g7kenjf9sq-xtk


https://wolfram.com/xid/0g7kenjf9sq-4zlnan

Scope (8)Survey of the scope of standard use cases
Generate a sample of pseudorandom numbers from a beta distribution:

https://wolfram.com/xid/0g7kenjf9sq-tscvhm
Compare the histogram to the PDF:

https://wolfram.com/xid/0g7kenjf9sq-fw0ala

Distribution parameters estimation:

https://wolfram.com/xid/0g7kenjf9sq-45b7g2
Estimate the distribution parameters from sample data:

https://wolfram.com/xid/0g7kenjf9sq-epi747

Compare a density histogram of the sample with the PDF of the estimated distribution:

https://wolfram.com/xid/0g7kenjf9sq-f8ui5o

Skewness varies with shape parameters:

https://wolfram.com/xid/0g7kenjf9sq-3n7jeg


https://wolfram.com/xid/0g7kenjf9sq-i6l

When both parameters go to , the distribution becomes symmetric:

https://wolfram.com/xid/0g7kenjf9sq-hcr61q

Kurtosis varies with shape parameters:

https://wolfram.com/xid/0g7kenjf9sq-6aiaq1


https://wolfram.com/xid/0g7kenjf9sq-gft

In the limit, the kurtosis becomes the same as for NormalDistribution:

https://wolfram.com/xid/0g7kenjf9sq-70koo4


https://wolfram.com/xid/0g7kenjf9sq-hn3lr

Different moments with closed forms as functions of parameters:

https://wolfram.com/xid/0g7kenjf9sq-js043h

https://wolfram.com/xid/0g7kenjf9sq-rx074o


https://wolfram.com/xid/0g7kenjf9sq-pknsqa


https://wolfram.com/xid/0g7kenjf9sq-zg9ct4


https://wolfram.com/xid/0g7kenjf9sq-9gzmth


https://wolfram.com/xid/0g7kenjf9sq-cly108


https://wolfram.com/xid/0g7kenjf9sq-cmoefp


https://wolfram.com/xid/0g7kenjf9sq-zet7d0


https://wolfram.com/xid/0g7kenjf9sq-8ljlc3


https://wolfram.com/xid/0g7kenjf9sq-ffrzb1


https://wolfram.com/xid/0g7kenjf9sq-m8kdz6

Consistent use of Quantity in parameters expands them into their numeric values:

https://wolfram.com/xid/0g7kenjf9sq-gr2bgd


https://wolfram.com/xid/0g7kenjf9sq-h594k5

Applications (3)Sample problems that can be solved with this function
Cloud duration approximately follows a beta distribution with parameters 0.3 and 0.4 for a particular location. Find the probability that cloud duration will be longer than half a day:

https://wolfram.com/xid/0g7kenjf9sq-1og0gu

Simulate the fraction of the day that is cloudy over a period of one month:

https://wolfram.com/xid/0g7kenjf9sq-ex9npo

https://wolfram.com/xid/0g7kenjf9sq-txou6v

Find the average cloudiness duration for a day:

https://wolfram.com/xid/0g7kenjf9sq-3hhdl7

Find the probability of having exactly 20 days in a month with cloud duration less than 10%:

https://wolfram.com/xid/0g7kenjf9sq-dgsxa0

https://wolfram.com/xid/0g7kenjf9sq-cww8e7

Find the probability of at least 20 days in a month with cloud duration less than 10%:

https://wolfram.com/xid/0g7kenjf9sq-gdcxid

Beta distribution can be used to model the proportion of the stocks that increase in value on a given day. Fit beta distribution to the Dow Jones Industrial stocks data:

https://wolfram.com/xid/0g7kenjf9sq-hhnw8h


https://wolfram.com/xid/0g7kenjf9sq-vzl714
Number of days for each financial entity:

https://wolfram.com/xid/0g7kenjf9sq-e15an6

Extract values from time series for each entity and normalize numeric quantities:

https://wolfram.com/xid/0g7kenjf9sq-bdcjdx
Check if each entity has the same length of data:

https://wolfram.com/xid/0g7kenjf9sq-ldtuwa


https://wolfram.com/xid/0g7kenjf9sq-oibkmk

Calculate the daily ratio of companies with an increase in value:

https://wolfram.com/xid/0g7kenjf9sq-b1xazx
Find fit, excluding days with no companies having an increase in value:

https://wolfram.com/xid/0g7kenjf9sq-18xqlp

Compare the histogram of the data with the PDF of the estimated distribution:

https://wolfram.com/xid/0g7kenjf9sq-z8idun

Find the probability that at least 60% of Dow Jones Industrial stocks will increase in value:

https://wolfram.com/xid/0g7kenjf9sq-k3z2y6

Find the average percentage of Dow Jones Industrial stocks that will increase in value:

https://wolfram.com/xid/0g7kenjf9sq-l8d1x5

Simulate the percentage of Dow Jones Industrial stocks that will increase in value for 30 days:

https://wolfram.com/xid/0g7kenjf9sq-ogrhpe

Discrete-time Markov chain , where
is the sequence of independent and identically distributed (iid) standard uniform random variables, and
is the sequence of iid Bernoulli random variables with success probability of
converges to stationary distribution BetaDistribution[p,1-p] for any initial condition
such that
:

https://wolfram.com/xid/0g7kenjf9sq-d8x1dq
Sample a realization of the Markov chain and discard the burn-in portion of the path:

https://wolfram.com/xid/0g7kenjf9sq-wea5d
Samples from the Markov chain are not independent and exhibit internal structure:

https://wolfram.com/xid/0g7kenjf9sq-jhh7sk

Compare the histogram of path values to the PDF of the Markov chain's stationary distribution:

https://wolfram.com/xid/0g7kenjf9sq-cwr1w

Use path values to approximate an expectation:

https://wolfram.com/xid/0g7kenjf9sq-dcivz6

Compare with the quadrature value:

https://wolfram.com/xid/0g7kenjf9sq-f6nfr1

Properties & Relations (21)Properties of the function, and connections to other functions
If a variate follows beta distribution, then
follows the reflected distribution:

https://wolfram.com/xid/0g7kenjf9sq-sdo87r

Relationships to other distributions:

BetaDistribution[1,1] is equivalent to UniformDistribution[{0,1}]:

https://wolfram.com/xid/0g7kenjf9sq-res


https://wolfram.com/xid/0g7kenjf9sq-r6e

BetaDistribution is a transformation of UniformDistribution:

https://wolfram.com/xid/0g7kenjf9sq-r56wcy

UniformDistribution is a transformation of BetaDistribution:

https://wolfram.com/xid/0g7kenjf9sq-oumvvz

BetaDistribution is a limiting case of NoncentralBetaDistribution:

https://wolfram.com/xid/0g7kenjf9sq-dlrhy8


https://wolfram.com/xid/0g7kenjf9sq-ewhxcn


https://wolfram.com/xid/0g7kenjf9sq-pe9es2

BetaPrimeDistribution can be obtained as a transformation of the beta-distributed variable:

https://wolfram.com/xid/0g7kenjf9sq-sywssu


https://wolfram.com/xid/0g7kenjf9sq-yd91s5

Beta distribution is a special case of PearsonDistribution of type 1:

https://wolfram.com/xid/0g7kenjf9sq-x3yp0y


https://wolfram.com/xid/0g7kenjf9sq-negofw


https://wolfram.com/xid/0g7kenjf9sq-of2jpp

Beta distribution can be obtained as a transformation of GammaDistribution:

https://wolfram.com/xid/0g7kenjf9sq-ub1zwk

Beta distribution can be obtained as a transformation of ChiSquareDistribution:

https://wolfram.com/xid/0g7kenjf9sq-bak0x0

FRatioDistribution can be obtained from beta distribution:

https://wolfram.com/xid/0g7kenjf9sq-px8s1z

https://wolfram.com/xid/0g7kenjf9sq-opzpze


https://wolfram.com/xid/0g7kenjf9sq-yz6lah


https://wolfram.com/xid/0g7kenjf9sq-tyc15u

Beta distribution is an order distribution of variables from UniformDistribution:

https://wolfram.com/xid/0g7kenjf9sq-xgzy15

ExponentialDistribution is a limit of a scaled beta distribution:

https://wolfram.com/xid/0g7kenjf9sq-d5fhku

https://wolfram.com/xid/0g7kenjf9sq-don187


https://wolfram.com/xid/0g7kenjf9sq-itl7pb


https://wolfram.com/xid/0g7kenjf9sq-8b3vgg


https://wolfram.com/xid/0g7kenjf9sq-th75rv

ExponentialDistribution is a transformation of beta distribution:

https://wolfram.com/xid/0g7kenjf9sq-e3bu74


https://wolfram.com/xid/0g7kenjf9sq-7zbko5

KumaraswamyDistribution is a transformation of beta distribution:

https://wolfram.com/xid/0g7kenjf9sq-h1ppe8

KumaraswamyDistribution simplifies to a special case of beta distribution:

https://wolfram.com/xid/0g7kenjf9sq-tyjged


https://wolfram.com/xid/0g7kenjf9sq-y0ly7p


https://wolfram.com/xid/0g7kenjf9sq-gmfqcx

PERTDistribution is a transformation of beta distribution:

https://wolfram.com/xid/0g7kenjf9sq-pvrrzu

https://wolfram.com/xid/0g7kenjf9sq-ojaijt


https://wolfram.com/xid/0g7kenjf9sq-xapy0l


https://wolfram.com/xid/0g7kenjf9sq-tg7dcq

WignerSemicircleDistribution is a transformation of special beta distribution:

https://wolfram.com/xid/0g7kenjf9sq-zo9b0n

https://wolfram.com/xid/0g7kenjf9sq-djj5oc


https://wolfram.com/xid/0g7kenjf9sq-ng3g1m


https://wolfram.com/xid/0g7kenjf9sq-s0lugl

Univariate marginals of DirichletDistribution have beta distribution:

https://wolfram.com/xid/0g7kenjf9sq-5he2sh


https://wolfram.com/xid/0g7kenjf9sq-3oha4x

BetaBinomialDistribution is a mixture of BinomialDistribution and BetaDistribution:

https://wolfram.com/xid/0g7kenjf9sq-6a4ms5

BetaNegativeBinomialDistribution is a mixture of NegativeBinomialDistribution and BetaDistribution:

https://wolfram.com/xid/0g7kenjf9sq-vysest

Possible Issues (2)Common pitfalls and unexpected behavior
BetaDistribution is not defined when either α or β is not a positive real number:

https://wolfram.com/xid/0g7kenjf9sq-dny


Substitution of invalid parameters into symbolic outputs gives results that are not meaningful:

https://wolfram.com/xid/0g7kenjf9sq-srb

Wolfram Research (2007), BetaDistribution, Wolfram Language function, https://reference.wolfram.com/language/ref/BetaDistribution.html (updated 2016).
Text
Wolfram Research (2007), BetaDistribution, Wolfram Language function, https://reference.wolfram.com/language/ref/BetaDistribution.html (updated 2016).
Wolfram Research (2007), BetaDistribution, Wolfram Language function, https://reference.wolfram.com/language/ref/BetaDistribution.html (updated 2016).
CMS
Wolfram Language. 2007. "BetaDistribution." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/BetaDistribution.html.
Wolfram Language. 2007. "BetaDistribution." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/BetaDistribution.html.
APA
Wolfram Language. (2007). BetaDistribution. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/BetaDistribution.html
Wolfram Language. (2007). BetaDistribution. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/BetaDistribution.html
BibTeX
@misc{reference.wolfram_2025_betadistribution, author="Wolfram Research", title="{BetaDistribution}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/BetaDistribution.html}", note=[Accessed: 02-June-2025
]}
BibLaTeX
@online{reference.wolfram_2025_betadistribution, organization={Wolfram Research}, title={BetaDistribution}, year={2016}, url={https://reference.wolfram.com/language/ref/BetaDistribution.html}, note=[Accessed: 02-June-2025
]}