Package jsl.utilities.random.rng
Class RNGTEST
- java.lang.Object
-
- jsl.utilities.random.rng.RNGTEST
-
public class RNGTEST extends java.lang.Object
This class computes some tests on random numbers
-
-
Constructor Summary
Constructors Constructor Description RNGTEST()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static double
approxChiSQValue(int df, double confidenceLevel)
Use for large degrees of freedomstatic double
chiSquaredTest(RandU01Ifc rng, long n, int k)
Performs 1-D chi-squared teststatic double
correlationTest(RandU01Ifc rng, int lag, long n)
Performs the correlation teststatic double
runsUpTest(RandU01Ifc rng, long n)
Performs the runs up teststatic double
serial2DTest(RandU01Ifc rng, long n, int k)
Performs the 2-D chi-squared serial teststatic double
serial3DTest(RandU01Ifc rng, long n, int k)
Performs the 3-D chi-squared serial test
-
-
-
Method Detail
-
approxChiSQValue
public static double approxChiSQValue(int df, double confidenceLevel)
Use for large degrees of freedom- Parameters:
df
- degrees of freedomconfidenceLevel
- the confidence level for the statistical test- Returns:
- the approximate chi-squared value
-
chiSquaredTest
public static double chiSquaredTest(RandU01Ifc rng, long n, int k)
Performs 1-D chi-squared test- Parameters:
rng
- the thing that produces U(0,1) numbers, must not nulln
- number of random numbers to testk
- the number of intervals in the test- Returns:
- the chi-squared test statistic
-
serial2DTest
public static double serial2DTest(RandU01Ifc rng, long n, int k)
Performs the 2-D chi-squared serial test- Parameters:
rng
- the thing that produces U(0,1) numbers, must not nulln
- number of random numbers to testk
- the number of intervals in the test for each dimension- Returns:
- the chi-squared test statistic
-
serial3DTest
public static double serial3DTest(RandU01Ifc rng, long n, int k)
Performs the 3-D chi-squared serial test- Parameters:
rng
- the thing that produces U(0,1) numbers, must not nulln
- number of random numbers to testk
- the number of intervals in the test for each dimension- Returns:
- the chi-squared test statistic
-
correlationTest
public static double correlationTest(RandU01Ifc rng, int lag, long n)
Performs the correlation test- Parameters:
rng
- the thing that produces U(0,1) numbers, must not nulllag
- the lag to testn
- the number to sample- Returns:
- the test statistic
-
runsUpTest
public static double runsUpTest(RandU01Ifc rng, long n)
Performs the runs up test- Parameters:
rng
- the thing that produces U(0,1) numbers, must not nulln
- the number to sample- Returns:
- the test statistic
-
-