code: private boolean rule8(Double sample) {
          if (!hasMean()) {
              return false;
          }
  
          if (Math.abs(sample - mean.getResult()) > oneDeviation) {
              ++rule8Count;
          } else {
              rule8Count = 0;
          }
  
          return rule8Count >= 8;
      }
docs: and the points are in both directions from the mean