private static double scoreToPvalue(double score, int n) {
        double variance=2.0*(2.0*n+5.0)/(9.0*n*(n-1.0));

        double Z=score/Math.sqrt(variance); //follows approximately Normal with 0 mean and variance as calculated above

        return ContinuousDistributions.gaussCdf(Z);
    }
private static double scoreToPvalue ( double score , int n ) { double variance = 2.0 * ( 2.0 * n + 5.0 ) / ( 9.0 * n * ( n - 1.0 ) ) ; double Z = score / Math . sqrt ( variance ) ; return ContinuousDistributions . gaussCdf ( Z ) ; }
Returns the Pvalue for a particular score

@param score
@param n
@return