Skip to main content
QUICK REVIEW

[Paper Review] JavaNPST: Nonparametric Statistical Tests in Java

J. Derrac, S. Martí-García|arXiv (Cornell University)|Jan 17, 2015
Evolutionary Algorithms and ApplicationsComputer Science17 references4 citations
TL;DR

JavaNPST is an open-source Java library implementing 40 nonparametric statistical tests across 10 problem families, enabling seamless integration into Java applications for hypothesis testing without parametric assumptions. It provides a uniform, easy-to-use API with accurate p-values and test statistics, validated against established results and applicable in domains like credit scoring and statistical education.

ABSTRACT

Nonparametric statistical tests are useful procedures that can be applied in a wide range of situations, such as testing randomness or goodness of fit, one-sample, two-sample and multiple-sample analysis, association between bivariate samples or count data analysis. Their use is often preferred to parametric tests due to the fact that they require less restrictive assumptions about the population sampled. In this work, JavaNPST, an open source Java library implementing 40 nonparametric statistical tests, is presented. It can be helpful for programmers and practitioners interested in performing nonparametric statistical analyses, providing a quick and easy way of running these tests directly within any Java code. Some examples of use are also shown, highlighting some of the more remarkable capabilities of the library.

Motivation & Objective

  • To address the lack of a comprehensive, integrated, and open-source Java library implementing a wide range of nonparametric statistical tests.
  • To provide practitioners and developers with a ready-to-use, platform-independent solution for performing nonparametric tests directly within Java-based software projects.
  • To support diverse application domains such as credit scoring, statistical education, and data analysis by offering accurate, standardized test implementations.
  • To enable integration with other tools (e.g., R via rJava) and support incremental extension for future test additions.
  • To offer a consistent, homogeneous API across all 40 tests, simplifying adoption and reducing the need to interface with external statistical software suites.

Proposed method

  • The library implements 40 nonparametric tests organized into 10 families, each targeting a distinct class of statistical problems (e.g., randomness, goodness-of-fit, location/scale comparisons).
  • A uniform public interface is used across all tests, allowing consistent setup, execution, and result retrieval (including test statistics and exact p-values).
  • The library leverages exact distributions for test statistics where possible (e.g., exact p-values for Wilcoxon signed-rank and Sign tests), minimizing reliance on asymptotic approximations.
  • It supports integration into any Java application via standard JVM environments and enables embedding within larger computational workflows, such as optimization loops in credit scoring.
  • The design allows for extensibility, with reusable data structures and distribution components that simplify the addition of new nonparametric tests.
  • The library was validated by reproducing published p-values from benchmark studies (e.g., Sign test: p = 0.0066; Wilcoxon test: p = 0.0718), confirming accuracy.

Experimental results

Research questions

  • RQ1Can a single, open-source Java library effectively implement a comprehensive suite of nonparametric statistical tests with consistent usability?
  • RQ2How accurately can the library reproduce established p-values and test statistics compared to reference implementations?
  • RQ3To what extent can the library be integrated into real-world applications, such as credit scoring systems, without external data transfer or software migration?
  • RQ4Can the library serve as a reliable educational tool for teaching nonparametric inference in introductory statistics courses?
  • RQ5How extensible is the library’s architecture for adding new nonparametric tests in the future?

Key findings

  • JavaNPST successfully implements 40 nonparametric statistical tests across 10 distinct problem families, covering a broad range of inferential needs.
  • The library accurately reproduces benchmark p-values: for the Sign test, it reports p = 0.0066, matching the reference result exactly; for the Wilcoxon signed-rank test, it reports p = 0.0718, closely aligning with the reference.
  • The Kolmogorov-Smirnov Two-Sample test in JavaNPST was successfully applied in a credit scoring optimization pipeline, where it measured the KS statistic (Dn) and p-value to evaluate model discrimination performance.
  • The library enables seamless integration into larger software workflows, such as iterative model search processes, by allowing partial test results to be used within the same Java application without external data export.
  • The homogeneous API and modular design allow for straightforward extension, supporting future inclusion of new nonparametric tests with minimal implementation overhead.
  • The library is compatible with cross-language environments (e.g., via rJava), enhancing accessibility for users working in R or other ecosystems.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.