public class XYStats extends Object
| Constructor and Description | 
|---|
| XYStats(boolean xLog,
       boolean yLog)Constructs a new correlation statistics calculator. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addPoint(double x,
        double y)Submits a data point for calculations. | 
| double | getCorrelation()Returns the product moment correlation coefficient. | 
| double[] | getLinearCoefficients()Returns the polynomial coefficients of a linear regression line
 for the submitted data. | 
| double[] | linearRegressionLine()Calculates the linear regression line for the submitted points. | 
public XYStats(boolean xLog,
               boolean yLog)
xLog - whether the X coordinates are being plotted on a
         logarithmic scaleyLog - whether the Y coordinates are being plotted on a
         logarithmic scalepublic void addPoint(double x,
                     double y)
x - X coordinatey - Y coordinatepublic double[] getLinearCoefficients()
public double getCorrelation()
public double[] linearRegressionLine()
Copyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.