Navigation
Synopsis Chi-square test on data values.
Function
  1. num chiSquareTest(lrel[num expected, int observed] values)
  2. 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:
  1. Returns the observed significance level, or p-value, associated with a Chi-square goodness of fit test comparing observed frequency counts to expected counts.
  2. 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.
Is this page unclear, or have you spotted an error? Please add a comment below and help us to improve it. For all other questions and remarks, visit ask.rascal-mpl.org.