WebCab Probability and Statistics Web Services for .NET v3.3 Demo

Correlation.LeastSquaresRegressionLineY Method 

Constructs the regression line of Y on X using the method of least squares, for the set of pairs of points: (xValues[0], yValues[0]), (xValues[1], yValues[1]),.

public double[] LeastSquaresRegressionLineY(
   double[] xValues,
   double[] yValues
);

Parameters

xValues
The values of the first elements within the pairs for which the linear regression line is evaluated.
yValues
The values of the second elements within the pairs for which the linear regression line is evaluated.

Return Value

an array d with two doubles which describes the regression line. In particular, the regression line for the array d = d[0], d[1], will correspond to the regression line: Y(y)=d[0]*X+d[1], where X is the variable corresponding to the first element (i.e. the xValues) and Y is the variable corresponding to the second element (i.e. the yValues).

Remarks

.. , (xValues[n], yValues[n]). That is, the regression line using the least squares method is constructed when the second element of the pairs from which the data set of constructed is plot against the first elements of the pairs.

See Also

Correlation Class | Correlation Namespace | Calculates the regression line of X on Y using the method of least squares.