Class DAgostino


  • public class DAgostino
    extends HypothesisTest
    D'Agostino's K2 test is a goodness-of-fit measure of departure from normality. It tests whether or not a given sample comes from a normally distributed population. The test is based on transformations of the sample kurtosis and skewness, and has power only against the alternatives that the distribution is skewed and/or kurtic.

    The R equivalent function is dagoTest in fBasics.

    • Constructor Detail

      • DAgostino

        public DAgostino​(double[] sample)
        Perform D'Agostino's test to test for the departure from normality.
        Parameters:
        sample - a sample
    • Method Detail

      • Z1

        public double Z1()
        Get Z1. NB: the paper is inconsistent about which skewness value to use; either the unbiased or the biased one. The derivation in Section 3 uses the biased estimator but the numerical example in Section 5 use the unbiased indicator.
        Returns:
        Z1
      • Z2

        public double Z2()
        Get Z1. NB: the paper is inconsistent about which skewness value to use; either the unbiased or the biased one. The derivation in Section 3 uses the biased estimator but the numerical example in Section 5 use the unbiased indicator.
        Returns:
        Z1
      • pvalueZ1

        public double pvalueZ1()
        Get the p-value for Z1.
        Returns:
        the p-value for Z1
      • pvalueZ2

        public double pvalueZ2()
        Get the p-value for Z2.
        Returns:
        the p-value for Z2