|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthultig.util.BasicStats
public class BasicStats
The BasicStats class represents basic statistics about a certain numeric sequence. It was thought to compute basic statistic quantities, like mean and variance, iteratively for a flow of numeric quantities.
University of Beira Interior (UBI)
Centre For Human Language Technology and Bioinformatics (HULTIG)
| Constructor Summary | |
|---|---|
BasicStats()
Constructor. |
|
| Method Summary | |
|---|---|
void |
addValue(double xi)
Adds a new double value to this statistics |
void |
addValue(int xi)
Adds a new int value to this statistics. |
double |
getMax()
Gives the maximum value added. |
double |
getMean()
Gives the Mean value for this statistics. |
double |
getMin()
Gives the minimum value added. |
long |
getNumValues()
Gives the number of values computed for this statistics. |
double |
getStandDev()
Gives the Standard Deviation for this statistics. |
double |
getVariance()
Gives the Variance value for this statistics. |
static void |
main(String[] args)
For testing/demonstration we use two samples of seven numbers which give rise to near the same mean but very different standard deviation. |
void |
print(String varname)
Outputs the main statistic parameters. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BasicStats()
| Method Detail |
|---|
public void addValue(double xi)
xi - The value to add.public void addValue(int xi)
xi - The value to add.public long getNumValues()
public double getMean()
public double getVariance()
public double getStandDev()
public double getMin()
public double getMax()
public void print(String varname)
public static void main(String[] args)
args -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||