Class PearsonType6

    • Constructor Detail

      • PearsonType6

        public PearsonType6()
        Creates a PearsonTypeVI distribution with alpha1 = 2.0 alpha2 = 3.0 beta = 1.0
      • PearsonType6

        public PearsonType6​(double alpha1,
                            double alpha2,
                            double beta)
        Creates a PearsonTypeVI distribution
        Parameters:
        alpha1 - shape 1
        alpha2 - shape 2
        beta - scale
      • PearsonType6

        public PearsonType6​(double[] parameters)
        Creates a PearsonTypeVI distribution

        parameters[0] = alpha1 parameters[1] = alpha2 parameters[2] = beta

        Parameters:
        parameters - the parameter array
      • PearsonType6

        public PearsonType6​(double alpha1,
                            double alpha2,
                            double beta,
                            java.lang.String name)
        Creates a PearsonTypeVI distribution
        Parameters:
        alpha1 - shape 1
        alpha2 - shape 2
        beta - scale
        name - an optional name/label
    • Method Detail

      • setParameters

        public final void setParameters​(double alpha1,
                                        double alpha2,
                                        double beta)
        Parameters:
        alpha1 - shape 1
        alpha2 - shape 2
        beta - scale
      • setShapeParameters

        public final void setShapeParameters​(double alpha1,
                                             double alpha2)
        Parameters:
        alpha1 - shape 1
        alpha2 - shape 2
      • setScale

        public void setScale​(double beta)
        Parameters:
        beta - the scale
      • setParameters

        public void setParameters​(double[] params)
        params[0] = alpha1 params[1] = alpha2 params[2] = beta
        Specified by:
        setParameters in interface ParametersIfc
        Parameters:
        params - the parameter array
      • getParameters

        public double[] getParameters()
        params[0] = alpha1 params[1] = alpha2 params[2] = beta
        Specified by:
        getParameters in interface ParametersIfc
        Returns:
        the parameter array
      • 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:
      • 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
      • 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
      • 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:
        Returns the mean or Double.NaN if alpha2 <= 1.0
      • getVariance

        public double getVariance()
        Description copied from interface: VarianceIfc
        Returns the variance of the distribution if defined
        Specified by:
        getVariance in interface VarianceIfc
        Returns:
        Returns the variance or Double.NaN if alpha2 <= 2.0