commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brentwor...@apache.org
Subject cvs commit: jakarta-commons/math/xdocs navigation.xml
Date Mon, 26 Apr 2004 20:06:51 GMT
brentworden    2004/04/26 13:06:51

  Modified:    math/xdocs/userguide stat.xml overview.xml index.xml
               math/xdocs navigation.xml
  Added:       math/xdocs/userguide distribution.xml complex.xml
  Log:
  Added user guide sections for complex numbers and distributions.
  
  Revision  Changes    Path
  1.16      +1 -61     jakarta-commons/math/xdocs/userguide/stat.xml
  
  Index: stat.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/xdocs/userguide/stat.xml,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- stat.xml	26 Apr 2004 05:16:35 -0000	1.15
  +++ stat.xml	26 Apr 2004 20:06:50 -0000	1.16
  @@ -345,66 +345,6 @@
           <p>This is yet to be written. Any contributions will be gratefully
             accepted!</p>
         </subsection>
  -      <subsection name="1.6 Distribution framework" href="distributions">
  -        <p>
  -          The distribution framework provides the means to compute probability density
  -          function (PDF) probabilities and cumulative distribution function (CDF)
  -          probabilities for common probability distributions. Along with the direct
  -          computation of PDF and CDF probabilities, the framework also allows for the
  -          computation of inverse PDF and inverse CDF values.
  -        </p>
  -        <p>
  -          In order to use the distribution framework, first a distribution object must
  -          be created. It is encouraged that all distribution object creation occurs via
  -          the <code>org.apache.commons.math.stat.distribution.DistributionFactory</code>
  -          class. <code>DistributionFactory</code> is a simple factory used
to create all
  -          of the distribution objects supported by Commons-Math. The typical usage of 
  -          <code>DistributionFactory</code> to create a distribution object
would be:
  -        </p>
  -        <source>DistributionFactory factory = DistributionFactory.newInstance();
  -          BinomialDistribution binomial = factory.createBinomialDistribution(10, .75);</source>
  -        <p>
  -          The distributions that can be instantiated via the <code>DistributionFactory</code>
  -          are detailed below:
  -          <table>
  -            <tr><th>Distribution</th><th>Factory Method</th><th>Parameters</th></tr>
  -            <tr><td>Binomial</td><td>createBinomialDistribution</td><td><div>Number
of trials</div><div>Probability of success</div></td></tr>
  -            <tr><td>Chi-Squared</td><td>createChiSquaredDistribution</td><td><div>Degrees
of freedom</div></td></tr>
  -            <tr><td>Exponential</td><td>createExponentialDistribution</td><td><div>Mean</div></td></tr>
  -            <tr><td>F</td><td>createFDistribution</td><td><div>Numerator
degrees of freedom</div><div>Denominator degrees of freedom</div></td></tr>
  -            <tr><td>Gamma</td><td>createGammaDistribution</td><td><div>Alpha</div><div>Beta</div></td></tr>
  -            <tr><td>Hypergeometric</td><td>createHypogeometricDistribution</td><td><div>Population
size</div><div>Number of successes in population</div><div>Sample
size</div></td></tr>
  -            <tr><td>Normal (Gaussian)</td><td>createNormalDistribution</td><td><div>Mean</div><div>Standard
Deviation</div></td></tr>
  -            <tr><td>t</td><td>createTDistribution</td><td><div>Degrees
of freedom</div></td></tr>
  -          </table>
  -        </p>
  -        <p>
  -          Using a distribution object, PDF and CDF probabilities are easily computed
  -          using the <code>cumulativeProbability</code> methods.  For a distribution
<code>X</code>,
  -          and a domain value, <code>x</code>,  <code>cumulativeProbability</code>
computes
  -          <code>P(X &lt;= x)</code> (i.e. the lower tail probability of
<code>X</code>).
  -        </p>
  -        <source>DistributionFactory factory = DistributionFactory.newInstance();
  -          TDistribution t = factory.createBinomialDistribution(29);
  -          double lowerTail = t.cumulativeProbability(-2.656);     // P(T &lt;= -2.656)
  -          double upperTail = 1.0 - t.cumulativeProbability(2.75); // P(T &gt;= 2.75)</source>
  -        <p>
  -          The inverse PDF and CDF values are just as easily computed using the
  -          <code>inverseCumulativeProbability</code>methods.  For a distribution
<code>X</code>,
  -          and a probability, <code>p</code>,  <code>inverseCumulativeProbability</code>
  -          computes the domain value <code>x</code>, such that:
  -          <ul>
  -            <li><code>P(X &lt;= x) = p</code>, for continuous distributions</li>
  -            <li><code>P(X &lt;= x) &lt;= p</code>, for discrete
