Pearson Chi-squared test of independence
Version 1.0.0 (1.09 KB) by
Ryan Ward
Pearson Chi-Square Test for Independence: calculates the chi-square, p-value and the test decision,
Example;
x = [61, 54, 32, 26, 47, 39, 13, 26, 12, 59; 7, 14, 36, 42, 21, 29, 55, 42, 56, 9];
[h, chi, p] = chi2ind(x, 0.05)
h =
logical
1
chi =
173.0768
p =
0
Cite As
Ryan Ward (2026). Pearson Chi-squared test of independence (https://www.mathworks.com/matlabcentral/fileexchange/78339-pearson-chi-squared-test-of-independence), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2018a
Compatible with R2018b and later releases
Platform Compatibility
Windows macOS LinuxTags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0 |
