Generates a floating‐point variate conforming to a Beta distribution: pdf(x) propto xˆ(alpha‐1) * (1‐x)ˆ(beta‐1), where the params alpha and beta are both strictly positive real values.
Synopsis
Declared in <absl/random/beta_distribution.h>
template<typename RealType = double>
class beta_distribution;
Description
The support is the open interval (0, 1), but the return value might be equal to 0 or 1, due to numerical errors when alpha and beta are very different.
Usage note: One usage is that alpha and beta are counts of number of successes and failures. When the total number of trials are large, consider approximating a beta distribution with a Gaussian distribution with the same mean and variance. One could use the skewness, which depends only on the smaller of alpha and beta when the number of trials are sufficiently large, to quantify how far a beta distribution is from the normal distribution.
Types
Name |
Description |
The parameter set of the distribution. |
Type Aliases
Name |
Description |
The type of the values produced by the distribution. |
Member Functions
Name |
Description |
|
Constructors |
Returns the first shape parameter. |
|
Returns the second shape parameter. |
|
Returns the largest value the distribution can produce. |
|
Returns the smallest value the distribution can produce. |
|
Function call operators |
|
|
|
Resets the internal state of the distribution. |
Friends
Name |
Description |
Compares two distributions for inequality. |
|
Compares two distributions for equality. |
Created with MrDocs