Class WilsonScoreInterval

    • Method Detail

      • createInterval

        public ConfidenceInterval createInterval​(int numberOfTrials,
                                                 int numberOfSuccesses,
                                                 double confidenceLevel)
        Create a confidence interval for the true probability of success of an unknown binomial distribution with the given observed number of trials, successes and confidence level.


        • numberOfTrials must be positive
        • numberOfSuccesses may not exceed numberOfTrials
        • confidenceLevel must be strictly between 0 and 1 (exclusive)
        Specified by:
        createInterval in interface BinomialConfidenceInterval
        numberOfTrials - number of trials
        numberOfSuccesses - number of successes
        confidenceLevel - desired probability that the true probability of success falls within the returned interval
        Confidence interval containing the probability of success with probability confidenceLevel