distributions</li>
  -          </ul>
  -          Notice the different cases for continuous and discrete distributions.  This is
the result
  -          of PDFs not being invertible functions.  As such, for discrete distributions,
an exact
  -          domain value can not be returned.  Only the "best" domain value.  For Commons-Math,
the "best"
  -          domain value is determined by the largest domain value whose cumulative probability
is
  -          less-than or equal to the given probability.
  -        </p>
  -      </subsection>
  -      
       </section>
     </body>
   </document>
  
  
  
  1.10      +13 -10    jakarta-commons/math/xdocs/userguide/overview.xml
  
  Index: overview.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/xdocs/userguide/overview.xml,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- overview.xml	25 Apr 2004 17:12:05 -0000	1.9
  +++ overview.xml	26 Apr 2004 20:06:50 -0000	1.10
  @@ -67,15 +67,18 @@
   
   <subsection name="0.3 How commons-math is organized" href="organization">
       <p>
  -    Commons Math is divided into 6 subpackages, based on functionality provided.
  -    <ol><li><a href="stat.html">org.apache.commons.math.stat</a>
- statistics, statistical tests, probability distributions</li>
  -        <li><a href="analysis.html">org.apache.commons.math.analysis</a>
- rootfinding and interpolation</li>
  -        <li><a href="random.html">org.apache.commons.math.random</a>
- random numbers, strings and data generation</li>
  -        <li><a href="special.html">org.apache.commons.math.special</a>
- special functions (Gamma, Beta) </li>
  -        <li><a href="linear.html">org.apache.commons.math.linear</a>
- matrices, solving linear systems </li>
  -        <li><a href="utilities.html">org.apache.commons.math.util</a>
- common math/stat functions extending java.lang.Math </li>
  -     </ol>
  -     Package javadocs are <a href="../apidocs/index.html">here</a>
  +    Commons Math is divided into eight subpackages, based on functionality provided.
  +    <ol>
  +      <li><a href="stat.html">org.apache.commons.math.stat</a> - statistics,
statistical tests</li>
  +      <li><a href="analysis.html">org.apache.commons.math.analysis</a>
- rootfinding and interpolation</li>
  +      <li><a href="random.html">org.apache.commons.math.random</a> -
random numbers, strings and data generation</li>
  +      <li><a href="special.html">org.apache.commons.math.special</a>
- special functions (Gamma, Beta) </li>
  +      <li><a href="linear.html">org.apache.commons.math.linear</a> -
matrices, solving linear systems </li>
  +      <li><a href="utilities.html">org.apache.commons.math.util</a> -
common math/stat functions extending java.lang.Math </li>
  +      <li><a href="complex.html">org.apache.commons.math.complex</a>
- complex numbers</li>
  +      <li><a href="distribution.html">org.apache.commons.math.distribution</a>
- probability distributions</li>
  +    </ol>
  +    Package javadocs are <a href="../apidocs/index.html">here</a>
       </p>
   </subsection>
   
  
  
  
  1.8       +14 -2     jakarta-commons/math/xdocs/userguide/index.xml
  
  Index: index.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/xdocs/userguide/index.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- index.xml	29 Feb 2004 21:25:08 -0000	1.7
  +++ index.xml	26 Apr 2004 20:06:50 -0000	1.8
  @@ -36,7 +36,7 @@
                 <li><a href="overview.html#dependencies">0.5 Dependencies</a></li>
               </ul></li>
   
  -           <li><a href="stat.html">1. Statistics and Distributions</a>
  +           <li><a href="stat.html">1. Statistics</a>
                   <ul>
                   <li><a href="stat.html#overview">1.1 Overview</a></li>
                   <li><a href="stat.html#univariate">1.2 Univariate statistics</a></li>
  @@ -78,6 +78,18 @@
                   <li><a href="utilities.html#continued_fractions">6.3 Continued
Fractions</a></li>
                   <li><a href="utilities.html#math_utils">6.4 binomial coefficients,
factorials and other common math functions</a></li>
                   <li><a href="utilities.html#stat_utils">6.5 statistical computation
utiliities</a></li>
  +                </ul></li>                                 
  +        <li><a href="complex.html">7. Complex Numbers</a>
  +                <ul>
  +                <li><a href="complex.html#overview">7.1 Overview</a></li>
  +                <li><a href="complex.html#complex">7.2 Complex Numbers</a></li>
  +                <li><a href="complex.html#functions">7.3 Complex Transcendental
