Beispiel #1
0
        public double SlopeWithoutIntercept(Statistics x)
        {
            double dotProduct = 0;

            for (int i = 0; i < Length; i++)
            {
                dotProduct += _list[i] * x._list[i];
            }
            return(dotProduct / x.SumOfSquares());
        }
Beispiel #2
0
 public static double StdDevSlopeWithoutIntercept(Statistics y, Statistics x)
 {
     try
     {
         return(StdDevYWithoutIntercept(y, x) / Math.Sqrt(x.SumOfSquares()));
     }
     catch
     {
         return(double.NaN);
     }
 }
Beispiel #3
0
 public static double StdDevA(Statistics y, Statistics x)
 {
     try
     {
         return(StdDevY(y, x) * Math.Sqrt(x.SumOfSquares() / (x._list.Length * x.VarianceTotal())));
     }
     catch (Exception)
     {
         return(double.NaN);
     }
 }
Beispiel #4
0
        private static double StdDevYWithoutIntercept(Statistics y, Statistics x)
        {
            Statistics residuals = ResidualsWithoutIntercept(y, x);

            return(Math.Sqrt(residuals.SumOfSquares() / (residuals._list.Length - 2)));
        }
Beispiel #5
0
 public double SlopeWithoutIntercept(Statistics x)
 {
     double dotProduct = 0;
     for (int i = 0; i < Length; i++)
     {
         dotProduct += _list[i]*x._list[i];
     }
     return dotProduct/x.SumOfSquares();
 }
Beispiel #6
0
 public static double StdDevSlopeWithoutIntercept(Statistics y, Statistics x)
 {
     try
     {
         return StdDevYWithoutIntercept(y, x)/Math.Sqrt(x.SumOfSquares());
     }
     catch
     {
         return double.NaN;
     }
 }
Beispiel #7
0
 public static double StdDevA(Statistics y, Statistics x)
 {
     try
     {
         return StdDevY(y, x) * Math.Sqrt(x.SumOfSquares() / (x._list.Length * x.VarianceTotal()));
     }
     catch (Exception)
     {
         return double.NaN;
     }
 }