double estimateExactK(double k, int n_i, double p) {
        double n = computeN(n_i);
        double variance = k * 1/n * (1 - 1/n);
        return k/n + inverseCumulativeProbability(n_i, p) * Math.sqrt(variance);
    }
Use StudentT distribution and estimate how many hits you need from each partition
to to get the globally top-k documents with the desired probability

@author baldersheim
container-search/src/main/java/com/yahoo/search/dispatch/TopKEstimator.java