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/01/26 20:04:21 UTC

[commons-statistics] 06/06: Add sample size = 0 test case

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 c636dabf82c8763c1fe60fcb4afa2b8fe7045994
Author: Alex Herbert <ah...@apache.org>
AuthorDate: Wed Jan 26 19:41:25 2022 +0000

    Add sample size = 0 test case
---
 .../distribution/test.hypergeometric.5.properties  | 28 ++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/commons-statistics-distribution/src/test/resources/org/apache/commons/statistics/distribution/test.hypergeometric.5.properties b/commons-statistics-distribution/src/test/resources/org/apache/commons/statistics/distribution/test.hypergeometric.5.properties
new file mode 100644
index 0000000..c8a24df
--- /dev/null
+++ b/commons-statistics-distribution/src/test/resources/org/apache/commons/statistics/distribution/test.hypergeometric.5.properties
@@ -0,0 +1,28 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Verify that if sampleSize = 0, mass is concentrated on 0.
+parameters = 5, 3, 0
+mean = 0
+variance = 0
+lower = 0
+upper = 0
+cdf.points = -1, 0, 1, 3, 10
+cdf.values = 0, 1, 1, 1, 1
+pmf.values = 0, 1, 0, 0, 0
+icdf.points = 0.1, 0.5
+icdf.values = 0, 0
+isf.points = 0.9, 0.5
+isf.values = 0, 0