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

# crv_types.Chi

All Samples(1)  |  Call(0)  |  Derive(0)  |  Import(1)
Create a continuous random variable with a Chi distribution.

The density of the Chi distribution is given by

.. math::
f(x) := \frac{2^{1-k/2}x^{k-1}e^{-x^2/2}}{\Gamma(k/2)}

with :math:x \geq 0.

Parameters(more...)


        def Chi(name, k):
r"""
Create a continuous random variable with a Chi distribution.

The density of the Chi distribution is given by

.. math::
f(x) := \frac{2^{1-k/2}x^{k-1}e^{-x^2/2}}{\Gamma(k/2)}

with :math:x \geq 0.

Parameters
==========

k : A positive Integer, k > 0, the number of degrees of freedom

Returns
=======

A RandomSymbol.

Examples
========

>>> from sympy.stats import Chi, density, E, std
>>> from sympy import Symbol, simplify

>>> k = Symbol("k", integer=True)
>>> z = Symbol("z")

>>> X = Chi("x", k)

>>> density(X)(z)
2**(-k/2 + 1)*z**(k - 1)*exp(-z**2/2)/gamma(k/2)

References
==========

..  http://en.wikipedia.org/wiki/Chi_distribution
..  http://mathworld.wolfram.com/ChiDistribution.html
"""

return rv(name, ChiDistribution, (k,))