Class StatisticalTests

java.lang.Object
org.episteme.core.mathematics.statistics.StatisticalTests

public class StatisticalTests extends Object
Advanced statistical methods and tests.

Hypothesis testing, correlation, regression.

Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Constructor Details

    • StatisticalTests

      public StatisticalTests()
  • Method Details

    • pearsonCorrelation

      public static Real pearsonCorrelation(List<Real> x, List<Real> y)
      Pearson correlation coefficient: measures linear relationship [-1, 1].
    • linearRegression

      public static Real[] linearRegression(List<Real> x, List<Real> y)
      Linear regression: y = a + bx. Returns [intercept, slope].
    • rSquared

      public static Real rSquared(List<Real> x, List<Real> y)
      Coefficient of determination R²: proportion of variance explained.
    • tTest

      public static Real tTest(List<Real> sample1, List<Real> sample2)
      Student's t-test for independent samples. Returns t-statistic.
    • chiSquaredTest

      public static Real chiSquaredTest(List<Real> observed, List<Real> expected)
      Chi-squared test for goodness of fit. Returns chi-squared statistic.
    • covariance

      public static Real covariance(List<Real> x, List<Real> y)
      Covariance between two datasets.
    • standardDeviation

      public static Real standardDeviation(List<Real> data)
      Standard deviation.
    • oneWayAnova

      public static Real oneWayAnova(List<List<Real>> groups)
      One-Way Analysis of Variance (ANOVA). Returns the F-statistic.
      Parameters:
      groups - list of sample groups
      Returns:
      F-statistic