Chi-square test - contingency tables

This function performs the chi-square test for 2x2 contingency tables
2.8K 次下载
更新时间 2008/2/11

查看许可证

CHISQUARECONT takes as input a 2x2 matrix that represents a 2x2 contingency table and
calculates the probability of obtaining the observed and each of the more extreme tables
based on the pearson chi square test which is based on the chi square distribution. The
chi square test might become unreliable when the total number of expected frequencies
(cell values in the contingency table) are not large enough (the total is smaller than
20 or a cell contains a value lower than 5). In such cases, the Fisher exact test should
be used instead.

Usage : p = chisquarecont(contab)
[p,x2] = chisquarecont(contab)

Input : contab -> a 2x2 contigency table created from the frequency data
Output : p -> The p-value of the test (the probability of obtaining the observed
and each of the more extreme tables)
x2 -> The value for the chi square statistic

For an example, see help inside the file.

引用格式

Panagiotis Moulos (2024). Chi-square test - contingency tables (https://www.mathworks.com/matlabcentral/fileexchange/18705-chi-square-test-contingency-tables), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R14SP3
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Hypothesis Tests 的更多信息
致谢

启发作品: chi2cont

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.0.0