javai-R

The statistical oracle for the javai project family — R-generated reference datasets that verify conformance across all framework implementations.

javai-R is the statistical oracle for the javai project family. It uses R — the gold standard for statistical computing — to generate language-agnostic reference datasets against which all javai framework implementations verify their statistics engines.

Why it exists

The javai family includes multiple independent implementations of the same statistical methodology: punit (Java), feotest (Rust), and future frameworks in other languages. Each implements Wilson score confidence intervals, threshold derivation, power analysis, feasibility checking, and verdict evaluation independently, in its own language and idiom.

javai-R provides the shared truth. If your implementation produces results that match the R-generated reference data within stated tolerances, it conforms. No need to trust a Java or Rust implementation — the expected outputs come from R’s well-vetted statistical functions.

What it covers

SuiteCovers
Wilson CITwo-sided Wilson score confidence intervals
Wilson lower boundOne-sided Wilson score lower bound
Threshold derivationSample-size-first and threshold-first approaches
Power analysisSample size calculation via power analysis
FeasibilityVerification feasibility checking
Verdict evaluationPass/fail determination with z-test statistics

Each suite is published as a JSON file containing test cases with inputs, expected outputs, and a tolerance for floating-point comparison. Framework conformance tests read these files and assert that every computation matches.

The Statistical Companion

javai-R hosts the Statistical Companion — the formal mathematical foundation for the entire javai methodology. This document provides a rigorous treatment of the hypothesis testing, confidence intervals, power analysis, and threshold derivation methods that all javai frameworks implement.

It also hosts the Distributional Contracts paper, which extends Bertrand Meyer’s Design by Contract to stochastic systems by lifting postconditions from Boolean predicates to statistical assertions.

Designed to grow

javai-R is structured as a proper R package, versioned and installable. Its current focus is statistics engine conformance, but it is designed to expand into design of experiments (DoE) reference data as the javai family’s capabilities grow.

Repository

Browse the source, reference datasets, and documentation on GitHub.

The companion javai-R site hosts the rendered Statistical Companion and Distributional Contracts papers.