Uploaded image for project: 'Commons Statistics'
  1. Commons Statistics
  2. STATISTICS-62

Port o.a.c.math.stat.inference to a commons-statistics-inference module

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Implemented
    • 1.0
    • 1.1
    • inference
    • None
    • Easy

    Description

      The o.a.c.math4.legacy.stat.inference package contains:

       

      AlternativeHypothesis.java
      BinomialTest.java
      ChiSquareTest.java
      GTest.java
      InferenceTestUtils.java
      KolmogorovSmirnovTest.java
      MannWhitneyUTest.java
      OneWayAnova.java
      TTest.java
      WilcoxonSignedRankTest.java

      The are few dependencies on other math packages. The notable exceptions are:

       

      1. KolmogorovSmirnovTest which requires matrix support. This is for multiplication of a square matrix to support a matrix power function. This uses a double matrix and the same code is duplicated for a BigFraction matrix. Such code can be ported internally to support only the required functions. It can also drop the defensive copy strategy used by Commons Math in matrices to allow multiply in-place where appropriate for performance gains.

      2. OneWayAnova which collates the sum, sum of squares and count using SummaryStatistics. This can be done using an internal class. It is possible to call the test method using already computed SummaryStatistics. The method that does this using the SummaryStatistics as part of the API can be dropped, or supported using an interface that returns: getSum, getSumOfSquares, getN.

      All the inference Test classes have instance methods but no state. The InferenceTestUtils is a static class that holds references to a singleton for each class and provides static methods to pass through the underlying instances.

      I suggest changing the test classes to have only static methods and dropping InferenceTestUtils.

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              aherbert Alex Herbert
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: