Package org.hipparchus.stat.inference
Class InferenceTestUtils
- java.lang.Object
-
- org.hipparchus.stat.inference.InferenceTestUtils
-
public class InferenceTestUtils extends Object
A collection of static methods to create inference test instances or to perform inference tests.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static double
approximateP(double d, int n, int m)
static double
chiSquare(double[] expected, long[] observed)
static double
chiSquare(long[][] counts)
static double
chiSquareDataSetsComparison(long[] observed1, long[] observed2)
static double
chiSquareTest(double[] expected, long[] observed)
static boolean
chiSquareTest(double[] expected, long[] observed, double alpha)
static double
chiSquareTest(long[][] counts)
static boolean
chiSquareTest(long[][] counts, double alpha)
static double
chiSquareTestDataSetsComparison(long[] observed1, long[] observed2)
static boolean
chiSquareTestDataSetsComparison(long[] observed1, long[] observed2, double alpha)
static double
exactP(double d, int m, int n, boolean strict)
static double
g(double[] expected, long[] observed)
static double
gDataSetsComparison(long[] observed1, long[] observed2)
static double
gTest(double[] expected, long[] observed)
static boolean
gTest(double[] expected, long[] observed, double alpha)
static double
gTestDataSetsComparison(long[] observed1, long[] observed2)
static boolean
gTestDataSetsComparison(long[] observed1, long[] observed2, double alpha)
static double
gTestIntrinsic(double[] expected, long[] observed)
static double
homoscedasticT(double[] sample1, double[] sample2)
static double
homoscedasticT(StatisticalSummary sampleStats1, StatisticalSummary sampleStats2)
static double
homoscedasticTTest(double[] sample1, double[] sample2)
static boolean
homoscedasticTTest(double[] sample1, double[] sample2, double alpha)
static double
homoscedasticTTest(StatisticalSummary sampleStats1, StatisticalSummary sampleStats2)
static double
kolmogorovSmirnovStatistic(double[] x, double[] y)
static double
kolmogorovSmirnovStatistic(RealDistribution dist, double[] data)
static double
kolmogorovSmirnovTest(double[] x, double[] y)
static double
kolmogorovSmirnovTest(double[] x, double[] y, boolean strict)
static double
kolmogorovSmirnovTest(RealDistribution dist, double[] data)
static double
kolmogorovSmirnovTest(RealDistribution dist, double[] data, boolean strict)
static boolean
kolmogorovSmirnovTest(RealDistribution dist, double[] data, double alpha)
static double
oneWayAnovaFValue(Collection<double[]> categoryData)
static double
oneWayAnovaPValue(Collection<double[]> categoryData)
static boolean
oneWayAnovaTest(Collection<double[]> categoryData, double alpha)
static double
pairedT(double[] sample1, double[] sample2)
static double
pairedTTest(double[] sample1, double[] sample2)
static boolean
pairedTTest(double[] sample1, double[] sample2, double alpha)
static double
rootLogLikelihoodRatio(long k11, long k12, long k21, long k22)
static double
t(double[] sample1, double[] sample2)
static double
t(double mu, double[] observed)
static double
t(double mu, StatisticalSummary sampleStats)
static double
t(StatisticalSummary sampleStats1, StatisticalSummary sampleStats2)
static double
tTest(double[] sample1, double[] sample2)
static boolean
tTest(double[] sample1, double[] sample2, double alpha)
static double
tTest(double mu, double[] sample)
static boolean
tTest(double mu, double[] sample, double alpha)
static double
tTest(double mu, StatisticalSummary sampleStats)
static boolean
tTest(double mu, StatisticalSummary sampleStats, double alpha)
static double
tTest(StatisticalSummary sampleStats1, StatisticalSummary sampleStats2)
static boolean
tTest(StatisticalSummary sampleStats1, StatisticalSummary sampleStats2, double alpha)
-
-
-
Method Detail
-
homoscedasticT
public static double homoscedasticT(double[] sample1, double[] sample2) throws MathIllegalArgumentException, NullArgumentException
-
homoscedasticT
public static double homoscedasticT(StatisticalSummary sampleStats1, StatisticalSummary sampleStats2) throws MathIllegalArgumentException, NullArgumentException
-
homoscedasticTTest
public static boolean homoscedasticTTest(double[] sample1, double[] sample2, double alpha) throws MathIllegalArgumentException, NullArgumentException, MathIllegalStateException
-
homoscedasticTTest
public static double homoscedasticTTest(double[] sample1, double[] sample2) throws MathIllegalArgumentException, NullArgumentException, MathIllegalStateException
-
homoscedasticTTest
public static double homoscedasticTTest(StatisticalSummary sampleStats1, StatisticalSummary sampleStats2) throws MathIllegalArgumentException, NullArgumentException, MathIllegalStateException
-
pairedT
public static double pairedT(double[] sample1, double[] sample2) throws MathIllegalArgumentException, NullArgumentException
-
pairedTTest
public static boolean pairedTTest(double[] sample1, double[] sample2, double alpha) throws MathIllegalArgumentException, NullArgumentException, MathIllegalStateException
-
pairedTTest
public static double pairedTTest(double[] sample1, double[] sample2) throws MathIllegalArgumentException, NullArgumentException, MathIllegalStateException
-
t
public static double t(double mu, double[] observed) throws MathIllegalArgumentException, NullArgumentException
- Throws:
MathIllegalArgumentException
NullArgumentException
- See Also:
TTest.t(double, double[])
-
t
public static double t(double mu, StatisticalSummary sampleStats) throws MathIllegalArgumentException, NullArgumentException
-
t
public static double t(double[] sample1, double[] sample2) throws MathIllegalArgumentException, NullArgumentException
- Throws:
MathIllegalArgumentException
NullArgumentException
- See Also:
TTest.t(double[], double[])
-
t
public static double t(StatisticalSummary sampleStats1, StatisticalSummary sampleStats2) throws MathIllegalArgumentException, NullArgumentException
-
tTest
public static boolean tTest(double mu, double[] sample, double alpha) throws MathIllegalArgumentException, NullArgumentException, MathIllegalStateException
-
tTest
public static double tTest(double mu, double[] sample) throws MathIllegalArgumentException, NullArgumentException, MathIllegalStateException
-
tTest
public static boolean tTest(double mu, StatisticalSummary sampleStats, double alpha) throws MathIllegalArgumentException, NullArgumentException, MathIllegalStateException
-
tTest
public static double tTest(double mu, StatisticalSummary sampleStats) throws MathIllegalArgumentException, NullArgumentException, MathIllegalStateException
-
tTest
public static boolean tTest(double[] sample1, double[] sample2, double alpha) throws MathIllegalArgumentException, NullArgumentException, MathIllegalStateException
-
tTest
public static double tTest(double[] sample1, double[] sample2) throws MathIllegalArgumentException, NullArgumentException, MathIllegalStateException
-
tTest
public static boolean tTest(StatisticalSummary sampleStats1, StatisticalSummary sampleStats2, double alpha) throws MathIllegalArgumentException, NullArgumentException, MathIllegalStateException
-
tTest
public static double tTest(StatisticalSummary sampleStats1, StatisticalSummary sampleStats2) throws MathIllegalArgumentException, NullArgumentException, MathIllegalStateException
-
chiSquare
public static double chiSquare(double[] expected, long[] observed) throws MathIllegalArgumentException
- Throws:
MathIllegalArgumentException
- See Also:
ChiSquareTest.chiSquare(double[], long[])
-
chiSquare
public static double chiSquare(long[][] counts) throws MathIllegalArgumentException, NullArgumentException
-
chiSquareTest
public static boolean chiSquareTest(double[] expected, long[] observed, double alpha) throws MathIllegalArgumentException, MathIllegalStateException
-
chiSquareTest
public static double chiSquareTest(double[] expected, long[] observed) throws MathIllegalArgumentException, MathIllegalStateException
-
chiSquareTest
public static boolean chiSquareTest(long[][] counts, double alpha) throws MathIllegalArgumentException, NullArgumentException, MathIllegalStateException
-
chiSquareTest
public static double chiSquareTest(long[][] counts) throws MathIllegalArgumentException, NullArgumentException, MathIllegalStateException
-
chiSquareDataSetsComparison
public static double chiSquareDataSetsComparison(long[] observed1, long[] observed2) throws MathIllegalArgumentException
-
chiSquareTestDataSetsComparison
public static double chiSquareTestDataSetsComparison(long[] observed1, long[] observed2) throws MathIllegalArgumentException, MathIllegalStateException
-
chiSquareTestDataSetsComparison
public static boolean chiSquareTestDataSetsComparison(long[] observed1, long[] observed2, double alpha) throws MathIllegalArgumentException, MathIllegalStateException
-
oneWayAnovaFValue
public static double oneWayAnovaFValue(Collection<double[]> categoryData) throws MathIllegalArgumentException, NullArgumentException
-
oneWayAnovaPValue
public static double oneWayAnovaPValue(Collection<double[]> categoryData) throws MathIllegalArgumentException, NullArgumentException, MathIllegalStateException
-
oneWayAnovaTest
public static boolean oneWayAnovaTest(Collection<double[]> categoryData, double alpha) throws MathIllegalArgumentException, NullArgumentException, MathIllegalStateException
-
g
public static double g(double[] expected, long[] observed) throws MathIllegalArgumentException
- Throws:
MathIllegalArgumentException
- See Also:
GTest.g(double[], long[])
-
gTest
public static double gTest(double[] expected, long[] observed) throws MathIllegalArgumentException, MathIllegalStateException
-
gTestIntrinsic
public static double gTestIntrinsic(double[] expected, long[] observed) throws MathIllegalArgumentException, MathIllegalStateException
-
gTest
public static boolean gTest(double[] expected, long[] observed, double alpha) throws MathIllegalArgumentException, MathIllegalStateException
-
gDataSetsComparison
public static double gDataSetsComparison(long[] observed1, long[] observed2) throws MathIllegalArgumentException
- Throws:
MathIllegalArgumentException
- See Also:
GTest.gDataSetsComparison(long[], long[])
-
rootLogLikelihoodRatio
public static double rootLogLikelihoodRatio(long k11, long k12, long k21, long k22) throws MathIllegalArgumentException
-
gTestDataSetsComparison
public static double gTestDataSetsComparison(long[] observed1, long[] observed2) throws MathIllegalArgumentException, MathIllegalStateException
-
gTestDataSetsComparison
public static boolean gTestDataSetsComparison(long[] observed1, long[] observed2, double alpha) throws MathIllegalArgumentException, MathIllegalStateException
-
kolmogorovSmirnovStatistic
public static double kolmogorovSmirnovStatistic(RealDistribution dist, double[] data) throws MathIllegalArgumentException, NullArgumentException
-
kolmogorovSmirnovTest
public static double kolmogorovSmirnovTest(RealDistribution dist, double[] data) throws MathIllegalArgumentException, NullArgumentException
-
kolmogorovSmirnovTest
public static double kolmogorovSmirnovTest(RealDistribution dist, double[] data, boolean strict) throws MathIllegalArgumentException, NullArgumentException
-
kolmogorovSmirnovTest
public static boolean kolmogorovSmirnovTest(RealDistribution dist, double[] data, double alpha) throws MathIllegalArgumentException, NullArgumentException
-
kolmogorovSmirnovStatistic
public static double kolmogorovSmirnovStatistic(double[] x, double[] y) throws MathIllegalArgumentException, NullArgumentException
-
kolmogorovSmirnovTest
public static double kolmogorovSmirnovTest(double[] x, double[] y) throws MathIllegalArgumentException, NullArgumentException
-
kolmogorovSmirnovTest
public static double kolmogorovSmirnovTest(double[] x, double[] y, boolean strict) throws MathIllegalArgumentException, NullArgumentException
-
exactP
public static double exactP(double d, int m, int n, boolean strict)
-
approximateP
public static double approximateP(double d, int n, int m)
-
-