jdistlib.disttest
Class NormalityTest
- java.lang.Object
-
- jdistlib.disttest.NormalityTest
-
public class NormalityTest extends java.lang.ObjectA package about normality testing. Taken from various places.
-
-
Constructor Summary
Constructors Constructor and Description NormalityTest()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description static doubleanderson_darling_pvalue(double value, int n)static doubleanderson_darling_statistic(double[] X)static doublecramer_vonmises_pvalue(double w, int n)static doublecramer_vonmises_statistic(double[] X)static doubledagostino_pearson_pvalue(double value)static doubledagostino_pearson_statistic(double[] X)Calculate D'Agostino-Pearson test for normality.static doublejarque_bera_pvalue(double value)static doublejarque_bera_statistic(double[] X)Calculate Jarque-Bera Normality Test.static doublekolmogorov_lilliefors_pvalue(double k, int n)static doublekolmogorov_lilliefors_statistic(double[] X)Exactly identical as kolmogorov_smirnov_statisticstatic doublekolmogorov_smirnov_pvalue(double d, double[] X)Deprecated.static doublekolmogorov_smirnov_statistic(double[] X)Deprecated.static double[]kolmogorov_smirnov_test(double[] X)Perform Kolmogorov-Smirnov two-sided normality test.static doubleshapiro_francia_pvalue(double w, int n)P-value of Shapiro-Francia normality teststatic doubleshapiro_francia_statistic(double[] X)Shapiro-Francia normality teststatic doubleshapiro_wilk_pvalue(double w, int n)static doubleshapiro_wilk_statistic(double[] X)Invoke shapiro_wilk_statistic with sort = falsestatic doubleshapiro_wilk_statistic(double[] x, boolean sort)Compute Shapiro-Wilk statistic
-
-
-
Method Detail
-
shapiro_wilk_statistic
public static final double shapiro_wilk_statistic(double[] X)
Invoke shapiro_wilk_statistic with sort = false- Parameters:
X- pre-sorted array of numbers- Returns:
-
shapiro_wilk_statistic
public static final double shapiro_wilk_statistic(double[] x, boolean sort)Compute Shapiro-Wilk statistic- Parameters:
X- array of numbersort- if true, then this function will attempt to sort the X first.- Returns:
-
shapiro_wilk_pvalue
public static final double shapiro_wilk_pvalue(double w, int n)- Parameters:
w-n- The length of the array- Returns:
- p value
-
anderson_darling_statistic
public static final double anderson_darling_statistic(double[] X)
-
anderson_darling_pvalue
public static final double anderson_darling_pvalue(double value, int n)- Parameters:
value-n- The length of the array- Returns:
- p value
-
cramer_vonmises_statistic
public static final double cramer_vonmises_statistic(double[] X)
-
cramer_vonmises_pvalue
public static final double cramer_vonmises_pvalue(double w, int n)- Parameters:
w-n- The length of the array- Returns:
- p value
-
dagostino_pearson_statistic
public static final double dagostino_pearson_statistic(double[] X)
Calculate D'Agostino-Pearson test for normality. Follows Chi^2 distribution with df = 2. This is the infamous omnibus test. Note: It breaks down for n <= 7. See:
Doornik, Hansen, An Omnibus Test for Univariate and Multivariate Normality, 1994- Parameters:
X-- Returns:
- test statistic
-
dagostino_pearson_pvalue
public static final double dagostino_pearson_pvalue(double value)
-
jarque_bera_statistic
public static final double jarque_bera_statistic(double[] X)
Calculate Jarque-Bera Normality Test. Follows Chi^2 distribution with df = 2
http://en.wikipedia.org/wiki/Jarque-Bera_test- Parameters:
X-- Returns:
- test statistic
-
jarque_bera_pvalue
public static final double jarque_bera_pvalue(double value)
-
kolmogorov_smirnov_test
public static final double[] kolmogorov_smirnov_test(double[] X)
Perform Kolmogorov-Smirnov two-sided normality test.- Parameters:
X-- Returns:
- an array of two elements: The first is the test statistic, the second is the p-value
-
kolmogorov_smirnov_statistic
public static final double kolmogorov_smirnov_statistic(double[] X)
Deprecated.Computation of Kolmogorov-Smirnov statistics. Deprecated. Please use kolmogorov_smirnov_test instead.- Parameters:
X-- Returns:
- statistic
-
kolmogorov_smirnov_pvalue
public static final double kolmogorov_smirnov_pvalue(double d, double[] X)Deprecated.Computation of Kolmogorov-Smirnov p-value. Deprecated. Please use kolmogorov_smirnov_test instead.- Parameters:
d-X-- Returns:
- p-value
-
kolmogorov_lilliefors_statistic
public static final double kolmogorov_lilliefors_statistic(double[] X)
Exactly identical as kolmogorov_smirnov_statistic- Parameters:
X-- Returns:
- test statistic
-
kolmogorov_lilliefors_pvalue
public static final double kolmogorov_lilliefors_pvalue(double k, int n)- Parameters:
k-n- The length of the array- Returns:
- p-value
-
shapiro_francia_statistic
public static final double shapiro_francia_statistic(double[] X)
Shapiro-Francia normality test- Parameters:
X- a sorted array of values- Returns:
- test statistic
-
shapiro_francia_pvalue
public static final double shapiro_francia_pvalue(double w, int n)P-value of Shapiro-Francia normality test- Parameters:
w- the result from ShapiroFrancia's statisticn- the length of the original array- Returns:
- p-value
-
-
DMelt 3.0 © DataMelt by jWork.ORG