Chi-square tests for Contingency tables of Quantitative data

Tests for the independence of Quantitative data organized in Contingency tables and Simulation for checking their Chi-square distribution
2 Downloads
Updated 3 Nov 2025

View License

Simple functions for a well-known problem: the Statistical test for the independence of quantitative data organized in contingency tables of order (number of rows "h" and columns "k") to be specified. Chi1.m provides the Pearson statistic, its P-value and the Cramèr index for quantitative data supplied by the user.
Chi2.m provides simulation experiments for testing the Chi-Square distribution, with d=((h-1)*(k-1)) degrees of freedom, of the Pearson statistic for simulated independent standard normal data, and the Kernel density of the Cramer index. Simple modification of the code allows to check the same results for other generated random data.

Cite As

Carlo Grillenzoni (2025). Chi-square tests for Contingency tables of Quantitative data (https://se.mathworks.com/matlabcentral/fileexchange/182463-chi-square-tests-for-contingency-tables-of-quantitative-data), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2025b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0