diff --git a/src/main/java/org/apache/commons/math3/stat/descriptive/moment/Kurtosis.java b/src/main/java/org/apache/commons/math3/stat/descriptive/moment/Kurtosis.java index 166535eac..be04fbe1f 100644 --- a/src/main/java/org/apache/commons/math3/stat/descriptive/moment/Kurtosis.java +++ b/src/main/java/org/apache/commons/math3/stat/descriptive/moment/Kurtosis.java @@ -36,7 +36,9 @@ import org.apache.commons.math3.util.MathUtils; * {@link StandardDeviation}
*
* Note that this statistic is undefined for n < 4. Double.Nan
- * is returned when there is not sufficient data to compute the statistic.
* Note that this implementation is not synchronized. If * multiple threads access an instance of this class concurrently, and at least diff --git a/src/main/java/org/apache/commons/math3/stat/descriptive/moment/Mean.java b/src/main/java/org/apache/commons/math3/stat/descriptive/moment/Mean.java index 588e9c666..aac3d78d5 100644 --- a/src/main/java/org/apache/commons/math3/stat/descriptive/moment/Mean.java +++ b/src/main/java/org/apache/commons/math3/stat/descriptive/moment/Mean.java @@ -50,7 +50,9 @@ import org.apache.commons.math3.util.MathUtils; * Sample Means and Variances," Robert F. Ling, Journal of the American * Statistical Association, Vol. 69, No. 348 (Dec., 1974), pp. 859-866.
*
- * Returns Double.NaN
if the dataset is empty.
+ * Returns Double.NaN
if the dataset is empty. Note that
+ * Double.NaN may also be returned if the input includes NaN and / or infinite
+ * values.
*
* Returns Double.NaN
if no data values have been added and
- * returns 0
if there is just one value in the data set.
0
if there is just one value in the data set.
+ * Note that Double.NaN may also be returned if the input includes NaN
+ * and / or infinite values.
*
* Note that this implementation is not synchronized. If
* multiple threads access an instance of this class concurrently, and at least
diff --git a/src/main/java/org/apache/commons/math3/stat/descriptive/moment/Variance.java b/src/main/java/org/apache/commons/math3/stat/descriptive/moment/Variance.java
index c5435a835..1ba48e954 100644
--- a/src/main/java/org/apache/commons/math3/stat/descriptive/moment/Variance.java
+++ b/src/main/java/org/apache/commons/math3/stat/descriptive/moment/Variance.java
@@ -234,7 +234,8 @@ public class Variance extends AbstractStorelessUnivariateStatistic implements Se
/**
* Returns the variance of the entries in the specified portion of
* the input array, or Double.NaN
if the designated subarray
- * is empty.
+ * is empty. Note that Double.NaN may also be returned if the input
+ * includes NaN and / or infinite values.
*
* See {@link Variance} for details on the computing algorithm.
*