numberOfAttempts += 1;
if (numberOfAttempts > maxNumberOfAttempts) {
return score_distribution(); // calculate whole distribution
}
// calculate only top part of distribution cause it's faster
double approximate_threshold = gaussianThresholdEstimation.thresholdByPvalue(pvalue_to_estimate_threshold);
scoreDistribution = score_distribution_above_threshold(approximate_threshold);
pvalue_to_estimate_threshold *= 2;
} while (scoreDistribution.top_part_pvalue() < pvalue);
return scoreDistribution;