当前位置: 首页>>代码示例>>Java>>正文


Java ChiSquaredDistributionImpl.cumulativeProbability方法代码示例

本文整理汇总了Java中org.apache.commons.math.distribution.ChiSquaredDistributionImpl.cumulativeProbability方法的典型用法代码示例。如果您正苦于以下问题:Java ChiSquaredDistributionImpl.cumulativeProbability方法的具体用法?Java ChiSquaredDistributionImpl.cumulativeProbability怎么用?Java ChiSquaredDistributionImpl.cumulativeProbability使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.commons.math.distribution.ChiSquaredDistributionImpl的用法示例。


在下文中一共展示了ChiSquaredDistributionImpl.cumulativeProbability方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: chiSquareTest

import org.apache.commons.math.distribution.ChiSquaredDistributionImpl; //导入方法依赖的package包/类
/**
 * @param counts array representation of 2-way table
 * @return p-value
 * @throws MathIllegalArgumentException if preconditions are not met
 * @throws MathException if an error occurs computing the p-value
 */
public double chiSquareTest(long[][] counts)
throws MathException {
    checkArray(counts);
    double df = ((double) counts.length -1) * ((double) counts[0].length - 1);
    distribution = new ChiSquaredDistributionImpl(df);
    return 1 - distribution.cumulativeProbability(chiSquare(counts));
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:14,代码来源:ChiSquareTestImpl.java

示例2: chiSquareTestDataSetsComparison

import org.apache.commons.math.distribution.ChiSquaredDistributionImpl; //导入方法依赖的package包/类
/**
 * @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 MathIllegalArgumentException 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 MathException {
    distribution = new ChiSquaredDistributionImpl((double) observed1.length - 1);
    return 1 - distribution.cumulativeProbability(
            chiSquareDataSetsComparison(observed1, observed2));
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:15,代码来源:ChiSquareTestImpl.java


注:本文中的org.apache.commons.math.distribution.ChiSquaredDistributionImpl.cumulativeProbability方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。