2 // FORESTER -- software libraries and applications
3 // for evolutionary biology research and applications.
5 // Copyright (C) 2008-2009 Christian M. Zmasek
6 // Copyright (C) 2008-2009 Burnham Institute for Medical Research
9 // This library is free software; you can redistribute it and/or
10 // modify it under the terms of the GNU Lesser General Public
11 // License as published by the Free Software Foundation; either
12 // version 2.1 of the License, or (at your option) any later version.
14 // This library is distributed in the hope that it will be useful,
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 // Lesser General Public License for more details.
19 // You should have received a copy of the GNU Lesser General Public
20 // License along with this library; if not, write to the Free Software
21 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23 // Contact: phylosoft @ gmail . com
24 // WWW: www.phylosoft.org/forester
26 package org.forester.util;
28 public interface DescriptiveStatistics {
30 public final static String PLUS_MINUS = "" + ( char ) 177;
32 public abstract void addValue( final double d );
34 public abstract double arithmeticMean();
36 public abstract String asSummary();
39 * Computes the coefficient of variation. Used to express standard deviation
40 * independent of units of measure.
44 public abstract double coefficientOfVariation();
46 public abstract double[] getDataAsDoubleArray();
48 public abstract double getMax();
50 public abstract double getMin();
52 public abstract int getN();
54 public abstract double getSum();
56 public abstract String getSummaryAsString();
58 public abstract double getValue( final int index );
60 public abstract double median();
62 public abstract double midrange();
65 * Determines relationship between the mean and the median. This reflects
66 * how the data differs from the normal bell shaped distribution.
70 public abstract double pearsonianSkewness();
72 public abstract double sampleStandardDeviation();
74 public abstract double sampleStandardUnit( final double value );
76 public abstract double sampleVariance();
78 public abstract double standardErrorOfMean();
80 public abstract double sumDeviations();
83 public abstract String toString();