Class PearsonType5

    • Constructor Detail

      • PearsonType5

        public PearsonType5()
        Creates a PearsonType5 distribution shape = 1.0 scale = 1.0
      • PearsonType5

        public PearsonType5​(double[] parameters)
        Creates a PearsonType5 distribution parameters[0] = shape parameters[1] = scale
        Parameters:
        parameters - the parameter array
      • PearsonType5

        public PearsonType5​(double shape,
                            double scale)
        Creates a PearsonType5 distribution
        Parameters:
        shape - must be >0
        scale - must be > 0
      • PearsonType5

        public PearsonType5​(double shape,
                            double scale,
                            java.lang.String name)
        Creates a PearsonType5 distribution
        Parameters:
        shape - must be >0
        scale - must be > 0
        name - an optional label/name
    • Method Detail

      • setParameters

        public final void setParameters​(double shape,
                                        double scale)
        Sets the shape and scale parameters
        Parameters:
        shape - must be > 0
        scale - must be > 0
      • getShape

        public final double getShape()
        Gets the shape parameter
        Returns:
        the shape parameter
      • getScale

        public final double getScale()
        Gets the scale parameter
        Returns:
        the scale parameter
      • cdf

        public double cdf​(double x)
        Description copied from interface: CDFIfc
        Returns the F(x) = Pr{X <= x} where F represents the cumulative distribution function
        Specified by:
        cdf in interface CDFIfc
        Parameters:
        x - a double representing the upper limit
        Returns:
        a double representing the probability
      • getMean

        public double getMean()
        Description copied from interface: MeanIfc
        Returns the mean or expected value of a distribution
        Specified by:
        getMean in interface MeanIfc
        Returns:
        If shape <= 1.0, returns Double.NaN, otherwise, returns the mean
      • getParameters

        public double[] getParameters()
        Gets the parameters parameters[0] = shape parameters[1] = scale
        Specified by:
        getParameters in interface ParametersIfc
        Returns:
        Returns an array of the parameters
      • getVariance

        public double getVariance()
        Description copied from interface: VarianceIfc
        Returns the variance of the distribution if defined
        Specified by:
        getVariance in interface VarianceIfc
        Returns:
        If shape <= 2.0, returns Double.NaN, otherwise returns the variance
      • invCDF

        public double invCDF​(double p)
        Description copied from interface: InverseCDFIfc
        Provides the inverse cumulative distribution function for the distribution While closed form solutions for the inverse cdf may not exist, numerical search methods can be used to solve F(X) = U.
        Specified by:
        invCDF in interface InverseCDFIfc
        Parameters:
        p - The probability to be evaluated for the inverse, p must be [0,1] or an IllegalArgumentException is thrown
        Returns:
        The inverse cdf evaluated at the supplied probability
      • pdf

        public double pdf​(double x)
        Description copied from interface: PDFIfc
        Returns the f(x) where f represents the probability density function for the distribution. Note this is not a probability.
        Specified by:
        pdf in interface PDFIfc
        Parameters:
        x - a double representing the value to be evaluated
        Returns:
        f(x)
      • setParameters

        public void setParameters​(double[] parameters)
        Sets the parameters parameters[0] = shape parameters[1] = scale
        Specified by:
        setParameters in interface ParametersIfc
        Parameters:
        parameters - the parameter array