U01Test

object U01Test

Functions

Link copied to clipboard
fun approxChiSQValue(df: Int, confidenceLevel: Double): Double

Use for large degrees of freedom

Link copied to clipboard

Computes the chi-squared test statistic

Link copied to clipboard

Computes the 2-D chi-squared serial test. Assumes that the pairs are (u(1), u(2)), (u(3), u(4)) ..., (u(n/2 - 1), u(n/2))

Performs the 2-D chi-squared serial test

Link copied to clipboard

Computes the 3-D chi-squared serial test Tests triplets (u(i-1), u(i), u(i+1))

Performs the 3-D chi-squared serial test

Link copied to clipboard

Computes the chi-squared test statistic

Link copied to clipboard

Performs the correlation test

Link copied to clipboard
fun recommendedChiSquaredTestStatistic(u: DoubleArray, k: Int = floor(u.size / 5.0).toInt()): Double

Computes the chi-squared test statistic with recommended intervals and array size

Link copied to clipboard
fun recommendedU01BreakPoints(sampleSize: Int, confidenceLevel: Double = 0.95): DoubleArray

Recommends break points over the range (0,1) based on the recommended number of intervals for a chi-squared goodness of fit test.

Link copied to clipboard
fun recommendNumChiSquaredIntervals(sampleSize: Int, confidenceLevel: Double = 0.95): Int

Recommends the number of intervals for a chi-squared goodness of fit test based on the supplied sample size. This does not assume anything about the distribution. An adjustment ensures that there are at least 3 intervals based on other theory.

Link copied to clipboard
fun recommendNumChiSquareU01Intervals(sampleSize: Int, confidenceLevel: Double = 0.95): Int

Recommends the number of intervals for a chi-squared goodness of fit test of possible U(0,1) data based on the supplied sample size. Adjusts the result of Williams approximation to ensure at least 5 or more expected within the intervals and a minimum of at least 3 intervals.

Link copied to clipboard

Computes the runs up test statistic for the array of supposedly U(0,1) values.

Performs the runs up test