@ -29,7 +29,6 @@ package explicit;
import java.util.BitSet ;
import java.util.HashMap ;
import java.util.Iterator ;
import java.util.List ;
import java.util.Map ;
import java.util.Map.Entry ;
import java.util.Set ;
@ -205,7 +204,7 @@ public class Distribution implements Iterable<Entry<Integer, Double>>
/ * *
* Get the mean of the distribution .
* /
public double mean ( )
/ * public double mean ( )
{
double d = 0 . 0 ;
Iterator < Entry < Integer , Double > > i = iterator ( ) ;
@ -214,12 +213,12 @@ public class Distribution implements Iterable<Entry<Integer, Double>>
d + = e . getValue ( ) * e . getKey ( ) ;
}
return d ;
}
} * /
/ * *
* Get the variance of the distribution .
* /
public double variance ( )
/ * public double variance ( )
{
double mean = mean ( ) ;
double meanSq = 0 . 0 ;
@ -229,24 +228,24 @@ public class Distribution implements Iterable<Entry<Integer, Double>>
meanSq + = e . getValue ( ) * e . getKey ( ) * e . getKey ( ) ;
}
return Math . abs ( meanSq - mean * mean ) ;
}
} * /
/ * *
* Get the standard deviation of the distribution .
* /
public double standardDeviation ( )
/ * public double standardDeviation ( )
{
return Math . sqrt ( variance ( ) ) ;
}
} * /
/ * *
* Get the relative standard deviation of the distribution ,
* i . e . , as a percentage of the mean .
* /
public double standardDeviationRelative ( )
/ * public double standardDeviationRelative ( )
{
return 100 . 0 * standardDeviation ( ) / mean ( ) ;
}
} * /
/ * *
* Get the sum of the probabilities in the distribution .