code: private static double scoreToPvalue(double score, int n) {
          /*
          if(n<=20) {
              //calculate it from binomial distribution
          }
          */
          
          double mean=n*(n+1.0)/4.0;
          double variable=n*(n+1.0)*(2.0*n+1.0)/24.0;
  
          double z=(score-mean)/Math.sqrt(variable);
  
          return ContinuousDistributions.gaussCdf(z);
      }
docs: Returns the Pvalue for a particular score
  
  @param score
  @param n
  @return