UncertML is an XML langauge for describing and exchanging uncertainty UncertML has numerous mechanisms for quantifying uncertainty including statistics, samples and distributions UncertML provides a concise representation of distributions
URI: http://www.uncertml.org/distributions/cauchy
UncertML name: CauchyDistribution
Alternative names: Cauchy-Lorenz distribution, Lorenz distribution, Breit-Wigner distribution
Definition: A random variable $$ x $$ follows a Cauchy distribution if the probability density function (pdf) is of the form shown below. The Cauchy distribution is equivalent to a Student-t distribution with 1 degree of freedom. It is widely used in physics, optics and astronomy.
Parameters: $$ \theta $$ (location) a real,
$$ \gamma $$ (scale) a positive real.
Support: $$ x \in \mathcal{R} $$
PDF: $$ f(x; \theta, \gamma) = \frac{1}{\pi \gamma} \left[1 + \left( \frac{x - \theta}{\gamma} \right)^2 \right]^{-1} $$
Source: http://en.wikipedia.org/wiki/Cauchy_distribution
Categories: continuous variables, distribution
Further information: http://mathworld.wolfram.com/CauchyDistribution.html http://en.wikipedia.org/wiki/Cauchy_distribution
XML schema:
<!-- Element -->
<xs:element name="CauchyDistribution" substitutionGroup="un:AbstractDistribution">
      <xs:extension base="un:CauchyDistributionType"/>

<!-- Complex type -->
<xs:complexType name="CauchyDistributionType">
    <xs:extension base="un:AbstractDistributionType">
        <xs:element name="location" type="un:ContinuousValuesType"/>
        <xs:element name="scale" type="un:PositiveRealValuesType"/>
XML example:
<!-- Single value -->
<un:CauchyDistribution xmlns:un="http://www.uncertml.org/2.0">

<!-- Multiple values -->
<un:CauchyDistribution xmlns:un="http://www.uncertml.org/2.0">
  <un:location>3.14 6.28 9.42</un:location>
  <un:scale>3.14 6.28 9.42</un:scale>
JSON example:
// Single value

// Multiple values
API example:
// Single value declaration
CauchyDistribution cd = new CauchyDistribution(3.14, 3.14);

// Multiple value declaration
CauchyDistribution cd = new CauchyDistribution(new double[] {3.14, 6.28, 9.42}, new double[] {3.14, 6.28, 9.42});

// Parsing from an XML file
XMLParser xml = new XMLParser();
CauchyDistribution cd = (CauchyDistribution)xml.parse(new File("cauchy-distribution.xml"));

// Parsing from a JSON file
JSONParser json = new JSONParser();
CauchyDistribution cd = (CauchyDistribution)json.parse(new File("cauchy-distribution.json"));

// Encoding to an XML file
XMLEncoder xEncoder = new XMLEncoder();
xEncoder.encode(cd, new File("cauchy-distribution.xml"));

// Encoding to a JSON file
JSONEncoder jEncoder = new JSONEncoder();
jEncoder.encode(cd, new File("cauchy-distribution.json"));