Chart FX for Java 6.5

SoftwareFX.ChartFX.Statistical
Class Calculator

java.lang.Object
  extended by SoftwareFX.ChartFX.Statistical.Calculator

public final class Calculator
extends java.lang.Object

Provides access to the Calculator 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.


Nested Class Summary
static class Calculator.Interval
          Provides access to the Calculator.Interval object.
 
Constructor Summary
Calculator()
           
 
Method Summary
 Calculator.Interval calculateMeanInterval(double confidence)
          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.
 Calculator.Interval calculateStandardDeviationInterval(double confidence)
          Used to calculate the Standard Deviation Interval for a selected series.
 Calculator.Interval calculateVarianceInterval(double confidence)
          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(int calculation)
          Returns the selected analysis calculation (double) for the Calculator object.
 double getLsl()
          Gets the Lsl.
 double getSigma()
          Gets the Sigma.
 double getUsl()
          Gets the Usl.
 double performTest(int test)
          Returns the P-Value (double) or Boolean specifying whether the configured test has passed for failed for the configured series.
 boolean performTest(int test, double confidence)
          Returns the P-Value (double) or Boolean specifying whether the configured test has passed for failed for the configured series.
 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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Calculator

public Calculator()
Method Detail

calculateMeanInterval

public Calculator.Interval calculateMeanInterval(double confidence)

Used to calculate the Mean Interval for a selected series.

