|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--estadistica
This is the main class.
It provides useful methods to calculate the mean value of a serie of numbers, and its standard deviation and more.
Constructor Summary | |
estadistica()
This constructor sets minimo1 and minimo2 to their defalut values (10 and 30) The meaning of these values are explain latter, in the getErrAbs method. |
Method Summary | |
double |
getErrAbs(double[] data)
Calculates the absolute error of a serie of values. |
double |
getPromedio(double[] data)
Gets the mean value a serie of values. |
double |
getSigmaN_1(double[] data)
Calculates the sigmaN-1 of a serie of values. |
double |
getSigmaN(double[] data)
Calculates the sigmaN of a serie of values. |
double |
sdKnuth(double[] data,
int minus)
Calculates the standard deviation of an array of numbers. |
void |
setMinimo1(int m)
Sets the value of minimum1. |
void |
setMinimo2(int m)
Sets the value of minimum2. |
void |
setN(int n)
Sets the number of measures to be taken into account. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public estadistica()
The meaning of these values are explain latter, in the getErrAbs method.
Method Detail |
public void setN(int n)
n
- number of measurespublic void setMinimo1(int m)
m
- the value of minimum1public void setMinimo2(int m)
m
- the value of minimum2public double getPromedio(double[] data)
public double getSigmaN(double[] data)
public double getSigmaN_1(double[] data)
public double getErrAbs(double[] data)
If the number of values is equal or less than minimum1, it simply calculates the mean value between the maximum and minimun value of the array
If the number of values is greater than minimum1 and equal or less than minimum2, it divides sigmaN-1 and the square root of the number of values, and multiplies the result by 2. If the number of values is greater than minimum2, it divides sigmaN and the square root of the number of values, and multiplies the result by 2.
public double sdKnuth(double[] data, int minus)
data
- Numbers to compute the standard deviation of.
Array must contain two or more numbers.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |