Continuous Distributions on [0, 1]
The continuous distributions with outcomes in the interval \([0,1]\) are used to characterized bounded quantities, including probabilities.
Beta distribution
Probability density function
If \(\alpha \in \mathbb{R}^+\) and \(\beta \in \mathbb{R}^+\), then for \(\theta \in (0,1)\), \[\begin{equation*} \text{Beta}(\theta|\alpha,\beta) = \frac{1}{\mathrm{B}(\alpha,\beta)} \, \theta^{\alpha - 1} \, (1 - \theta)^{\beta - 1} , \end{equation*}\] where the beta function \(\mathrm{B}()\) is as defined in section combinatorial functions.
Warning: If \(\theta = 0\) or \(\theta = 1\), then the probability is 0 and the log probability is \(-\infty\). Similarly, the distribution requires strictly positive parameters, \(\alpha, \beta > 0\).
Distribution statement
theta ~
beta
(alpha, beta)
Increment target log probability density with beta_lupdf(theta | alpha, beta)
.
Stan functions
real
beta_lpdf
(reals theta | reals alpha, reals beta)
The log of the beta density of theta
in \([0,1]\) given positive prior successes (plus one) alpha and prior failures (plus one) beta
real
beta_lupdf
(reals theta | reals alpha, reals beta)
The log of the beta density of theta
in \([0,1]\) given positive prior successes (plus one) alpha and prior failures (plus one) beta dropping constant additive terms
real
beta_cdf
(reals theta | reals alpha, reals beta)
The beta cumulative distribution function of theta
in \([0,1]\) given positive prior successes (plus one) alpha and prior failures (plus one) beta
real
beta_lcdf
(reals theta | reals alpha, reals beta)
The log of the beta cumulative distribution function of theta
in \([0,1]\) given positive prior successes (plus one) alpha and prior failures (plus one) beta
real
beta_lccdf
(reals theta | reals alpha, reals beta)
The log of the beta complementary cumulative distribution function of theta
in \([0,1]\) given positive prior successes (plus one) alpha and prior failures (plus one) beta
R
beta_rng
(reals alpha, reals beta)
Generate a beta variate with positive prior successes (plus one) alpha and prior failures (plus one) beta; may only be used in transformed data and generated quantities blocks. For a description of argument and return types, see section vectorized PRNG functions.
Beta proportion distribution
Probability density function
If \(\mu \in (0, 1)\) and \(\kappa \in \mathbb{R}^+\), then for \(\theta \in (0,1)\), \[\begin{equation*} \mathrm{Beta\_Proportion}(\theta|\mu,\kappa) = \frac{1}{\mathrm{B}(\mu \kappa, (1 - \mu) \kappa)} \, \theta^{\mu\kappa - 1} \, (1 - \theta)^{(1 - \mu)\kappa- 1} , \end{equation*}\] where the beta function \(\mathrm{B}()\) is as defined in section combinatorial functions.
Warning: If \(\theta = 0\) or \(\theta = 1\), then the probability is 0 and the log probability is \(-\infty\). Similarly, the distribution requires \(\mu \in (0, 1)\) and strictly positive parameter, \(\kappa > 0\).
Distribution statement
theta ~
beta_proportion
(mu, kappa)
Increment target log probability density with beta_proportion_lupdf(theta | mu, kappa)
.
Stan functions
real
beta_proportion_lpdf
(reals theta | reals mu, reals kappa)
The log of the beta_proportion density of theta
in \((0,1)\) given mean mu and precision kappa
real
beta_proportion_lupdf
(reals theta | reals mu, reals kappa)
The log of the beta_proportion density of theta
in \((0,1)\) given mean mu and precision kappa dropping constant additive terms
real
beta_proportion_lcdf
(reals theta | reals mu, reals kappa)
The log of the beta_proportion cumulative distribution function of theta
in \((0,1)\) given mean mu and precision kappa
real
beta_proportion_lccdf
(reals theta | reals mu, reals kappa)
The log of the beta_proportion complementary cumulative distribution function of theta
in \((0,1)\) given mean mu and precision kappa
R
beta_proportion_rng
(reals mu, reals kappa)
Generate a beta_proportion variate with mean mu and precision kappa; may only be used in transformed data and generated quantities blocks. For a description of argument and return types, see section vectorized PRNG functions.