Cauchy
index
/Users/amos/Documents/Database/Mental/Programming/python/lib/avatar/Personal2/www.amos/Python/lib/mathlib/Probability/Cauchy.py

# coding: iso-8859-1
# Copyright © 2009 by Amos Newcombe

# This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.

# You should have received a copy of the GNU General Public License along with this program.  If not, see <http://www.gnu.org/licenses/>.

 
Classes
       
Probability.Probability
Cauchy

 
class Cauchy(Probability.Probability)
     Methods defined here:
Density(self, x)
Distribution(self, x)
InverseDistribution(self, xY)

Methods inherited from Probability.Probability:
DensityTest(self, xX, **dArgs)
Compare the Density() with the numerically differentiated Distribution().
 
This doesn't make much sense in the abstract base class. But in general, the Density() method will be redefined, and this will be a real test.
InverseTest(self, xY, **dArgs)
Run a y value through InverseDistribution and then through Distribution, and compare the results.
Sample(self)
Return a random sample distributed according to the probability law.
 
By default, pass a uniform random sample to InverseDistribution().
 
Similarly, passing a sample through Distribution() will give you a uniform sample on [0, 1].
__repr__(self)
__str__(self)
getIQR(self)
getMean(self)
getMedian(self)
getStDev(self)
getVariance(self)
html(self)

 
Functions
       
atan(...)
atan(x)
 
Return the arc tangent (measured in radians) of x.
tan(...)
tan(x)
 
Return the tangent of x (measured in radians).

 
Data
        pi = 3.1415926535897931