code: public static double getPvalue(TransposeDataList transposeDataList) {
          Object[] keys = transposeDataList.keySet().toArray();
          if(keys.length!=2) {
              throw new IllegalArgumentException("The collection must contain observations from 2 groups.");
          }
          
          Object keyX = keys[0];
          Object keyY = keys[1];
          
          FlatDataList flatDataListX = transposeDataList.get(keyX);
          FlatDataList flatDataListY = transposeDataList.get(keyY);
  
          int n = flatDataListX.size();
          if(n<=0 || n!=flatDataListY.size()) {
              throw new IllegalArgumentException("The number of observations in each group must be equal and larger than 0.");
          }
  
          AssociativeArray Di = new AssociativeArray();
          for(int j=0;j<n;++j) {
              double delta= flatDataListX.getDouble(j) - flatDataListY.getDouble(j);
  
              if(delta==0) {
                  continue; //don't count it at all
              }
  
              String key="+";
              if(delta<0) {
                  key="-";
              }
              Di.put(key+Integer.toString(j), Math.abs(delta));
          }
  
          //converts the values of the table with its Ranks
          Ranks.getRanksFromValues(Di);
          double W=0;
          for(Map.Entry<Object, Object> entry : Di.entrySet()) {
              if(entry.getKey().toString().charAt(0)=='+') {
                  W+=TypeInference.toDouble(entry.getValue());
              }
          }
  
          double pvalue = scoreToPvalue(W, n);
  
          return pvalue;
      }
docs: Calculates the p-value of null Hypothesis.
  
  @param transposeDataList
  @return