% -*- texinfo -*- % @deftypefn {Function File} {[@var{pval}, @var{chisq}, @var{df}] =} chisquare_test_homogeneity (@var{x}, @var{y}, @var{c}) % Given two samples @var{x} and @var{y}, perform a chisquare test for % homogeneity of the null hypothesis that @var{x} and @var{y} come from % the same distribution, based on the partition induced by the % (strictly increasing) entries of @var{c}. % % For large samples, the test statistic @var{chisq} approximately follows a % chisquare distribution with @var{df} = @code{length (@var{c})} % degrees of freedom. % % The p-value (1 minus the CDF of this distribution at @var{chisq}) is % returned in @var{pval}. % % If no output argument is given, the p-value is displayed. % @end deftypefn