code: private static double[] getRandomWalk(int numPoints) {
  
      double[] y = new double[numPoints];
      y[0] = 0;
      for (int i = 1; i < y.length; i++) {
        y[i] = y[i - 1] + Math.random() - .5;
      }
      return y;
    }
docs: Generates a set of random walk data
  
  @param numPoints
  @return