Did I find the right examples for you? yes no

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)
Create a Continuous Random Variable with a Kumaraswamy distribution.

The density of the Kumaraswamy distribution is given by

.. math::
    f(x) := a b x^{a-1} (1-x^a)^{b-1}

with :math:`x \in [0,1]`.

Parameters(more...)

        def Kumaraswamy(name, a, b):
    r"""
    Create a Continuous Random Variable with a Kumaraswamy distribution.

    The density of the Kumaraswamy distribution is given by

    .. math::
        f(x) := a b x^{a-1} (1-x^a)^{b-1}

    with :math:`x \in [0,1]`.

    Parameters
    ==========

    a : Real number, `a > 0` a shape
    b : Real number, `b > 0` a shape

    Returns
    =======

    A RandomSymbol.

    Examples
    ========

    >>> from sympy.stats import Kumaraswamy, density, E, variance
    >>> from sympy import Symbol, simplify, pprint

    >>> a = Symbol("a", positive=True)
    >>> b = Symbol("b", positive=True)
    >>> z = Symbol("z")

    >>> X = Kumaraswamy("x", a, b)

    >>> D = density(X)(z)
    >>> pprint(D, use_unicode=False)
                         b - 1
         a - 1 /   a    \
    a*b*z     *\- z  + 1/


    References
    ==========

    .. [1] http://en.wikipedia.org/wiki/Kumaraswamy_distribution
    """

    return rv(name, KumaraswamyDistribution, (a, b))
        


src/s/y/sympy-HEAD/sympy/stats/tests/test_continuous_rv.py   sympy(Download)
from sympy.stats import (P, E, where, density, variance, covariance, skewness,
                         given, pspace, cdf, ContinuousRV, sample,
                         Arcsin, Benini, Beta, BetaPrime, Cauchy,
                         Chi, ChiSquared,
                         ChiNoncentral, Dagum, Erlang, Exponential,
def test_kumaraswamy():
    a = Symbol("a", positive=True)
    b = Symbol("b", positive=True)
 
    X = Kumaraswamy("x", a, b)