Functions</a></li>
  +                <li><a href="complex.html#formatting">7.4 Complex Formatting</a></li>
  +                </ul></li>                                 
  +        <li><a href="distribution.html">8. Probability Distributions</a>
  +                <ul>
  +                <li><a href="distribution.html#overview">8.1 Overview</a></li>
  +                <li><a href="distribution.html#distributions">8.2 Distribution
Framework</a></li>
                   </ul></li>                                 
           </ul>
         </section>
  
  
  
  1.1                  jakarta-commons/math/xdocs/userguide/distribution.xml
  
  Index: distribution.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <!--
     Copyright 2003-2004 The Apache Software Foundation
  
     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at
  
         http://www.apache.org/licenses/LICENSE-2.0
  
     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
    -->
    
  <?xml-stylesheet type="text/xsl" href="./xdoc.xsl"?>
  <!-- $Revision: 1.1 $ $Date: 2004/04/26 20:06:50 $ -->
  <document url="stat.html">
    <properties>
      <title>The Commons Math User Guide - Statistics</title>
    </properties>
    <body>
      <section name="8 Probability Distributions">
        <subsection name="8.1 Overview" href="overview">
          <p>
            The distributions package provide a framework for some commonly used
            probability distributions.
          </p>
        </subsection>
        <subsection name="8.2 Distribution Framework" href="distributions">
          <p>
            The distribution framework provides the means to compute probability density
            function (PDF) probabilities and cumulative distribution function (CDF)
            probabilities for common probability distributions. Along with the direct
            computation of PDF and CDF probabilities, the framework also allows for the
            computation of inverse PDF and inverse CDF values.
          </p>
          <p>
            In order to use the distribution framework, first a distribution object must
            be created. It is encouraged that all distribution object creation occurs via
            the <code>org.apache.commons.math.distribution.DistributionFactory</code>
            class. <code>DistributionFactory</code> is a simple factory used to
create all
            of the distribution objects supported by Commons-Math. The typical usage of 
            <code>DistributionFactory</code> to create a distribution object would
be:
          </p>
          <source>DistributionFactory factory = DistributionFactory.newInstance();
  BinomialDistribution binomial = factory.createBinomialDistribution(10, .75);</source>
          <p>
            The distributions that can be instantiated via the <code>DistributionFactory</code>
            are detailed below:
            <table>
              <tr><th>Distribution</th><th>Factory Method</th><th>Parameters</th></tr>
              <tr><td>Binomial</td><td>createBinomialDistribution</td><td><div>Number
of trials</div><div>Probability of success</div></td></tr>
              <tr><td>Chi-Squared</td><td>createChiSquaredDistribution</td><td><div>Degrees
of freedom</div></td></tr>
              <tr><td>Exponential</td><td>createExponentialDistribution</td><td><div>Mean</div></td></tr>
              <tr><td>F</td><td>createFDistribution</td><td><div>Numerator
degrees of freedom</div><div>Denominator degrees of freedom</div></td></tr>
              <tr><td>Gamma</td><td>createGammaDistribution</td><td><div>Alpha</div><div>Beta</div></td></tr>
              <tr><td>Hypergeometric</td><td>createHypogeometricDistribution</td><td><div>Population
size</div><div>Number of successes in population</div><div>Sample
size</div></td></tr>
              <tr><td>Normal (Gaussian)</td><td>createNormalDistribution</td><td><div>Mean</div><div>Standard
Deviation</div></td></tr>
              <tr><td>t</td><td>createTDistribution</td><td><div>Degrees
of freedom</div></td></tr>
            </table>
          </p>
          <p>
            Using a distribution object, PDF and CDF probabilities are easily computed
            using the <code>cumulativeProbability</code> methods.  For a distribution
<code>X</code>,
            and a domain value, <code>x</code>,  <code>cumulativeProbability</code>
computes
            <code>P(X &lt;= x)</code> (i.e. the lower tail probability of
<code>X</code>).
          </p>
          <source>DistributionFactory factory = DistributionFactory.newInstance();
  TDistribution t = factory.createBinomialDistribution(29);
  double lowerTail = t.cumulativeProbability(-2.656);     // P(T &lt;= -2.656)
  double upperTail = 1.0 - t.cumulativeProbability(2.75); // P(T &gt;= 2.75)</source>
          <p>
            The inverse PDF and CDF values are just as easily computed using the
            <code>inverseCumulativeProbability</code>methods.  For a distribution
