Documentation of 'umontreal.iro.lecuyer.probdist.WatsonUDist' Java class
WatsonUDist
umontreal.iro.lecuyer.probdist

Class WatsonUDist

  • All Implemented Interfaces:
    Distribution


    public class WatsonUDist
    extends ContinuousDistribution
    Extends the class ContinuousDistribution for the Watson U distribution (see). Given a sample of n independent uniforms ui over [0, 1], the Watson statistic Un2 is defined by

    Wn2 = 1/12n + ∑j=1n{u(j) - (j-0.5)/n}2,
    Un2 = Wn2 - n(bar(u)n -1/2)2.

    where the u(j) are the ui sorted in increasing order, and bar(u)n is the average of the observations ui. The distribution function (the cumulative probabilities) is defined as Fn(x) = P[Un2 <= x].
    • Constructor Summary

      Constructors 
      Constructor and Description
      WatsonUDist(int n)
      Constructs a Watson U distribution for a sample of size n.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      double barF(double x)
      Returns the complementary distribution function.
      static double barF(int n, double x)
      Computes the complementary distribution function bar(F)n(x), where Fn is the Watson U distribution with parameter n.
      double cdf(double x)
      Returns the distribution function F(x).
      static double cdf(int n, double x)
      Computes the Watson U distribution function, i.e.
      double density(double x)
      Returns f (x), the density evaluated at x.
      static double density(int n, double x)
      Computes the density of the Watson U distribution with parameter n.
      double getMean()
      Returns the mean.
      static double getMean(int n)
      Returns the mean of the Watson U distribution with parameter n.
      int getN()
      Returns the parameter n of this object.
      double[] getParams()
      Return an array containing the parameter n of this object.
      double getStandardDeviation()
      Returns the standard deviation.
      static double getStandardDeviation(int n)
      Returns the standard deviation of the Watson U distribution with parameter n.
      double getVariance()
      Returns the variance.
      static double getVariance(int n)
      Returns the variance of the Watson U distribution with parameter n.
      double inverseF(double u)
      Returns the inverse distribution function x = F-1(u).
      static double inverseF(int n, double u)
      Computes x = Fn-1(u), where Fn is the Watson U distribution with parameter n.
      void setN(int n)
      Sets the parameter n of this object.
      java.lang.String toString() 
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • WatsonUDist

        public WatsonUDist(int n)
        Constructs a Watson U distribution for a sample of size n.
    • Method Detail

      • density

        public double density(double x)
        Description copied from class: ContinuousDistribution
        Returns f (x), the density evaluated at x.
        Specified by:
        density in class ContinuousDistribution
        Parameters:
        x - value at which the density is evaluated
        Returns:
        density function evaluated at x
      • cdf

        public double cdf(double x)
        Description copied from interface: Distribution
        Returns the distribution function F(x).
        Parameters:
        x - value at which the distribution function is evaluated
        Returns:
        distribution function evaluated at x
      • barF

        public double barF(double x)
        Description copied from class: ContinuousDistribution
        Returns the complementary distribution function. The default implementation computes bar(F)(x) = 1 - F(x).
        Specified by:
        barF in interface Distribution
        Overrides:
        barF in class ContinuousDistribution
        Parameters:
        x - value at which the complementary distribution function is evaluated
        Returns:
        complementary distribution function evaluated at x
      • inverseF

        public double inverseF(double u)
        Description copied from class: ContinuousDistribution
        Returns the inverse distribution function x = F-1(u). Restrictions: u∈[0, 1].
        Specified by:
        inverseF in interface Distribution
        Overrides:
        inverseF in class ContinuousDistribution
        Parameters:
        u - value at which the inverse distribution function is evaluated
        Returns:
        the inverse distribution function evaluated at u
      • density

        public static double density(int n,
                                     double x)
        Computes the density of the Watson U distribution with parameter n.
      • cdf

        public static double cdf(int n,
                                 double x)
        Computes the Watson U distribution function, i.e. returns P[Un2 <= x], where Un2 is the Watson statistic defined in. We use the asymptotic distribution for n -> ∞, plus a correction in O(1/n), as given in.
      • barF

        public static double barF(int n,
                                  double x)
        Computes the complementary distribution function bar(F)n(x), where Fn is the Watson U distribution with parameter n.
      • inverseF

        public static double inverseF(int n,
                                      double u)
        Computes x = Fn-1(u), where Fn is the Watson U distribution with parameter n.
      • getMean

        public static double getMean(int n)
        Returns the mean of the Watson U distribution with parameter n.
        Returns:
        Returns the mean
      • getVariance

        public static double getVariance(int n)
        Returns the variance of the Watson U distribution with parameter n.
        Returns:
        the variance
      • getStandardDeviation

        public static double getStandardDeviation(int n)
        Returns the standard deviation of the Watson U distribution with parameter n.
        Returns:
        the standard deviation
      • getN

        public int getN()
        Returns the parameter n of this object.
      • setN

        public void setN(int n)
        Sets the parameter n of this object.
      • getParams

        public double[] getParams()
        Return an array containing the parameter n of this object.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.