Defines a Beta random variable. It uses in the backend
all functions that defines a Beta random variable. As
the other definitions in distributions this is an
R6 object. Tha parametrization used
is from a $$X \sim \mathsf{Beta}(\alpha, \beta)\,,$$
where the parameters \(\alpha\) and \(\beta\) are
the parameters defining a Beta random variable.
Note
All random variables in distributions are defined as R6
objects. The fields (referenced below) are needed for objects of
R6::R6Class. In our context these are what defines
which specific instance of a
random variable is used. That is, the public fields are the
parameters of the random variable \(\theta \in \mathbb{R}^p\), for some
\(p\).
See also
Other continuous:
GaussianRandomVariable,
UniformRandomVariable
Public fields
alpha(
double, positive)
the first parameter of the distribution, \(\alpha > 0\).beta(
double, positive)
the second parameter of the distribution, \(\beta > 0\).
Methods
Method new()
Generates a Beta ContinuousRandomVariable object with specified
parameters alpha (alpha) and beta (beta).
Usage
BetaRandomVariable$new(alpha = 1, beta = 1)Method sample()
Generates random variables using the stats::rbeta() function.
Method density()
Evaluates the density function using the stats::dbeta() function.
