依變項和獨變項都是名義尺度
id |
choice_1 |
choice_2 |
---|---|---|
“subj1” | “spades” | “clubs” |
“subj2” | “diamonds” | “clubs” |
“subj3” | “hearts” | “clubs” |
“subj4” | “spades” | “clubs” |
“subj5” | “hearts” | “spades” |
\(\chi^2 = \sum( (O_i - E_i)^2 / E_i ) = 8.44\)
df = 4 - 1 = 3
p = 0.04
\(\alpha\) | .05 | .01 |
---|---|---|
臨界值 | 7.81 | 11.34 |
兩類受測者回答各選項的人數比例是否相等?
疑似機器人 | 疑似人類 | Total | |
---|---|---|---|
小狗 | \(E_{11}=\frac{R_1 \times C_1}{N}\) | \(E_{12}=\frac{R_1 \times C_2}{N}\) | \(R_1\) |
小花 | \(E_{21}=\frac{R_2 \times C_1}{N}\) | \(E_{22}=\frac{R_2 \times C_2}{N}\) | \(R_2\) |
數據 | \(E_{31}=\frac{R_3 \times C_1}{N}\) | \(E_{32}=\frac{R_3 \times C_2}{N}\) | \(R_3\) |
Total | \(C_1\) | \(C_2\) | N |
疑似機器人 | 疑似人類 | ||
---|---|---|---|
小狗 | O | 13 | 15 |
E | 13.53 | 14.47 | |
小花 | 30 | 13 | 43 |
E | 28.78 | 22.22 | |
數據 | 44 | 65 | 109 |
E | 52.68 | 56.32 | |
Total | 87 | 93 | 180 |
E | 87.00 | 93.00 |
\(\chi^2=\sum_{i=1}^{r}\sum_{j=1}^{c} \frac{(E_{ij}-O_{ij})^2}{E_{ij}}\)
\(\chi^2 = \sum_{i=1}^{r}\sum_{j=1}^{c} \frac{(E_{ij}-O_{ij})^2}{E_{ij}} = 10.72\)
df = (3 - 1)(2 - 1) = 2
p = 0.005
\(\alpha\) | .05 | .01 |
---|---|---|
臨界值 | 5.99 | 9.21 |