Cramer's V Calculator
📐 計算公式
Cramér's V(2×2 列聯表特例):期望頻數 E_ij = 行合計×列合計 ÷ 總數 n,χ² = Σ(觀測−期望)² ÷ 期望(四格求和),V = √(χ² ÷ n)(2×2 時 min(r−1,c−1)=1),且 V = |φ|:有符號 φ = (ad−bc) ÷ √[(a+b)(c+d)(a+c)(b+d)],其正負由行/列編碼約定決定,V 只保留強度、不帶方向。校驗:a、b、c、d 四項須為非負整數;出現負值、小數或行/列合計為 0 時停算並清空結果、圖表與明細。判據:無固定分級,V 取值 0~1、越接近 1 關聯越強。
Cramér's V 由卡方統計量 χ² 除以樣本量與最小維度約束後開方,把關聯強度標準化到 0–1。2×2 表中 V=|φ|;φ 可隨行列編碼為負,V 恆非負。例:a=40,b=60,c=20,d=80 時 φ≈+0.2182、V≈0.2182;交換兩列(a=60,b=40,c=80,d=20)後 φ≈−0.2182,V 仍≈0.2182。本工具只接受 2×2 四格頻數;r×c 大表、貼上原始交叉表或僅憑 χ²/n 摘要反算均不在支援範圍內,請改用支援任意維度的統計軟體。
Only 2×2 tables are supported: enter four integer cell counts to compute chi-square and Cramer's V; r×c tables are not supported.
Formula & Standard References
| Item | Formula / Note | Source / Standard |
|---|---|---|
| Pearson chi-square statistic | chi-square = sum (O - E)^2 / E | Pearson K. (1900), On the criterion that a given system of deviations... |
| Cramer's V | V = sqrt( chi-square / (n · min(r-1, c-1)) ) | Cramer H., Mathematical Methods of Statistics (1946), Princeton Univ. Press |
| Degrees of freedom | df = (r-1)(c-1), where r = rows and c = columns | Cramer H., Mathematical Methods of Statistics (1946) |
| Effect size benchmarks | 0.1 small / 0.3 medium / 0.5 large; for a 2x2 table V = |phi| (phi is signed, V is not) | Cohen J., Statistical Power Analysis for the Behavioral Sciences (1988) |
📌 計算說明
- 2×2 時 min(r−1,c−1)=1,且 V = |φ|;φ 的符號取決於行列編碼。
- V∈[0,1],越大關聯越強;交換列順序 V 不變、φ 反號。