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 F distribution.

The density of the F distribution is given by

.. math::
    f(x) := \frac{\sqrt{\frac{(d_1 x)^{d_1} d_2^{d_2}}
            {(d_1 x + d_2)^{d_1 + d_2}}}}
            {x \mathrm{B} \left(\frac{d_1}{2}, \frac{d_2}{2}\right)}

with :math:`x > 0`.(more...)

        def FDistribution(name, d1, d2):
    r"""
    Create a continuous random variable with a F distribution.

    The density of the F distribution is given by

    .. math::
        f(x) := \frac{\sqrt{\frac{(d_1 x)^{d_1} d_2^{d_2}}
                {(d_1 x + d_2)^{d_1 + d_2}}}}
                {x \mathrm{B} \left(\frac{d_1}{2}, \frac{d_2}{2}\right)}

    with :math:`x > 0`.

    .. TODO - What do these parameters mean?

    Parameters
    ==========

    d1 : `d_1 > 0` a parameter
    d2 : `d_2 > 0` a parameter

    Returns
    =======

    A RandomSymbol.

    Examples
    ========

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

    >>> d1 = Symbol("d1", positive=True)
    >>> d2 = Symbol("d2", positive=True)
    >>> z = Symbol("z")

    >>> X = FDistribution("x", d1, d2)

    >>> D = density(X)(z)
    >>> pprint(D, use_unicode=False)
      d2
      --    ______________________________
      2    /       d1            -d1 - d2       /d1   d2\
    d2  *\/  (d1*z)  *(d1*z + d2)         *gamma|-- + --|
                                                \2    2 /
    -----------------------------------------------------
                           /d1\      /d2\
                    z*gamma|--|*gamma|--|
                           \2 /      \2 /

    References
    ==========

    .. [1] http://en.wikipedia.org/wiki/F-distribution
    .. [2] http://mathworld.wolfram.com/F-Distribution.html
    """

    return rv(name, FDistributionDistribution, (d1, d2))
        


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_f_distribution():
    d1 = Symbol("d1", positive=True)
    d2 = Symbol("d2", positive=True)
 
    X = FDistribution("x", d1, d2)