ℹ️ Skipped - page is already crawled
| Filter | Status | Condition | Details |
|---|---|---|---|
| HTTP status | PASS | download_http_code = 200 | HTTP 200 |
| Age cutoff | PASS | download_stamp > now() - 6 MONTH | 0.4 months ago |
| History drop | PASS | isNull(history_drop_reason) | No drop reason |
| Spam/ban | PASS | fh_dont_index != 1 AND ml_spam_score = 0 | ml_spam_score=0 |
| Canonical | PASS | meta_canonical IS NULL OR = '' OR = src_unparsed | Not set |
| Property | Value |
|---|---|
| URL | https://distribution-explorer.github.io/continuous/beta.html |
| Last Crawled | 2026-04-05 23:08:05 (12 days ago) |
| First Indexed | 2020-08-29 03:32:59 (5 years ago) |
| HTTP Status Code | 200 |
| Meta Title | Beta distribution — Probability Distribution Explorer documentation |
| Meta Description | null |
| Meta Canonical | null |
| Boilerpipe Text | Story
Say you wait for two multistep Poisson processes to arrive. The individual steps of each process happen at the same rate, but the first multistep process requires
α
steps and the second requires
β
steps. The fraction of the total waiting time taken by the first process is Beta distributed.
Parameters
There are two shape parameters, both strictly positive:
α
and
β
, defined in the above story.
Support
The Beta distribution has support on the interval [0, 1].
Probability density function
f
(
θ
;
α
,
β
)
=
θ
α
−
1
(
1
−
θ
)
β
−
1
B
(
α
,
β
)
,
where
B
(
α
,
β
)
is the
beta function
.
Cumulative distribution function
F
(
θ
;
α
,
β
)
=
I
θ
(
α
,
β
)
=
1
B
(
α
,
β
)
∫
0
θ
d
x
x
α
−
1
(
1
−
x
)
β
−
1
,
where
I
θ
(
α
,
β
)
is the
regularized incomplete beta function
.
Moments
Mean:
α
α
+
β
Variance:
α
β
(
α
+
β
)
2
(
α
+
β
+
1
)
Usage
Package
Syntax
NumPy
rng.beta(alpha,
beta)
NumPy with (φ, κ) parametrizaton
rng.beta(phi*kappa,
(1-phi)*kappa)
SciPy
scipy.stats.beta(alpha,
beta)
SciPy with (φ, κ) parametrizaton
scipy.stats.beta(phi*kappa,
(1-phi)*kappa)
Distributions.jl
Beta(alpha,
beta)
Distributions.jl (φ, κ) parametrizaton
Beta(phi*kappa,
(1-phi)*kappa)
Stan
beta(alpha,
beta)
Stan with (φ, κ) parametrizaton
beta(phi*kappa,
(1-phi)*kappa)
Notes
The story of the Beta distribution is difficult to parse. Most importantly, the Beta distribution allows us to put probabilities on unknown probabilities. It is only defined on
0
≤
θ
≤
1
, and
θ
here can be interpreted as a probability, say of success in a Bernoulli trial.
The case where
α
=
β
=
0
is not technically a probability distribution because the PDF cannot be normalized. Nonetheless, it is often used as an improper prior, and this prior is known a Haldane prior, names after biologist
J. B. S. Haldane
. The case where
α
=
β
=
1
/
2
is sometimes called a Jeffreys prior.
The Beta distribution may also be parametrized in terms of the location parameter
ϕ
and concentration
κ
, which are related to
α
and
β
as
ϕ
=
α
α
+
β
,
κ
=
α
+
β
.
The location parameter
ϕ
is the mean of the distribution and
κ
is a measure of how broad it is. To convert back to an
(
α
,
β
)
parametrization from a
(
ϕ
,
κ
)
parametrization, use
α
=
ϕ
κ
,
β
=
(
1
−
ϕ
)
κ
.
The mean and variance in terms of
ϕ
and
κ
are
Mean:
ϕ
Variance:
ϕ
(
1
−
ϕ
)
1
+
κ
.
PDF and CDF plots
In the α-β formulation:
In the φ-κ formulation:
Links
Wikipedia
Numpy
Scipy
Distributions.jl
Stan |
| Markdown | [](https://distribution-explorer.github.io/index.html)
Background
- [Motivation](https://distribution-explorer.github.io/background/motivation.html)
- [Review of key concepts](https://distribution-explorer.github.io/background/review_of_key_concepts.html)
- [Special functions](https://distribution-explorer.github.io/background/special_functions.html)
- [Software packages](https://distribution-explorer.github.io/background/software.html)
- [Other resources](https://distribution-explorer.github.io/background/resources.html)
- [Vignette contents](https://distribution-explorer.github.io/background/vignette_contents.html)
Univariate discrete
- [Bernoulli distribution](https://distribution-explorer.github.io/discrete/bernoulli.html)
- [Binomial distribution](https://distribution-explorer.github.io/discrete/binomial.html)
- [Categorical distribution](https://distribution-explorer.github.io/discrete/categorical.html)
- [Discrete Uniform distribution](https://distribution-explorer.github.io/discrete/discrete_uniform.html)
- [Geometric distribution](https://distribution-explorer.github.io/discrete/geometric.html)
- [Hypergeometric distribution](https://distribution-explorer.github.io/discrete/hypergeometric.html)
- [Negative Binomial distribution](https://distribution-explorer.github.io/discrete/negative_binomial.html)
- [Poisson distribution](https://distribution-explorer.github.io/discrete/poisson.html)
Univariate continuous
- [Beta distribution](https://distribution-explorer.github.io/continuous/beta.html)
- [Story](https://distribution-explorer.github.io/continuous/beta.html#story)
- [Parameters](https://distribution-explorer.github.io/continuous/beta.html#parameters)
- [Support](https://distribution-explorer.github.io/continuous/beta.html#support)
- [Probability density function](https://distribution-explorer.github.io/continuous/beta.html#probability-density-function)
- [Cumulative distribution function](https://distribution-explorer.github.io/continuous/beta.html#cumulative-distribution-function)
- [Moments](https://distribution-explorer.github.io/continuous/beta.html#moments)
- [Usage](https://distribution-explorer.github.io/continuous/beta.html#usage)
- [Related distributions](https://distribution-explorer.github.io/continuous/beta.html#related-distributions)
- [Notes](https://distribution-explorer.github.io/continuous/beta.html#notes)
- [PDF and CDF plots](https://distribution-explorer.github.io/continuous/beta.html#pdf-and-cdf-plots)
- [Links](https://distribution-explorer.github.io/continuous/beta.html#links)
- [Cauchy distribution](https://distribution-explorer.github.io/continuous/cauchy.html)
- [Chi-square distribution](https://distribution-explorer.github.io/continuous/chi_square.html)
- [Double Exponential (Laplace) distribution](https://distribution-explorer.github.io/continuous/double_exponential.html)
- [Exponential distribution](https://distribution-explorer.github.io/continuous/exponential.html)
- [Gamma distribution](https://distribution-explorer.github.io/continuous/gamma.html)
- [Half-Cauchy distribution](https://distribution-explorer.github.io/continuous/halfcauchy.html)
- [Half-Normal distribution](https://distribution-explorer.github.io/continuous/halfnormal.html)
- [Half-Student-t distribution](https://distribution-explorer.github.io/continuous/halfstudent_t.html)
- [Inverse Gamma distribution](https://distribution-explorer.github.io/continuous/inverse_gamma.html)
- [Inverse Gaussian distribution](https://distribution-explorer.github.io/continuous/inverse_gaussian.html)
- [Log-Normal distribution](https://distribution-explorer.github.io/continuous/lognormal.html)
- [Normal distribution](https://distribution-explorer.github.io/continuous/normal.html)
- [Pareto distribution](https://distribution-explorer.github.io/continuous/pareto.html)
- [Student-t distribution](https://distribution-explorer.github.io/continuous/student_t.html)
- [Uniform distribution](https://distribution-explorer.github.io/continuous/uniform.html)
- [Von Mises distribution](https://distribution-explorer.github.io/continuous/vonmises.html)
- [Weibull distribution](https://distribution-explorer.github.io/continuous/weibull.html)
Multivariate discrete
- [Multinomial distribution](https://distribution-explorer.github.io/multivariate_discrete/multinomial.html)
Multivariate continuous
- [Dirichlet distribution](https://distribution-explorer.github.io/multivariate_continuous/dirichlet.html)
- [Lewandowski-Kurowicka-Joe (LKJ) distribution](https://distribution-explorer.github.io/multivariate_continuous/lkj.html)
- [Multivariate Normal distribution](https://distribution-explorer.github.io/multivariate_continuous/multivariate_normal.html)
[Probability Distribution Explorer](https://distribution-explorer.github.io/index.html)
***
# Beta distribution[](https://distribution-explorer.github.io/continuous/beta.html#beta-distribution "Link to this heading")
***
## Story[](https://distribution-explorer.github.io/continuous/beta.html#story "Link to this heading")
Say you wait for two multistep Poisson processes to arrive. The individual steps of each process happen at the same rate, but the first multistep process requires α steps and the second requires β steps. The fraction of the total waiting time taken by the first process is Beta distributed.
***
## Parameters[](https://distribution-explorer.github.io/continuous/beta.html#parameters "Link to this heading")
There are two shape parameters, both strictly positive: α and β, defined in the above story.
***
## Support[](https://distribution-explorer.github.io/continuous/beta.html#support "Link to this heading")
The Beta distribution has support on the interval \[0, 1\].
***
## Probability density function[](https://distribution-explorer.github.io/continuous/beta.html#probability-density-function "Link to this heading")
f
(
θ
;
α
,
β
)
\=
θ
α
−
1
(
1
−
θ
)
β
−
1
B
(
α
,
β
)
,
where B ( α , β ) is the [beta function](https://distribution-explorer.github.io/background/special_functions.html#beta-function).
***
## Cumulative distribution function[](https://distribution-explorer.github.io/continuous/beta.html#cumulative-distribution-function "Link to this heading")
F
(
θ
;
α
,
β
)
\=
I
θ
(
α
,
β
)
\=
1
B
(
α
,
β
)
∫
0
θ
d
x
x
α
−
1
(
1
−
x
)
β
−
1
,
where I θ ( α , β ) is the [regularized incomplete beta function](https://distribution-explorer.github.io/background/special_functions.html#regularized-incomplete-beta-function).
***
## Moments[](https://distribution-explorer.github.io/continuous/beta.html#moments "Link to this heading")
Mean: α α \+ β
Variance: α β ( α \+ β ) 2 ( α \+ β \+ 1 )
***
## Usage[](https://distribution-explorer.github.io/continuous/beta.html#usage "Link to this heading")
| Package | Syntax |
|---|---|
| **NumPy** | `rng.beta(alpha, beta)` |
| **NumPy with (φ, κ) parametrizaton** | `rng.beta(phi*kappa, (1-phi)*kappa)` |
| **SciPy** | `scipy.stats.beta(alpha, beta)` |
| **SciPy with (φ, κ) parametrizaton** | `scipy.stats.beta(phi*kappa, (1-phi)*kappa)` |
| **Distributions.jl** | `Beta(alpha, beta)` |
| **Distributions.jl (φ, κ) parametrizaton** | `Beta(phi*kappa, (1-phi)*kappa)` |
| **Stan** | `beta(alpha, beta)` |
| **Stan with (φ, κ) parametrizaton** | `beta(phi*kappa, (1-phi)*kappa)` |
***
## Related distributions[](https://distribution-explorer.github.io/continuous/beta.html#related-distributions "Link to this heading")
- The [Uniform distribution](https://distribution-explorer.github.io/continuous/uniform.html#uniform) on the interval \[0, 1\] is a special case of the Beta distribution with α \= β \= 1.
- The Beta distribution is a special case of the [Dirichlet distribution](https://distribution-explorer.github.io/multivariate_continuous/dirichlet.html#dirichlet) with K \= 2.
***
## Notes[](https://distribution-explorer.github.io/continuous/beta.html#notes "Link to this heading")
- The story of the Beta distribution is difficult to parse. Most importantly, the Beta distribution allows us to put probabilities on unknown probabilities. It is only defined on 0 ≤ θ ≤ 1, and θ here can be interpreted as a probability, say of success in a Bernoulli trial.
- The case where α \= β \= 0 is not technically a probability distribution because the PDF cannot be normalized. Nonetheless, it is often used as an improper prior, and this prior is known a Haldane prior, names after biologist [J. B. S. Haldane](https://en.wikipedia.org/wiki/J._B._S._Haldane). The case where α \= β \= 1 / 2 is sometimes called a Jeffreys prior.
- The Beta distribution may also be parametrized in terms of the location parameter ϕ and concentration κ, which are related to α and β as
ϕ
\=
α
α
\+
β
,
κ
\=
α
\+
β
.
The location parameter ϕ is the mean of the distribution and κ is a measure of how broad it is. To convert back to an ( α , β ) parametrization from a ( ϕ , κ ) parametrization, use
α
\=
ϕ
κ
,
β
\=
(
1
−
ϕ
)
κ
.
The mean and variance in terms of ϕ and κ are
Mean: ϕ
Variance: ϕ ( 1 − ϕ ) 1 \+ κ.
***
## PDF and CDF plots[](https://distribution-explorer.github.io/continuous/beta.html#pdf-and-cdf-plots "Link to this heading")
In the α-β formulation:
In the φ-κ formulation:
***
## Links[](https://distribution-explorer.github.io/continuous/beta.html#links "Link to this heading")
- [Wikipedia](https://en.wikipedia.org/wiki/Beta_distribution)
- [Numpy](https://docs.scipy.org/doc/numpy/reference/random/generated/numpy.random.Generator.beta.html)
- [Scipy](https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.beta.html)
- [Distributions.jl](https://juliastats.org/Distributions.jl/stable/univariate/#Distributions.Beta)
- [Stan](https://mc-stan.org/docs/functions-reference/beta-distribution.html)
[Previous](https://distribution-explorer.github.io/discrete/poisson.html "Poisson distribution") [Next](https://distribution-explorer.github.io/continuous/cauchy.html "Cauchy distribution")
***
Last updated on Dec 07, 2025.
© 2019–2024 Justin Bois. This work is licensed under a [Creative Commons Attribution License CC-BY 4.0](https://creativecommons.org/licenses/by/4.0/).
This document was prepared at [Caltech](http://www.caltech.edu/) with financial support from the [Donna and Benjamin M. Rosen Bioengineering Center](http://rosen.caltech.edu/).
[](http://rosen.caltech.edu/)
Built with [Sphinx](http://sphinx-doc.org/) using a [theme](https://github.com/rtfd/sphinx_rtd_theme) provided by [Read the Docs](https://readthedocs.org/). |
| Readable Markdown | null |
| Shard | 143 (laksa) |
| Root Hash | 2566890010099092343 |
| Unparsed URL | io,github!distribution-explorer,/continuous/beta.html s443 |