/** * @param observed1 array of observed frequency counts of the first data set * @param observed2 array of observed frequency counts of the second data set * @return p-value * @throws IllegalArgumentException if preconditions are not met * @throws MathException if an error occurs computing the p-value * @since 1.2 */ public double chiSquareTestDataSetsComparison(long[] observed1, long[] observed2) throws IllegalArgumentException, MathException { distribution.setDegreesOfFreedom((double) observed1.length - 1); return 1 - distribution.cumulativeProbability( chiSquareDataSetsComparison(observed1, observed2)); }
/** * @param observed1 array of observed frequency counts of the first data set * @param observed2 array of observed frequency counts of the second data set * @return p-value * @throws IllegalArgumentException if preconditions are not met * @throws MathException if an error occurs computing the p-value * @since 1.2 */ public double chiSquareTestDataSetsComparison(long[] observed1, long[] observed2) throws IllegalArgumentException, MathException { distribution.setDegreesOfFreedom((double) observed1.length - 1); return 1 - distribution.cumulativeProbability( chiSquareDataSetsComparison(observed1, observed2)); }
/** * @param observed1 array of observed frequency counts of the first data set * @param observed2 array of observed frequency counts of the second data set * @return p-value * @throws IllegalArgumentException if preconditions are not met * @throws MathException if an error occurs computing the p-value * @since 1.2 */ public double chiSquareTestDataSetsComparison(long[] observed1, long[] observed2) throws IllegalArgumentException, MathException { distribution.setDegreesOfFreedom((double) observed1.length - 1); return 1 - distribution.cumulativeProbability( chiSquareDataSetsComparison(observed1, observed2)); }