Пример #1
0
 /// <summary>
 /// Standard error for the Alpha (y-intercept) coefficient of a linear
 /// regression function y = a*x + b.
 /// <para>
 /// Described at:
 /// http://www.chem.utoronto.ca/coursenotes/analsci/StatsTutorial/ErrRegr.html
 /// </para>
 /// </summary>
 /// <param name="y">Y values</param>
 /// <param name="x">X values</param>
 public static double StdErrBTerm2(Statistics y, Statistics x)
 {
     try
     {
         return StdDevY(y, x)*Math.Sqrt(x.SumOfSquares()/(x._list.Length*x.VarianceTotal()));
     }
     catch (Exception)
     {
         return double.NaN;
     }
 }