Did I find the right examples for you? yes no      Crawl my project      Python Jobs

# crv_types.VonMises

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

The density of the von Mises distribution is given by

.. math::
f(x) := \frac{e^{\kappa\cos(x-\mu)}}{2\pi I_0(\kappa)}

with :math:x \in [0,2\pi].

Parameters(more...)


        def VonMises(name, mu, k):
r"""
Create a Continuous Random Variable with a von Mises distribution.

The density of the von Mises distribution is given by

.. math::
f(x) := \frac{e^{\kappa\cos(x-\mu)}}{2\pi I_0(\kappa)}

with :math:x \in [0,2\pi].

Parameters
==========

mu : Real number, measure of location
k : Real number, measure of concentration

Returns
=======

A RandomSymbol.

Examples
========

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

>>> mu = Symbol("mu")
>>> k = Symbol("k", positive=True)
>>> z = Symbol("z")

>>> X = VonMises("x", mu, k)

>>> D = density(X)(z)
>>> pprint(D, use_unicode=False)
k*cos(mu - z)
e
------------------
2*pi*besseli(0, k)

References
==========

..  http://en.wikipedia.org/wiki/Von_Mises_distribution
..  http://mathworld.wolfram.com/vonMisesDistribution.html
"""

return rv(name, VonMisesDistribution, (mu, k))