Did I find the right examples for you? yes no

# sympy.stats.Benini

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

The density of the Benini distribution is given by

.. math::
f(x) := e^{-\alpha\log{\frac{x}{\sigma}}
-\beta\log^2\left[{\frac{x}{\sigma}}\right]}
\left(\frac{\alpha}{x}+\frac{2\beta\log{\frac{x}{\sigma}}}{x}\right)

This is a heavy-tailed distrubtion and is also known as the log-Rayleigh(more...)


        def Benini(name, alpha, beta, sigma):
r"""
Create a Continuous Random Variable with a Benini distribution.

The density of the Benini distribution is given by

.. math::
f(x) := e^{-\alpha\log{\frac{x}{\sigma}}
-\beta\log^2\left[{\frac{x}{\sigma}}\right]}
\left(\frac{\alpha}{x}+\frac{2\beta\log{\frac{x}{\sigma}}}{x}\right)

This is a heavy-tailed distrubtion and is also known as the log-Rayleigh
distribution.

Parameters
==========

alpha : Real number, \alpha > 0, a shape
beta : Real number, \beta > 0, a shape
sigma : Real number, \sigma > 0, a scale

Returns
=======

A RandomSymbol.

Examples
========

>>> from sympy.stats import Benini, density
>>> from sympy import Symbol, simplify, pprint

>>> alpha = Symbol("alpha", positive=True)
>>> beta = Symbol("beta", positive=True)
>>> sigma = Symbol("sigma", positive=True)
>>> z = Symbol("z")

>>> X = Benini("x", alpha, beta, sigma)

>>> D = density(X)(z)
>>> pprint(D, use_unicode=False)
/                  /  z  \\             /  z  \            2/  z  \
|        2*beta*log|-----||  - alpha*log|-----| - beta*log  |-----|
|alpha             \sigma/|             \sigma/             \sigma/
|----- + -----------------|*e
\  z             z        /

References
==========

.. [1] http://en.wikipedia.org/wiki/Benini_distribution
.. [2] http://reference.wolfram.com/legacy/v8/ref/BeniniDistribution.html
"""

return rv(name, BeniniDistribution, (alpha, beta, sigma))


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,

    sigma = Symbol("sigma", positive=True)

X = Benini('x', alpha, b, sigma)
assert density(X)(x) == ((alpha/x + 2*b*log(x/sigma)/x)
*exp(-alpha*log(x/sigma) - b*log(x/sigma)**2))