You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ah...@apache.org on 2022/11/12 16:52:33 UTC
[commons-statistics] 01/02: Statistics-25: Remove T-dist switch to normal CDF
This is an automated email from the ASF dual-hosted git repository.
aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-statistics.git
commit 3ee52f7ca0883495e0df1ca2a914ad24b5ba968a
Author: Alex Herbert <ah...@apache.org>
AuthorDate: Sat Nov 12 16:46:15 2022 +0000
Statistics-25: Remove T-dist switch to normal CDF
---
.../apache/commons/statistics/distribution/TDistribution.java | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/commons-statistics-distribution/src/main/java/org/apache/commons/statistics/distribution/TDistribution.java b/commons-statistics-distribution/src/main/java/org/apache/commons/statistics/distribution/TDistribution.java
index e828276..898b414 100644
--- a/commons-statistics-distribution/src/main/java/org/apache/commons/statistics/distribution/TDistribution.java
+++ b/commons-statistics-distribution/src/main/java/org/apache/commons/statistics/distribution/TDistribution.java
@@ -110,10 +110,6 @@ public abstract class TDistribution extends AbstractContinuousDistribution {
private static class StudentsTDistribution extends TDistribution {
/** 2. */
private static final double TWO = 2;
- /** Number of degrees of freedom above which to use the normal distribution.
- * This is used to check the CDF when the degrees of freedom is large.
- * Set to 1 / machine epsilon, 2^52, or 4.50e15. */
- private static final double DOF_THRESHOLD_NORMAL = 0x1.0p52;
/** The threshold for the density function where the
* power function base minus 1 is close to zero. */
private static final double CLOSE_TO_ZERO = 0.25;
@@ -185,12 +181,6 @@ public abstract class TDistribution extends AbstractContinuousDistribution {
}
final double v = getDegreesOfFreedom();
- // This threshold may no longer be required.
- // See STATISTICS-25.
- if (v > DOF_THRESHOLD_NORMAL) {
- return STANDARD_NORMAL.cumulativeProbability(x);
- }
-
// cdf(t) = 1 - 0.5 * I_x(t)(v/2, 1/2)
// where x(t) = v / (v + t^2)
//