χ² 卡方检验计算器(列联表独立性)Chi-Square Test Calculator (Contingency Table)
输入任意 r×c 列联表的观察频数,计算 Pearson 卡方统计量、自由度、P 值和期望频数,判断两个分类变量是否独立;2×2 表可选 Yates 连续性校正。Run a Pearson chi-square test of independence on any r × c table of observed counts: get χ², degrees of freedom, the p-value and the expected counts, with an optional Yates correction for 2 × 2 tables.
使用说明与常见问题How-to & FAQ
「卡方检验计算器(列联表独立性)」是什么?What is the Chi-Square Test Calculator (Contingency Table) tool?
输入任意 r×c 列联表的观察频数,计算 Pearson 卡方统计量、自由度、P 值和期望频数,判断两个分类变量是否独立;2×2 表可选 Yates 连续性校正。Run a Pearson chi-square test of independence on any r × c table of observed counts: get χ², degrees of freedom, the p-value and the expected counts, with an optional Yates correction for 2 × 2 tables.
如何使用「卡方检验计算器(列联表独立性)」?How do I use the Chi-Square Test Calculator (Contingency Table) tool?
在「卡方检验计算器(列联表独立性)」中,填写「显著性水平 α」等参数,结果会随输入实时计算并显示在下方。In the Chi-Square Test Calculator (Contingency Table): Fill in "Significance level α"; results are recalculated instantly as you type.
卡方统计量怎么算?How is χ² calculated?
每个格子的期望频数 E = 行合计 × 列合计 ÷ 总数,χ² = Σ (O − E)² ÷ E,自由度 = (行数 − 1) × (列数 − 1),P 值由卡方分布右尾得到。Each expected count is E = row total × column total ÷ grand total; χ² = Σ (O − E)² ÷ E with df = (rows − 1) × (columns − 1), and the p-value is the right tail of the chi-square distribution.
什么时候用 Yates 校正?When should I use the Yates correction?
Yates 连续性校正只用于 2×2 表,每格 |O − E| 先减 0.5,结果更保守。样本较小时有人使用,但很多统计学家更推荐 Fisher 精确检验。The Yates continuity correction applies only to 2 × 2 tables: 0.5 is subtracted from each |O − E|, giving a more conservative result. It is sometimes used with small samples, though many statisticians prefer Fisher's exact test.
Cramér's V 是什么?What is Cramér's V?
衡量关联强度的指标,取值 0–1:V = √(χ² ÷ (N × min(r−1, c−1)))。常用的经验标准(Cohen 1988,适用于 min(r−1, c−1) = 1 的表)是约 0.1 为弱、0.3 为中、0.5 以上为强关联;行列更多时对应的门槛更低。A 0–1 measure of association strength: V = √(χ² ÷ (N × min(r−1, c−1))). A common rule of thumb (Cohen, 1988, for tables with min(r−1, c−1) = 1) is about 0.1 weak, 0.3 moderate and 0.5+ strong; the cut-offs are lower for larger tables.
计算精度如何?How precise are the results?
「卡方检验计算器(列联表独立性)」使用 JavaScript 双精度浮点数(约 15–16 位有效数字);极大或极小的数值可能存在精度误差。The Chi-Square Test Calculator (Contingency Table) uses double-precision floating point (about 15–16 significant digits); very large or very small values may lose precision.
「卡方检验计算器(列联表独立性)」免费吗?需要注册吗?Is the Chi-Square Test Calculator (Contingency Table) free? Do I need an account?
「卡方检验计算器(列联表独立性)」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The Chi-Square Test Calculator (Contingency Table) is completely free with no sign-up or install and works on phones and desktops; what you enter is processed only in your browser.