<code>X</code>,
            and a probability, <code>p</code>,  <code>inverseCumulativeProbability</code>
            computes the domain value <code>x</code>, such that:
            <ul>
              <li><code>P(X &lt;= x) = p</code>, for continuous distributions</li>
              <li><code>P(X &lt;= x) &lt;= p</code>, for discrete
distributions</li>
            </ul>
            Notice the different cases for continuous and discrete distributions.  This is
the result
            of PDFs not being invertible functions.  As such, for discrete distributions,
an exact
            domain value can not be returned.  Only the "best" domain value.  For Commons-Math,
the "best"
            domain value is determined by the largest domain value whose cumulative probability
is
            less-than or equal to the given probability.
          </p>
        </subsection>
      </section>
    </body>
  </document>
  
  
  
  1.1                  jakarta-commons/math/xdocs/userguide/complex.xml
  
  Index: complex.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <!--
     Copyright 2003-2004 The Apache Software Foundation
  
     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at
  
         http://www.apache.org/licenses/LICENSE-2.0
  
     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
    -->
    
  <?xml-stylesheet type="text/xsl" href="./xdoc.xsl"?>
  <!-- $Revision: 1.1 $ $Date: 2004/04/26 20:06:50 $ -->
  <document url="stat.html">
    <properties>
      <title>The Commons Math User Guide - Statistics</title>
    </properties>
    <body>
      <section name="7 Complex Numbers">
        <subsection name="7.1 Overview" href="overview">
          <p>
            The complex packages provides a complex number type as well as complex
            versions of common transcendental functions and complex number
            formatting.
          </p>
        </subsection>
        <subsection name="7.2 Complex Numbers" href="complex">
          <p>
  		  <a href="../apidocs/org/apache/commons/math/complex/Complex.html">
  		  org.apache.commons.math.complex.Complex</a> provides a complex number
  		  type that forms the basis for the complex functionality found in 
  		  commons-math.
          </p>
          <p>
            To create a complex number, simply call the constructor passing in two
            floating-point arguments, the first being the real part of the
            complex number and the second being the imaginary part:
            <source>Complex c = new Complex(1.0, 3.0); // 1 + 3i</source>
          </p>
          <p>
            The <code>Complex</code> class provides many unary and binary
            complex number operations.  These operations provide the means to add,
            subtract, multiple and, divide complex numbers along with other
            complex number functions similar to the real number functions found in
            <code>java.math.BigDecimal</code>:
            <source>Complex lhs = new Complex(1.0, 3.0);
  Complex rhs = new Complex(2.0, 5.0);
  
  Complex answer = lhs.add(rhs);       // add two complex numbers
          answer = lhs.subtract(rhs);  // subtract two complex numbers
          answer = lhs.abs();          // absolute value
          answer = lhs.conjugate(rhs); // complex conjugate</source>
          </p>
        </subsection>
        <subsection name="7.3 Complex Transcendental Functions" href="function">
          <p>
  		  <a href="../apidocs/org/apache/commons/math/complex/ComplexMath.html">
  		  org.apache.commons.math.complex.ComplexMath</a> provides
  		  implementations of serveral transcendental functions involving complex
  		  number arguments.  These operations provide the means to compute the
  		  log, sine, tangent and, other complex values similar to the real
  		  number functions found in <code>java.lang.Math</code>:
            <source>Complex first = new Complex(1.0, 3.0);
  Complex second = new Complex(2.0, 5.0);
  
  Complex answer = ComplexMath.log(first);          // natural logarithm.
          answer = ComplexMath.cos(first);          // cosine
          answer = ComplexMath.pow(first, second);  // first raised to the power of second</source>
          </p>
        </subsection>
        <subsection name="7.4 Complex Formatting" href="formatting">
          <p>This is yet to be written. Any contributions will be gratefully
            accepted!</p>
        </subsection>
      </section>
    </body>
  </document>
  
  
  
  1.14      +2 -0      jakarta-commons/math/xdocs/navigation.xml
  
  Index: navigation.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/xdocs/navigation.xml,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- navigation.xml	5 Apr 2004 21:52:43 -0000	1.13
  +++ navigation.xml	26 Apr 2004 20:06:51 -0000	1.14
  @@ -47,6 +47,8 @@
         <item name="Numerical Analysis"      href="/userguide/analysis.html"/>
         <item name="Special Functions"       href="/userguide/special.html"/>
         <item name="Utilities"               href="/userguide/utilities.html"/>
  +      <item name="Complex Numbers"         href="/userguide/complex.html"/>
  +      <item name="Distributions"           href="/userguide/distribution.html"/>
       </menu>
       
       &common-menus;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message