Synopsis Chi-square test on data values.
Function -
num chiSquareTest(lrel[num expected, int observed] values)
-
bool chiSquareTest(lrel[num expected, int observed] values, real alpha)
Usage import analysis::statistics::Inference;
Description Perform a
Chi-square test
comparing
expected and observed frequency counts. There are two forms of this test:
- Returns the observed significance level, or p-value, associated with a Chi-square goodness of fit test comparing observed frequency counts to expected counts.
- Performs a Chi-square goodness of fit test evaluating the null hypothesis that the observed counts conform to the frequency distribution described by the expected counts, with significance level
alpha
(0 < alpha
< 0.5). Returns true iff the null hypothesis can be rejected with confidence 1 - alpha
.