You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ps...@apache.org on 2004/03/21 05:24:17 UTC

cvs commit: jakarta-commons/math/src/test/org/apache/commons/math/stat/univariate UnivariateStatisticAbstractTest.java

psteitz     2004/03/20 20:24:17

  Modified:    math/src/test/org/apache/commons/math/stat/univariate
                        UnivariateStatisticAbstractTest.java
  Log:
  Adjusted target values for product, log sum and variance based on exact computations using BigDecimal, comparison to R. Changed percentile targets to match implemented algorithm.
  
  Revision  Changes    Path
  1.11      +17 -17    jakarta-commons/math/src/test/org/apache/commons/math/stat/univariate/UnivariateStatisticAbstractTest.java
  
  Index: UnivariateStatisticAbstractTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/test/org/apache/commons/math/stat/univariate/UnivariateStatisticAbstractTest.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- UnivariateStatisticAbstractTest.java	21 Feb 2004 21:35:17 -0000	1.10
  +++ UnivariateStatisticAbstractTest.java	21 Mar 2004 04:24:17 -0000	1.11
  @@ -23,24 +23,24 @@
    */
   public abstract class UnivariateStatisticAbstractTest extends TestCase {
   
  -    protected double mean = 12.40454545454550;
  -    protected double geoMean = 12.070589161633011;
  +    protected double mean = 12.404545454545455d;
  +    protected double geoMean = 12.070589161633011d;
   
  -    protected double var = 10.00235930735930;
  +    protected double var = 10.00235930735931d;
       protected double std = Math.sqrt(var);
  -    protected double skew = 1.437423729196190;
  -    protected double kurt = 2.377191264804700;
  +    protected double skew = 1.437423729196190d;
  +    protected double kurt = 2.377191264804700d;
   
  -    protected double min = 8.2;
  -    protected double max = 21;
  -    protected double median = 12;
  -    protected double percentile5 = 8.81;
  -    protected double percentile95 = 19.555;
  -
  -    protected double product = 628096400563833200000000.0;
  -    protected double sumLog = 54.79698061164520;
  -    protected double sumSq = 3595.250;
  -    protected double sum = 272.90;
  +    protected double min = 8.2d;
  +    protected double max = 21d;
  +    protected double median = 12d;
  +    protected double percentile5 = 8.29d;
  +    protected double percentile95 = 20.82d;
  +
  +    protected double product = 628096400563833396009676.9200400128d;
  +    protected double sumLog = 54.7969806116451507d;
  +    protected double sumSq = 3595.250d;
  +    protected double sum = 272.90d;
   
       protected double tolerance = 10E-12;
   
  @@ -81,7 +81,7 @@
           return tolerance;
       }
   
  -    public void testEvaluation() throws Exception {
  +    public void testEvaluation() throws Exception {   
           assertEquals(
               expectedValue(),
               getUnivariateStatistic().evaluate(testArray),
  
  
  

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