This is an automated email from the ASF dual-hosted git repository.

asf-gitbox-commits pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-statistics.git


The following commit(s) were added to refs/heads/master by this push:
     new 1e8ce0d9 Document potential performance limitations and viable 
alternatives
1e8ce0d9 is described below

commit 1e8ce0d9d769974d2c9af19209e69c8f44c1a35c
Author: Alex Herbert <[email protected]>
AuthorDate: Thu Aug 27 15:15:01 2026 +0100

    Document potential performance limitations and viable alternatives
---
 .../statistics/inference/UnconditionedExactTest.java     | 10 ++++++++++
 src/changes/changes.xml                                  | 16 +++++++++++-----
 2 files changed, 21 insertions(+), 5 deletions(-)

diff --git 
a/commons-statistics-inference/src/main/java/org/apache/commons/statistics/inference/UnconditionedExactTest.java
 
b/commons-statistics-inference/src/main/java/org/apache/commons/statistics/inference/UnconditionedExactTest.java
index 2f5abaad..1e4cbb96 100644
--- 
a/commons-statistics-inference/src/main/java/org/apache/commons/statistics/inference/UnconditionedExactTest.java
+++ 
b/commons-statistics-inference/src/main/java/org/apache/commons/statistics/inference/UnconditionedExactTest.java
@@ -70,6 +70,16 @@ import 
org.apache.commons.statistics.inference.BrentOptimizer.PointValuePair;
  * number of points}. The best candidates are optionally used as the start 
point for an
  * {@linkplain #withOptimize(boolean) optimized} search for a local maxima.
  *
+ * <p><strong>Maximum number of tables</strong>
+ *
+ * <p>The maximum number of tables is equal to (m + 1) * (n + 1). The p-value 
computation
+ * must track all tables as or more extreme than the observed table. This is 
done using an
+ * expandable {@code int[]} array, and computation is limited to the maximum 
capacity of
+ * an array. When the input counts are large this can result in excessive 
computation and
+ * memory consumption. If performance is a limiting factor, users are advised 
to check the
+ * table if the counts are potentially large, or from untrusted input, and 
consider
+ * switching to an alternative such as the {@link ChiSquareTest} or {@link 
GTest}.
+ *
  * <p>References:
  * <ol>
  * <li>
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 58768a9d..94d4e1bb 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -53,27 +53,33 @@ If the output is not quite correct, check for invisible 
trailing spaces!
   </properties>
   <body>
     <release version="1.4" date="TBD" description="Adds new features (requires 
Java 8).">
-      <action dev="aherbert" type="fix" due-to="Security scan, Aex Herbert" 
issue="STATISTICS-98">
+      <action dev="aherbert" type="update" due-to="Security scan, Alex 
Herbert">
+        "UnconditionedExactTest": Update documentation on possible long 
runtime and
+        high memory consumption for large table counts. For performance 
sensitive
+        code with large 2x2 contigency counts users can switch to an 
alternative such
+        as a chi-square or G test.
+      </action>
+      <action dev="aherbert" type="fix" due-to="Security scan, Alex Herbert" 
issue="STATISTICS-98">
         "SignificanceResult": Raise an exception if the p-value is invalid when
         comparing the p-value to a significance level. Corrects silent 
rejection
         of the null hypothesis if the computed p-value is NaN.
       </action>
-      <action dev="aherbert" type="fix" due-to="Security scan, Aex Herbert" 
issue="STATISTICS-97">
+      <action dev="aherbert" type="fix" due-to="Security scan, Alex Herbert" 
issue="STATISTICS-97">
         "TTest/OneWayAnova": Checks added for arguments that invalidate the 
test
         statistic: non-finite values in input arrays; and NaN mean arguments.
       </action>
-      <action dev="aherbert" type="update" due-to="Security scan, Aex Herbert">
+      <action dev="aherbert" type="update" due-to="Security scan, Alex 
Herbert">
         "FisherExactTest/HypergeometricDistribution": Update documentation
         on possible long runtime when the hypergeometric distribution
         cumulative probability functions are evaluated with parameters that
         create a very large support width. Users are advised to guard the
         arguments to the FisherExactTest and HypergeometricDistribution.
       </action>
-      <action dev="aherbert" type="fix" due-to="Security scan, Aex Herbert" 
issue="STATISTICS-96">
+      <action dev="aherbert" type="fix" due-to="Security scan, Alex Herbert" 
issue="STATISTICS-96">
         "commons-statistics-distribution": Checks added to distribution factory
         functions for NaN parameters that invalidate the distribution.
       </action>
-      <action dev="aherbert" type="fix" due-to="Security scan, Aex Herbert" 
issue="STATISTICS-95">
+      <action dev="aherbert" type="fix" due-to="Security scan, Alex Herbert" 
issue="STATISTICS-95">
         "NormalConfidenceInterval": Validate mean is finite and variance is 
positive finite.
       </action>
     </release>

Reply via email to