Navigation

Operators and Keywords

Function List:

C++ API

: [pval, chisq, df] = chisquare_test_homogeneity (x, y, c)

Given two samples x and y, perform a chisquare test for homogeneity of the null hypothesis that x and y come from the same distribution, based on the partition induced by the (strictly increasing) entries of c.

For large samples, the test statistic chisq approximately follows a chisquare distribution with df = length (c) degrees of freedom.

The p-value (1 minus the CDF of this distribution at chisq) is returned in pval.

If no output argument is given, the p-value is displayed.

Package: octave