Skip to content

chisq_test

Chi-squared test of independence p-value.

v = chisq_test(actual_range, expected_range)

Returns the p-value of the chi-squared test for whether actual_range differs from expected_range. The test statistic is sum((O-E)^2 / E); the p-value comes from the chi-squared distribution with appropriate degrees of freedom.

chisq_test([58 11 10 12 9], [45 19 11 14 11])
  • chisq_dist — Chi-squared left-tail PDF or CDF.
  • t_test — Student’s t-test p-value.
  • f_test — F-test for equal variances (two-tailed p-value).