Documentation of 'jhplot.math.num.pdf.Hypergeometric' Java class.
Hypergeometric
jhplot.math.num.pdf

Class Hypergeometric

    • Constructor Detail

      • Hypergeometric

        public Hypergeometric()
        Default constructor. The number of failures, number of successes, and sample size are all set to one.
      • Hypergeometric

        public Hypergeometric(int successes,
                              int failures,
                              int sample)
        Create a distribution with the given number of failures, number of successes, and sample size.
        Parameters:
        successes - the number of successes.
        failures - the number of failures.
        sample - the sample size.
    • Method Detail

      • cumulativeProbability

        public double cumulativeProbability(int x)
                                     throws NumericException
        The CDF for this distribution. This method returns P(X ≤ x).
        Specified by:
        cumulativeProbability in class DiscreteDistribution
        Parameters:
        x - the value at which the CDF is evaluated.
        Returns:
        CDF for this distribution.
        Throws:
        NumericException - if the cumulative probability can not be computed.
      • getNumberOfFailures

        public int getNumberOfFailures()
        Access the number of failures.
        Returns:
        the number of failures.
      • getNumberOfSuccesses

        public int getNumberOfSuccesses()
        Access the number of successes.
        Returns:
        the number of successes.
      • getSampleSize

        public int getSampleSize()
        Access the sample size.
        Returns:
        the sample size.
      • inverseCumulativeProbability

        public int inverseCumulativeProbability(double p)
                                         throws NumericException
        The inverse CDF for this distribution. This method returns the largest x such that, P(X ≤ x) ≤ p. The return value must also satisfy P(X ≥ x) &ge 1 - p.
        Specified by:
        inverseCumulativeProbability in class DiscreteDistribution
        Parameters:
        p - the cumulative probability.
        Returns:
        x
        Throws:
        NumericException - if the inverse cumulative probability can not be computed.
      • probability

        public double probability(int x)
        The PMF for this distribution. This method returns P(X = x).
        Specified by:
        probability in class DiscreteDistribution
        Parameters:
        x - the value at which the probability is evaluated.
        Returns:
        PMF for this distribution.
      • setNumberOfFailures

        public void setNumberOfFailures(int n)
        Modify the number of failures.
        Parameters:
        n - the new number of failures value.
      • setNumberOfSuccesses

        public void setNumberOfSuccesses(int n)
        Modify the number of successes.
        Parameters:
        n - the new number of successes value.
      • setSampleSize

        public void setSampleSize(int n)
        Modify the sample size.
        Parameters:
        n - the new sample size value.

DMelt 3.0 © DataMelt by jWork.ORG