liarsdice::statistics::HypothesisTest class

Statistical hypothesis testing utilities.

Public static functions

static auto kolmogorov_smirnov_test(const std::vector<double>& data, const IProbabilityDistribution& dist) -> std::pair<double, double>
Perform Kolmogorov-Smirnov test.
static auto chi_square_test(const std::vector<double>& observed, const std::vector<double>& expected) -> std::pair<double, int>
Chi-square goodness of fit test.

Function documentation

static std::pair<double, double> liarsdice::statistics::HypothesisTest::kolmogorov_smirnov_test(const std::vector<double>& data, const IProbabilityDistribution& dist)

Perform Kolmogorov-Smirnov test.

Parameters
data Sample data
dist Distribution to test against
Returns Pair of (test_statistic, p_value)

static std::pair<double, int> liarsdice::statistics::HypothesisTest::chi_square_test(const std::vector<double>& observed, const std::vector<double>& expected)

Chi-square goodness of fit test.

Parameters
observed Observed frequencies
expected Expected frequencies
Returns Pair of (chi_square_statistic, degrees_of_freedom)