public class Calculator
extends java.lang.Object
The Chart FX Statistical Extension provides a vast collection of pre-defined calculations for the statistical analysis of data passed to the chart. The supported members of this class allow you to test, analyze and calculate statistical measures for a selected chart series. The CalculatorMulti
class allows developers to perform calculations on multiple data series in a chart.
Modifier and Type | Class and Description |
---|---|
static class |
Calculator.CalculateMeanIntervalArgs
Description goes here
|
static class |
Calculator.CalculateStandardDeviationIntervalArgs
Description goes here
|
static class |
Calculator.CalculateVarianceIntervalArgs
Description goes here
|
Constructor and Description |
---|
Calculator()
Constructs a newly allocated Calculator object
|
Calculator(double[] data)
Constructs a newly allocated Calculator object
|
Calculator(double[] dataY,
double[] dataX)
Constructs a newly allocated Calculator object
|
Modifier and Type | Method and Description |
---|---|
void |
calculateMeanInterval(Calculator.CalculateMeanIntervalArgs _p_)
Used to calculate the Mean Interval for a selected series.
|
double |
calculateRegression(double x)
Used to calculate the Regression of a single X Value of a selected series.
|
void |
calculateStandardDeviationInterval(Calculator.CalculateStandardDeviationIntervalArgs _p_)
Used to calculate the Standard Deviation Interval for a selected series.
|
void |
calculateVarianceInterval(Calculator.CalculateVarianceIntervalArgs _p_)
Used to calculate the Variance Interval for a selected series.
|
double |
calculateZScore(double x)
Used to calculate the Z Score values for a selected series.
|
double |
calculateZScoreInverse(double z)
Used to calculate the Inverse Z Score values for a selected series.
|
double |
get(Analysis calculation)
Returns the selected analysis calculation (double) for the Calculator object.
|
double[] |
getData()
Gets the array of data associated with this Calculator.
|
double[] |
getDataX()
Gets the array of data associated with the calculator.
|
double |
getLsl()
Gets or sets a value indicating the Lower Specification Limit for a sample.
|
double |
getSigma()
Gets or sets the standard deviation of the process.
|
double |
getUsl()
Gets or sets a value indicating the Upper Specification Limit for a sample.
|
double |
performTest(Test test)
Returns the P-Value for a given test for the configured series.
|
boolean |
performTest(Test test,
double confidence)
Returns a Boolean specifying whether the configured test has passed or failed for the configured series, using the given Confidence level.
|
void |
resetLsl()
Set the property Lsl to its default value.
|
void |
resetSeries()
Set the property Series to its default value.
|
void |
resetSigma()
Set the property Sigma to its default value.
|
void |
resetUsl()
Set the property Usl to its default value.
|
void |
setLsl(double value)
Gets or sets a value indicating the Lower Specification Limit for a sample.
|
void |
setSigma(double value)
Gets or sets the standard deviation of the process.
|
void |
setUsl(double value)
Gets or sets a value indicating the Upper Specification Limit for a sample.
|
public Calculator()
public Calculator(double[] data)
data
- public Calculator(double[] dataY, double[] dataX)
dataY
- dataX
- public double[] getData()
Gets the array of data associated with this Calculator.
public double[] getDataX()
public double getLsl()
Gets or sets a value indicating the Lower Specification Limit for a sample.
setUsl
method may be used to get or set the Upper Specification Limit.setSigma
method may be used get or set the Sigma value for SPC charts.get
method of the Calculator
class may be used to get the Lsl analysis for a sample. The Add method of the StudiesCollection
could be used to add this analysis as well.To configure the Lsl for a sample:
resetLsl
public void setLsl(double value)
Gets or sets a value indicating the Lower Specification Limit for a sample.
setUsl
method may be used to get or set the Upper Specification Limit.setSigma
method may be used get or set the Sigma value for SPC charts.get
method of the Calculator
class may be used to get the Lsl analysis for a sample. The Add method of the StudiesCollection
could be used to add this analysis as well.To configure the Lsl for a sample:
value
- resetLsl
public double getSigma()
Gets or sets the standard deviation of the process.
setUsl
and setLsl
methods may be used to get or set the Upper and Lower Specification Limits for SPC charts.get
method of the Calculator
class may be used to get the Sigma for a sample. The Add method of the StudiesCollection
could be used to add the Sigma1, Sigma2 and Sigma3 analysis studies to the interactive statistical legend.To configure the Sigma value for a sample:
resetSigma
public void setSigma(double value)
Gets or sets the standard deviation of the process.
setUsl
and setLsl
methods may be used to get or set the Upper and Lower Specification Limits for SPC charts.get
method of the Calculator
class may be used to get the Sigma for a sample. The Add method of the StudiesCollection
could be used to add the Sigma1, Sigma2 and Sigma3 analysis studies to the interactive statistical legend.To configure the Sigma value for a sample:
value
- resetSigma
public double getUsl()
Gets or sets a value indicating the Upper Specification Limit for a sample.
setLsl
method may be used to get or set the Lower Specification Limit.setSigma
method may be used get or set the Sigma value for SPC charts.get
method of the Calculator
class may be used to get the Usl analysis for a sample. The Add method of the StudiesCollection
could be used to add this analysis as well.To configure the Usl for a sample:
resetUsl
public void setUsl(double value)
Gets or sets a value indicating the Upper Specification Limit for a sample.
setLsl
method may be used to get or set the Lower Specification Limit.setSigma
method may be used get or set the Sigma value for SPC charts.get
method of the Calculator
class may be used to get the Usl analysis for a sample. The Add method of the StudiesCollection
could be used to add this analysis as well.To configure the Usl for a sample:
value
- resetUsl
public void calculateMeanInterval(Calculator.CalculateMeanIntervalArgs _p_)
Used to calculate the Mean Interval for a selected series.
In order to access this method, you must first instaciate a Calculator object, which accepts a series index specifying the data series you wish to preform this calculation.
Find the Mean Interval for the first series in a chart:
_p_
- public double calculateRegression(double x)
Used to calculate the Regression of a single X Value of a selected series.
Find the Linear Regression value for the X Axis value of 21 for the first series in a chart:
x
- X Axis value to find the Linear Regression value.public void calculateStandardDeviationInterval(Calculator.CalculateStandardDeviationIntervalArgs _p_)
Used to calculate the Standard Deviation Interval for a selected series.
In order to access this method, you must first instaciate a Calculator object, which accepts a series index specifying the data series you wish to preform this calculation.
Find the Standard Deviation Interval for the first series in a chart:
_p_
- public void calculateVarianceInterval(Calculator.CalculateVarianceIntervalArgs _p_)
Used to calculate the Variance Interval for a selected series.
In order to access this method, you must first instaciate a Calculator object, which accepts a series index specifying the data series you wish to preform this calculation.
Find the Mean Interval for the first series in a chart:
_p_
- public double calculateZScore(double x)
Used to calculate the Z Score values for a selected series.
To calculate the Z-Score for a selected x value:
x
- X Value in which to calculate the z-score.public double calculateZScoreInverse(double z)
Used to calculate the Inverse Z Score values for a selected series.
To find the x value that correspond to the specified z-score:
z
- Z-score used to find the inverse x value.public double get(Analysis calculation)
In order to access this method, you must first instaciate a Calculator object, which accepts a series index specifying the data series you wish to preform this calculation.
This method exposes additional calculations you may apply to a single data series in the chart. The get
method of the CalculatorMulti
class allows you to perform calculations on all the data series in a chart.
The PerformTest method allows users to perform statistical tests on a single data series. However, if you wish to perform tests on the entire collection of data in a chart, you may use the performTest
method of the CalculatorMulti
class.
To use the Get method to retrieve the Interquartile Range (IQR) of the 2nd series in a chart:
calculation
- Specifies the analysis to perform.public double performTest(Test test)
This method is overload; If you specify only one parameter (the test), then the P-Value will be returned. If two parameters are configured (test and confidence), then a Boolean will be returned indicating whether the test passed or failed.
In order to access this method, you must first instaciate a Calculator object, which accepts a series index specifying the data series you wish to preform this calculation.
This method allows users to perform statistical tests on a single data series. However, if you wish to perform tests on the entire collection of data in a chart, you may use the performTest
method of the CalculatorMulti
class.
The get
method exposes additional calculations you may apply to a single data series in the chart. The get
method of the CalculatorMulti
class allows you to perform calculations on all the data series in a chart.
Perform the RegressionF test on the first series in a chart:
test
- Specifies the test to perform.public boolean performTest(Test test, double confidence)
This method is overload; If you specify only one parameter (the test), then the P-Value will be returned. If two parameters are configured (test and confidence), then a Boolean will be returned indicating whether the test passed or failed.
In order to access this method, you must first instaciate a Calculator object, which accepts a series index specifying the data series you wish to preform this calculation.
This method allows users to perform statistical tests on a single data series. However, if you wish to perform tests on the entire collection of data in a chart, you may use the performTest
method of the CalculatorMulti
class.
The get
method exposes additional calculations you may apply to a single data series in the chart. The get
method of the CalculatorMulti
class allows you to perform calculations on all the data series in a chart.
Perform the RegressionF test on the first series in a chart:
test
- Specifies the test to perform.confidence
- Confidence level.public void resetLsl()
setLsl
public void resetSeries()
public void resetSigma()
setSigma
public void resetUsl()
setUsl
2014 Software FX, Inc. All Rights Reserved. Chart FX is a registered trademark of Software FX, Inc
All other names are trademarks or registered trademarks of their respective owners.