public class BaseStatisticsBean extends Object implements Cloneable, Serializable
Constructor and Description |
---|
BaseStatisticsBean() |
Modifier and Type | Method and Description |
---|---|
void |
addPoint(double x)
Add a data point for the X data set only.
|
void |
addPoint(double x,
double y)
Add a data point.
|
Object |
clone() |
double |
getCorrelation()
Return the correlation value for the two data series (Microsoft Excel function CORREL).
|
long |
getDataPoints()
Returns the number of datapoints.
|
long |
getN()
Returns the number of data points.
|
double |
getSlope()
Returns the slope.
|
double |
getSumX()
Returns sum of x.
|
double |
getSumXSq()
For use by subclasses, returns sum (X * X).
|
double |
getSumXY()
For use by subclasses, returns sum (X * Y).
|
double |
getSumY()
Returns sum of y.
|
double |
getSumYSq()
For use by subclasses, returns sum (Y * Y).
|
double |
getXAverage()
Returns the average of all X data points.
|
double |
getXStandardDeviationPop()
Calculates standard deviation for X based on the entire population given as arguments.
|
double |
getXStandardDeviationSample()
Calculates standard deviation for X based on the sample data points supplied.
|
double |
getXSum()
Returns the sum of all X data points.
|
double |
getXVariance()
Calculates standard deviation for X based on the sample data points supplied.
|
double |
getYAverage()
Returns the average of all Y data points.
|
double |
getYIntercept()
Returns the Y intercept.
|
double |
getYStandardDeviationPop()
Calculates standard deviation for Y based on the entire population given as arguments.
|
double |
getYStandardDeviationSample()
Calculates standard deviation for Y based on the sample data points supplied.
|
double |
getYSum()
Returns the sum of all Y data points.
|
double |
getYVariance()
Calculates standard deviation for Y based on the sample data points supplied.
|
void |
removePoint(double x)
Remove a X data point only.
|
void |
removePoint(double x,
double y)
Remove a data point.
|
void |
setDataPoints(long dataPoints)
Sets the number of datapoints
|
void |
setSumX(double sumX)
Sets the sum X.
|
void |
setSumXSq(double sumXSq)
Sets the sum X square.
|
void |
setSumXY(double sumXY)
Sets the sum of x times y.
|
void |
setSumY(double sumY)
Sets the sum Y.
|
void |
setSumYSq(double sumYSq)
Sets the sum Y square.
|
String |
toString() |
public final void addPoint(double x)
x
- is the X data point to add.public final void addPoint(double x, double y)
x
- is the X data point to add.y
- is the Y data point to add.public final void removePoint(double x)
x
- is the X data point to remove.public final void removePoint(double x, double y)
x
- is the X data point to remove.y
- is the Y data point to remove.public final double getXStandardDeviationPop()
public final double getYStandardDeviationPop()
public final double getXStandardDeviationSample()
public final double getYStandardDeviationSample()
public final double getXVariance()
public final double getYVariance()
public final long getN()
public final double getXSum()
public final double getYSum()
public final double getXAverage()
public final double getYAverage()
public final double getSumXSq()
public final double getSumYSq()
public final double getSumXY()
public void setSumX(double sumX)
sumX
- to setpublic void setSumXSq(double sumXSq)
sumXSq
- to setpublic void setSumY(double sumY)
sumY
- to setpublic void setSumYSq(double sumYSq)
sumYSq
- to setpublic void setSumXY(double sumXY)
sumXY
- sum of x times y.public void setDataPoints(long dataPoints)
dataPoints
- to setpublic double getSumX()
public double getSumY()
public long getDataPoints()
public double getYIntercept()
public double getSlope()
public final double getCorrelation()