CHI2TEST2

H = CHI2TEST2(X) performs a chi-squared two-sample test of the
similarity of two samples, under the null hypothesis that two samples
come from the same (non-specified) distribution.

X1 and X2 are two vectors containing discrete (categorical) data.
CHI2TEST2 treats all unique values as separate 'bins' for testing
purposes. X1 and X2 can be different lengths. CHI2TEST2 treats NaNs as
missing values, and ignores them.

H = TTEST(...,ALPHA) performs the test at the significance level
(100*ALPHA)%. ALPHA must be a scalar. Default value of ALPHA is 0.05.
i.e., H = 1 suggests different distributions.

[H,P] = TTEST(...) returns the p-value, i.e., the probability of
observing the given result, or one more extreme, by chance if the null
hypothesis is true. Small values of P cast doubt on the validity of
the null hypothesis (i.e. suggests different distributions).