code: public static Range<Double> calcCI95(Double percentageValue, Integer sampleSize) {
  //        GWT.log("calcCI95", null);
          GWT.log("percentageValue: " + percentageValue.toString(), null);
          GWT.log("sampleSize: " + sampleSize, null);
          if (sampleSize==0) {
              return null;
          }
          if ( (sampleSize < 0) ||(percentageValue < 0.0) || (percentageValue > 100.0) ) {
              throw new IllegalArgumentException("sampleSize < 0, percentageValue < 0.0, or percentageValue > 100.0");
          }
  
          //convert percentageValue to ratio
          Double ratio = percentageValue/100.0;
          Double oneMinusRatio = 1.0 - ratio;
  
          Double sqrtSD = Math.sqrt(zStdDevSqrd + (4*sampleSize*ratio*oneMinusRatio));
          Double denom = 2*(sampleSize + zStdDevSqrd);
  
          Double lowerLimit = ((2*sampleSize*ratio) + zStdDevSqrd - (zStdDev *sqrtSD))/denom;
  
          Double upperLimit = ((2*sampleSize*ratio) + zStdDevSqrd + (zStdDev *sqrtSD))/denom;
  
          //convert back to percentages, to 1 d.p.
          lowerLimit = Math.rint(lowerLimit*1000)/10.0;
          upperLimit = Math.rint(upperLimit*1000)/10.0;
  
          if(lowerLimit<0.0) {
              lowerLimit = 0.0;
          }
          if(upperLimit>100.0) {
              upperLimit = 100.0;
          }
  
  //        GWT.log("lowerLimit: " + lowerLimit.toString(), null);
  //        GWT.log("upperLimit: " + upperLimit.toString(), null);
          return new Range<Double>(lowerLimit, upperLimit);
      }
docs: /*
  Calculate CI95% value using the no continuity correction formula found here: http://faculty.vassar.edu/lowry/prop1.html