使用 Apache Commons 库计算 TDIST
Calculating TDIST using Apache Commons library
我正在尝试使用 commons-math
计算 2 尾学生分布。我正在使用 Excel 来比较值并验证我的结果是否正确。
所以使用excel计算TDIST(x, df, t),其中x = 5.968191467, df = 8, tail t = 2
=TDIST(ABS(5.968191467),8,2)
得到结果:0.000335084
像这样使用 commons Math :
TDistribution tDistribution = new TDistribution(8);
System.out.println(BigDecimal.valueOf(tDistribution.density(5.968191467)));
我得到结果:0.00018738010608336254
我应该使用什么来获得与 TDIST 值完全一样的结果?
我正在尝试使用 commons-math
计算 2 尾学生分布。我正在使用 Excel 来比较值并验证我的结果是否正确。
所以使用excel计算TDIST(x, df, t),其中x = 5.968191467, df = 8, tail t = 2
=TDIST(ABS(5.968191467),8,2)
得到结果:0.000335084
像这样使用 commons Math :
TDistribution tDistribution = new TDistribution(8);
System.out.println(BigDecimal.valueOf(tDistribution.density(5.968191467)));
我得到结果:0.00018738010608336254
我应该使用什么来获得与 TDIST 值完全一样的结果?