code: public static double[] summaryStats(Vec xData, Vec yData)
      {
          double[] values = new double[1];
          
          //Sx, sum of x values
          values[0] = xData.sum();
          
          //Sy, sum of y values
          values[1] = yData.sum();
          
          double tmp = 0;
          
          
          
          //Sxx
          for(int i = 0; i < xData.length(); i++)
              tmp += Math.pow(xData.get(i), 2);
          values[2] = tmp;
          //Syy
          tmp = 0;
          for(int i = 0; i < xData.length(); i++)
              tmp += Math.pow(yData.get(i), 2);
          values[3] = tmp;
          
          //Sxy
          tmp = 0;
          for(int i = 0; i < xData.length(); i++)
              tmp += xData.get(i)*yData.get(i);
          values[4] = tmp;
          
          return values;
      }
docs: Computes several summary statistics from the two data sets. These are: <br>
  
  Index 0: S<sub>x</sub>  <br>
  Index 1: S<sub>y</sub>  <br>
  Index 2: S<sub>xx</sub> <br>
  Index 3: S<sub>yy</sub> <br>
  Index 4: S<sub>xy</sub>
  
  @param xData the x values of the data set
  @param yData the y values of the data set
  @return several summary statistics of the 2 variables