Stats chi2contingencyresult equals - CyrilB1531/lodestar GitHub Wiki

Development build. This page describes main, not a released package. The latest published Lodestar.Stats is 0.4.0 — read its documentation.

HomeStatsHypothesis tests

Chi2ContingencyResult.Equals

Compares the scalars and the expected table, row by row.

public bool Equals(Chi2ContingencyResult other)

Parametersother is the result to compare against, or null.

Returnstrue when the statistic, p-value and degrees of freedom match and both expected tables hold the same frequencies.

Example — the same result, reached twice.

using Lodestar.Stats;

Chi2ContingencyResult left = new(1.5, 0.2, 1, [1.0, 2.0], [3.0, 4.0](/CyrilB1531/lodestar/wiki/1.0,-2.0],-[3.0,-4.0));
Chi2ContingencyResult right = new(1.5, 0.2, 1, [1.0, 2.0], [3.0, 4.0](/CyrilB1531/lodestar/wiki/1.0,-2.0],-[3.0,-4.0));

bool same = left == right;  // => True

Remarks — the comparison descends into each row rather than stopping at the row count, which is what a table differing inside one row needs. the equality rule has the rule.

Applies to — net10.0, netstandard2.0.

See alsoChi2ContingencyResult.GetHashCode, Chi2ContingencyResult.