code: public static void normalize(AssociativeArray associativeArray) {
          double sum = 0.0;
          //Prevents numeric underflow by subtracting the max. References: http://www.youtube.com/watch?v=-RVM21Voo7Q
          for(Map.Entry<Object, Object> entry : associativeArray.entrySet()) {
              Double value = TypeInference.toDouble(entry.getValue());
              associativeArray.put(entry.getKey(), value);
  
              sum += value;
          }
          
          if(sum!=0.0) {
              for(Map.Entry<Object, Object> entry : associativeArray.entrySet()) {
                  associativeArray.put(entry.getKey(), TypeInference.toDouble(entry.getValue())/sum);
              }
          }
      }
docs: Normalizes the provided associative array by dividing its values with the
  sum of the observations.
  
  @param associativeArray