Remarks:
  • 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.

    // Create a Calculator object for the 2nd Series
    Calculator calc1 = statistics1.getCalculators().getItem(1);

  • Parameters:
    confidence - Confidence level.
    See Also:
    calculateRegression(double), calculateStandardDeviationInterval(double), calculateVarianceInterval(double), calculateZScore(double), calculateZScoreInverse(double), get(int), performTest(int), CalculatorMulti

    calculateRegression

    public double calculateRegression(double x)

    Used to calculate the Regression of a single X Value of a selected series.

    Remarks:
  • 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.

    // Create a Calculator object for the 2nd Series
    Calculator calc1 = statistics1.getCalculators().getItem(1);

  • Parameters:
    x - X Axis value to find the Linear Regression value.
    See Also:
    calculateRegression(double), calculateStandardDeviationInterval(double), calculateVarianceInterval(double), calculateZScore(double), calculateZScoreInverse(double), get(int), performTest(int), CalculatorMulti

    calculateStandardDeviationInterval

    public Calculator.Interval calculateStandardDeviationInterval(double confidence)

    Used to calculate the Standard Deviation Interval for a selected series.

    Remarks:
  • 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.

    // Create a Calculator object for the 2nd Series
    Calculator calc1 = statistics1.getCalculators().getItem(1);

  • Parameters:
    confidence - Confidence level.
    See Also:
    calculateRegression(double), calculateStandardDeviationInterval(double), calculateVarianceInterval(double), calculateZScore(double), calculateZScoreInverse(double), get(int), performTest(int), CalculatorMulti

    calculateVarianceInterval

    public Calculator.Interval calculateVarianceInterval(double confidence)

    Used to calculate the Variance Interval for a selected series.

    Remarks:
  • 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.

    // Create a Calculator object for the 2nd Series
    Calculator calc1 = statistics1.getCalculators().getItem(1);

  • Parameters:
    confidence - Confidence level.
    See Also:
    calculateRegression(double), calculateStandardDeviationInterval(double), calculateVarianceInterval(double), calculateZScore(double), calculateZScoreInverse(double), get(int), performTest(int), CalculatorMulti

    calculateZScore

    public double calculateZScore(double x)

    Used to calculate the Z Score values for a selected series.

    Remarks:
  • 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.

    // Create a Calculator object for the 2nd Series
    Calculator calc1 = statistics1.getCalculators().getItem(1);

  • Parameters:
    x - X Value in which to calculate the z-score.
    See Also:
    calculateRegression(double), calculateStandardDeviationInterval(double), calculateVarianceInterval(double), calculateZScore(double), calculateZScoreInverse(double), get(int), performTest(int), CalculatorMulti

    calculateZScoreInverse

    public double calculateZScoreInverse(double z)

    Used to calculate the Inverse Z Score values for a selected series.

    Remarks:
  • 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.

    // Create a Calculator object for the 2nd Series
    Calculator calc1 = statistics1.getCalculators().getItem(1);

  • Parameters:
    z - Z-score used to find the inverse x value.
    See Also:
    calculateRegression(double), calculateStandardDeviationInterval(double), calculateVarianceInterval(double), calculateZScore(double), calculateZScoreInverse(double), get(int), performTest(int), CalculatorMulti

    get

    public double get(int calculation)

    Returns the selected analysis calculation (double) for the Calculator object.

    Remarks:
  • 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.

    // Create a Calculator object for the 2nd Series
    Calculator calc1 = statistics1.getCalculators().getItem(1);

  • This method exposes additional calculations you may apply to a single data series in the chart. The CalculatorMulti.get(int) 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 CalculatorMulti.performTest(int) method of the CalculatorMulti class.

  • Parameters:
    calculation - Specifies the analysis to perform.

    Parameter Values:
    The available values for calculation are:

    ValueDescription
    Analysis.NData size (n).
    Analysis.MINMinumum value.
    Analysis.MAXMaximum value.
    Analysis.SUMSum of all values.
    Analysis.MEDIANThe middle value in an array of values.
    Analysis.MEANAverage of all values.
    Analysis.MODEA measure of central tendency that is the value that occurs most frequently in a group of values.
    Analysis.VARIANCEA measure of dispersion for a random variable or group of numbers.
    Analysis.STANDARD_DEVIATIONThe square root of the variance.
    Analysis.COEFFICIENT_OF_VARIATIONThe standard deviation divided by the mean.
    Analysis.STANDARD_ERRORThe estimated standard deviation for a sample statistic which is also the standard deviation of a sampling distribution of means. The statistical bridge that connects the sample and the population and forms on of the bases of inferential statistics. (Standard Error for Mean)
    Analysis.LOWER_QUARTILEThe median of the lower half of a set of values.
    Analysis.UPPER_QUARTILEThe median of the upper half of a set of values.
    Analysis.IQRInterquartile Range.
    Analysis.SKEWNESSThe degree of asymmetry of a distribution.
    Analysis.RANGEThe covariance of two features measures their tendency to vary together, i.e., to co-vary. The covariance is the average of the products of the deviations of feature values from their means.
    Analysis.PEARSON_CORRELATION_COEFFICIENTPearson Product Moment Correlation Coefficient.
    Analysis.LINEAR_REGRESSION_MLinear Regression slope m (y = m.x + b).
    Analysis.LINEAR_REGRESSION_BLinear Regression displacement b (y = m.x + b).
    Analysis.COEFFICIENT_OF_DETERMINATIONCoefficient of Determiniation (SSR/SST).
    Analysis.STANDARD_ERROR_OF_ESTIMATEA measure of the accuracy of predictions made with a regression line.
    Analysis.SSRSum of Squares Due to Regression.
    Analysis.SSESum of Squares Due to Error.
    Analysis.SSTTotal Sum of Squares.
    Analysis.MSRMean Square Due to Regression.
    Analysis.MSEMean Square Due to Error.
    Analysis.LINEAR_REGRESSION_Tt Test statistic for significance in Simple Linear Regression.
    Analysis.LINEAR_REGRESSION_FF Test statistic for significance in Simple Linear Regression.
    Analysis.REGRESSION_LINELinear Regression Study. A line calculated in regression analysis that is usd to estimate the relation between two quantities (the independent variable and dependent variable).
    Analysis.ZSCORESz-Score zones. Displays zones of size Standard Deviation from the mean.
    Analysis.ERROR_BARSError bars are a graphic that visually represents the confidence interval around the mean value of the item.
    Analysis.RANGERange (Max - Min).
    Analysis.KURTOISThe degree of peakedness of a distribution, defined as a normalized form of the fourth central moment of a distribution.
    Analysis.LOWESSLocally Weighted Scatter plot Smoothing.
    Analysis.SIGMA_33*Sigma. Can Be displayed in the chart as a color zone.
    Analysis.SIGMA_22*Sigma. Can Be displayed in the chart as a color zone.
    Analysis.SIGMA_1Sigma. Calculated by the appropriate gallery type or supplied by you through the Sigma property (Calculator Class). Can be displayed in the chart as a color zone.
    Analysis.USLUpper Specification Limit. Set by the through the Usl property (Calculator Class). Can be displayed in the chart as a constant line.
    Analysis.LSLLower Specification Limit. Set by the through the Lsl property (Calculator Class). Can be displayed in the chart as a constant line.
    Analysis.PPKProcess Performance Index (Ppk).
    Analysis.PPProcess Performance (Pp).
    Analysis.CPKProcess Capability Index (Cpk).
    Analysis.CPProcess Capability (Cp).
    Analysis.WECOWestern Electric Company Rules (WECO). This analysis will contain 1 if all the rules are met and 0 if not.

    See Also:
    calculateRegression(double), calculateStandardDeviationInterval(double), calculateVarianceInterval(double), calculateZScore(double), calculateZScoreInverse(double), CalculatorMulti.get(int), performTest(int), CalculatorMulti.performTest(int), CalculatorMulti

    getLsl

    public double getLsl()

    Gets the Lsl. For more detail see setLsl(double).


    getSigma

    public double getSigma()

    Gets the Sigma. For more detail see setSigma(double).


    getUsl

    public double getUsl()

    Gets the Usl. For more detail see setUsl(double).


    performTest

    public double performTest(int test)

    Returns the P-Value (double) or Boolean specifying whether the configured test has passed for failed for the configured series.

    Remarks:
  • 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.

    // Create a Calculator object for the 2nd Series
    Calculator calc1 = statistics1.getCalculators().getItem(1);

  • 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 CalculatorMulti.performTest(int) method of the CalculatorMulti class.

  • The get(int) method exposes additional calculations you may apply to a single data series in the chart. The CalculatorMulti.get(int) method of the CalculatorMulti class allows you to perform calculations on all the data series in a chart.

  • Parameters:
    test - Specifies the test to perform.

    Parameter Values:
    The available values for test are:

    ValueDescription
    Test.REGRESSION_TTESTRegression T Test.
    Test.REGRESSION_FTESTRegression F Test.
    Test.WECOWeco Test.

    See Also:
    calculateRegression(double), calculateStandardDeviationInterval(double), calculateVarianceInterval(double), calculateZScore(double), calculateZScoreInverse(double), get(int), CalculatorMulti.get(int), CalculatorMulti.performTest(int)

    performTest

    public boolean performTest(int test,
                               double confidence)

    Returns the P-Value (double) or Boolean specifying whether the configured test has passed for failed for the configured series.

    Remarks:
  • 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.

    // Create a Calculator object for the 2nd Series
    Calculator calc1 = statistics1.getCalculators().getItem(1);

  • 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 CalculatorMulti.performTest(int) method of the CalculatorMulti class.

  • The get(int) method exposes additional calculations you may apply to a single data series in the chart. The CalculatorMulti.get(int) method of the CalculatorMulti class allows you to perform calculations on all the data series in a chart.

  • Parameters:
    test - Specifies the test to perform.
    confidence - Confidence level.

    Parameter Values:
    The available values for test are:

    ValueDescription
    Test.REGRESSION_TTESTRegression T Test.
    Test.REGRESSION_FTESTRegression F Test.
    Test.WECOWeco Test.

    See Also:
    calculateRegression(double), calculateStandardDeviationInterval(double), calculateVarianceInterval(double), calculateZScore(double), calculateZScoreInverse(double), get(int), CalculatorMulti.get(int), CalculatorMulti.performTest(int)

    setLsl

    public void setLsl(double value)

    Gets or sets a value indicating the Lower Specification Limit for a sample.

    Remarks:
  • This property is used to get or set the Lower Specification Limit for Statistical Process Control (SPC) charts. The setUsl(double) property may be used to get or set the Upper Specification Limit.

  • The setSigma(double) property may be used get or set the Sigma value for SPC charts.

  • The get(int) 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.

  • See Also:
    setUsl(double), setSigma(double), get(int), Calculator, StudiesCollection, Study, StudyConstant, StudyStripe

    setSigma

    public void setSigma(double value)

    Gets or sets the standard deviation of the process.

    Remarks:
  • A Statistical Process Control (SPC) or control chart provides basis for deciding whether the variation in the output is due to common causes (in control) or assignable causes (out of control). Whenever an out-of-control situation is detected, adjustments and/or other corrective action will be taken to bring the process back into control. The Sigma value is commonly known as the standard deviation of the process.

  • The setUsl(double) and setLsl(double) properties may be used to get or set the Upper and Lower Specification Limits for SPC charts.

  • The get(int) 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.

  • See Also:
    setUsl(double), setLsl(double), get(int), Calculator, StudiesCollection

    setUsl

    public void setUsl(double value)

    Gets or sets a value indicating the Upper Specification Limit for a sample.

    Remarks:
  • This property is used to get or set the Upper Specification Limit for Statistical Process Control (SPC) charts. The setLsl(double) property may be used to get or set the Lower Specification Limit.

  • The setSigma(double) property may be used get or set the Sigma value for SPC charts.

  • The get(int) 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.

  • See Also:
    setLsl(double), setSigma(double), get(int), Calculator, StudiesCollection, Study, StudyConstant, StudyStripe

    http://www.softwarefx.com

    2007 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.