diff --git a/src/main/java/org/apache/commons/math3/stat/inference/ChiSquareTest.java b/src/main/java/org/apache/commons/math3/stat/inference/ChiSquareTest.java
index cdcf5a2e5..885afb1ee 100644
--- a/src/main/java/org/apache/commons/math3/stat/inference/ChiSquareTest.java
+++ b/src/main/java/org/apache/commons/math3/stat/inference/ChiSquareTest.java
@@ -70,9 +70,8 @@ public class ChiSquareTest {
* @param observed array of observed frequency counts
* @param expected array of expected frequency counts
* @return chiSquare test statistic
- * @throws NotPositiveException if one element of expected
is not
- * positive
- * @throws NotStrictlyPositiveException if one element of observed
is
+ * @throws NotPositiveException if observed
has negative entries
+ * @throws NotStrictlyPositiveException if expected
has entries that are
* not strictly positive
* @throws DimensionMismatchException if the arrays length is less than 2
*/
@@ -144,9 +143,8 @@ public class ChiSquareTest {
* @param observed array of observed frequency counts
* @param expected array of expected frequency counts
* @return p-value
- * @throws NotPositiveException if one element of expected
is not
- * positive
- * @throws NotStrictlyPositiveException if one element of observed
is
+ * @throws NotPositiveException if observed
has negative entries
+ * @throws NotStrictlyPositiveException if expected
has entries that are
* not strictly positive
* @throws DimensionMismatchException if the arrays length is less than 2
* @throws MaxCountExceededException if an error occurs computing the p-value
@@ -192,9 +190,8 @@ public class ChiSquareTest {
* @param alpha significance level of the test
* @return true iff null hypothesis can be rejected with confidence
* 1 - alpha
- * @throws NotPositiveException if one element of expected
is not
- * positive
- * @throws NotStrictlyPositiveException if one element of observed
is
+ * @throws NotPositiveException if observed
has negative entries
+ * @throws NotStrictlyPositiveException if expected
has entries that are
* not strictly positive
* @throws DimensionMismatchException if the arrays length is less than 2
* @throws OutOfRangeException if alpha
is not in the range (0, 0.5]
@@ -239,7 +236,7 @@ public class ChiSquareTest {
* @return chiSquare test statistic
* @throws NullArgumentException if the array is null
* @throws DimensionMismatchException if the array is not rectangular
- * @throws NotPositiveException if one entry is not positive
+ * @throws NotPositiveException if {@code counts} has negative entries
*/
public double chiSquare(final long[][] counts)
throws NullArgumentException, NotPositiveException,
@@ -303,7 +300,7 @@ public class ChiSquareTest {
* @return p-value
* @throws NullArgumentException if the array is null
* @throws DimensionMismatchException if the array is not rectangular
- * @throws NotPositiveException if one entry is not positive
+ * @throws NotPositiveException if {@code counts} has negative entries
* @throws MaxCountExceededException if an error occurs computing the p-value
*/
public double chiSquareTest(final long[][] counts)
@@ -352,7 +349,7 @@ public class ChiSquareTest {
* 1 - alpha
* @throws NullArgumentException if the array is null
* @throws DimensionMismatchException if the array is not rectangular
- * @throws NotPositiveException if one entry is not positive
+ * @throws NotPositiveException if {@code counts} has any negative entries
* @throws OutOfRangeException if alpha
is not in the range (0, 0.5]
* @throws MaxCountExceededException if an error occurs computing the p-value
*/
@@ -400,10 +397,10 @@ public class ChiSquareTest {
* @param observed2 array of observed frequency counts of the second data set
* @return chiSquare test statistic
* @throws DimensionMismatchException the the length of the arrays does not match
- * @throws NotPositiveException if one entry in observed1
or
- * observed2
is not positive
+ * @throws NotPositiveException if any entries in observed1
or
+ * observed2
are negative
* @throws ZeroException if either all counts of observed1
or
- * observed2
are zero, or if the count at the same index is zero
+ * observed2
are zero, or if the count at some index is zero
* for both arrays
* @since 1.2
*/
@@ -496,8 +493,8 @@ public class ChiSquareTest {
* @param observed2 array of observed frequency counts of the second data set
* @return p-value
* @throws DimensionMismatchException the the length of the arrays does not match
- * @throws NotPositiveException if one entry in observed1
or
- * observed2
is not positive
+ * @throws NotPositiveException if any entries in observed1
or
+ * observed2
are negative
* @throws ZeroException if either all counts of observed1
or
* observed2
are zero, or if the count at the same index is zero
* for both arrays
@@ -548,8 +545,8 @@ public class ChiSquareTest {
* @return true iff null hypothesis can be rejected with confidence
* 1 - alpha
* @throws DimensionMismatchException the the length of the arrays does not match
- * @throws NotPositiveException if one entry in observed1
or
- * observed2
is not positive
+ * @throws NotPositiveException if any entries in observed1
or
+ * observed2
are negative
* @throws ZeroException if either all counts of observed1
or
* observed2
are zero, or if the count at the same index is zero
* for both arrays
@@ -579,7 +576,7 @@ public class ChiSquareTest {
* @param in input 2-way table to check
* @throws NullArgumentException if the array is null
* @throws DimensionMismatchException if the array is not valid
- * @throws NotPositiveException if one entry is not positive
+ * @throws NotPositiveException if the array contains any negative entries
*/
private void checkArray(final long[][] in)
throws NullArgumentException, DimensionMismatchException,