%feature("docstring") OT::Beta
"Beta distribution.

Available constructors:
    Beta(*r=2.0, t=4.0, a=-1.0, b=1.0*)

Parameters
----------
r : float
    shape parameter :math:`r > 0` with :math:`r = t * (\mu - a) / (b - a)`.
t : float
    shape parameter :math:`t > r` with :math:`t = (b - \mu) * (\mu - a) / \sigma^2 - 1`.
a : float
    Lower bound.
b : float, :math:`b > a`
    Upper bound.

Notes
-----
Its probability density function is defined as:

.. math::

    f_X(x) = \frac{(x - a)^{r - 1} (b - x)^{t - r - 1}}
                  {(b - a)^{t - 1} {\rm B}(r, t - r)},
                  \quad x \in [a, b]

with :math:`r < t` and :math:`a < b` and where :math:`\rm B` denotes
Euler's beta function :class:`~openturns.SpecFunc_Beta`.

Its first moments are:

.. math::
    :nowrap:

    \begin{eqnarray*}
        \Expect{X} & = & a + \frac{(b - a)\,r}{t} \\
        \Var{X} & = & \left(\frac{b - a}{t}\right)^2 \frac{r\,(t - r)}{t + 1}
    \end{eqnarray*}


It is possible to create a Beta distribution from the alternative parametrization :math:`(\mu, \sigma, a, b)`: see  :class:`~openturns.BetaMuSigma`. In that case, all the results are presented in that new parametrization.

In order to use the alternative  parametrization :math:`(\mu, \sigma, a, b)` only to create the distribution, see the example below: all the results will be presented in the native parametrization :math:`(r, t, a, b)`.

Examples
--------
Create a distribution from its native parameters :math:`(r, t, a, b)`:

>>> import openturns as ot
>>> myDist = ot.Beta(1.0, 2.0, 1.0, 5.0)

Create a it from the alternative parametrization :math:`(\mu, \sigma, a, b)`:

>>> myDist2 = ot.Beta()
>>> myDist2.setParameter(ot.BetaMuSigma()([3.0, 1.15, 1.0, 5.0]))

Create it from :math:`(\mu, \sigma, a, b)` and keep that parametrization for the remaining study: 

>>> myParam = ot.BetaMuSigma(3.0, 1.15, 1.0, 5.0)
>>> myDist3 = ot.ParametrizedDistribution(myParam)

Draw a sample:

>>> sample = myDist.getSample(5)"

// ---------------------------------------------------------------------

%feature("docstring") OT::Beta::getR
"Accessor to the distribution's shape parameter :math:`r`.

Returns
-------
r : float
    Shape parameter :math:`r`."

// ---------------------------------------------------------------------

%feature("docstring") OT::Beta::getT
"Accessor to the distribution's shape parameter :math:`t`.

Returns
-------
t : float
    Shape parameter :math:`t`."

// ---------------------------------------------------------------------

%feature("docstring") OT::Beta::getA
"Accessor to the distribution's lower bound.

Returns
-------
a : float
    Lower bound."

// ---------------------------------------------------------------------

%feature("docstring") OT::Beta::getB
"Accessor to the distribution's upper bound.

Returns
-------
b : float
    Upper bound."

// ---------------------------------------------------------------------

%feature("docstring") OT::Beta::getMu
"Accessor to the distribution's mean.

Returns
-------
mu : float
    Mean."

// ---------------------------------------------------------------------

%feature("docstring") OT::Beta::getSigma
"Accessor to the distribution's standard deviation.

Returns
-------
sigma : float, :math:`\sigma > 0`
    Standard deviation."

// ---------------------------------------------------------------------

%feature("docstring") OT::Beta::setR
"Accessor to the distribution's shape parameter :math:`r`.

Parameters
----------
r : float, :math:`r > 0`
    Shape parameter :math:`r`."

// ---------------------------------------------------------------------

%feature("docstring") OT::Beta::setT
"Accessor to the distribution's shape parameter :math:`t`.

Parameters
----------
t : float, :math:`t > r`
    Shape parameter :math:`t`."

// ---------------------------------------------------------------------

%feature("docstring") OT::Beta::setA
"Accessor to the distribution's lower bound.

Parameters
----------
a : float, :math:`a < b`
    Lower bound."

// ---------------------------------------------------------------------

%feature("docstring") OT::Beta::setB
"Accessor to the distribution's upper bound.

Parameters
----------
b : float, :math:`b > a`
    Upper bound."

// ---------------------------------------------------------------------

%feature("docstring") OT::Beta::setMuSigma
"Accessor to the distribution's mean and standard deviation.

Parameters
----------
mu : float
    Mean.
sigma : float, :math:`\sigma > 0`
    Standard deviation."
