From this, the STEYX function is equivalent to the root mean square of the error (RMSE) of linear regression.
var x = new double[] { 6, 5, 11, 7, 5, 4, 4 }; // example data of the link
var y = new double[] { 2, 3, 9, 1, 8, 7, 5 };
var offsetAndSlope = MathNet.Numerics.LinearRegression.SimpleRegression.Fit(x, y);
var offset = offsetAndSlope.Item1; // 3.16667
var slope = offsetAndSlope.Item2; // 0.30556
var yBest = x.Select(p => offset + p * slope).ToArray(); // Best fitted y values
var RSS = MathNet.Numerics.Distance.SSD(y, yBest); // Residual sum of squares = 54.63889
var degreeOfFreedom = x.Length - 2; // Degree of freedom = 5
var RMSE = Math.Sqrt(RSS / degreeOfFreedom); // Root mean square of the error = 3.30572
From this, the
STEYX
function is equivalent to theroot mean square of the error (RMSE)
of linear regression.