Beta — The Beta distribution
Usage
Beta(a: Double, b: Double) → Distribution<Double>
Arguments
-
a: -
Positive shape parameter a
-
b: -
Positive shape parameter b
Description
The Beta distribution describes values between 0 and 1, such as probabilities and proportions. Its mean is a/(a+b) and its variance is a*b/((a+b)^2 * (a+b+1)).
Beta(1,1) is uniform on this interval. Increasing both shape parameters by the same factor concentrates values around the same mean.
Examples
~Beta(1,1) # Sample from a Uniform(0,1)
~IID(10, Beta(1,1)) # Generate 10 uniform samples
density(Beta(3,4),0.5) # Compute the density at 0.5