Carrying Out a Two-Way Chi-Square Test
แนะนำใหม่
7:48
การอนุมานสำหรับข้อมูลเชิงประเภtsy: Chi-Square
โยนลูกเต๋าที่ยุติธรรม 60 ครั้ง ทุกด้านควรออก 10 ครั้ง แต่ไม่ได้เป็นเช่นนั้น — บางด้านออก 8 ครั้ง บางด้านออก 13 ครั้ง ความแตกต่างเหล่านี้มีอยู่เสมอ ดังนั้นลองโยนอีก...
บรรยายภาษาอังกฤษ · สลับคำบรรยายภาษาอังกฤษและภาษาจีนได้
ในบทเรียนนี้
| English | ความหมาย |
|---|---|
| independent random samples | |
| chi-square test for a two-way table | |
| variable/ˈveərɪəbl/ | A characteristic recorded for each individual, such as height or eye colour. |
| test for homogeneity/test fɔː ˈhɒməʊdʒneɪti/ | A chi-square test of whether several populations share one distribution. |
| distribution/ˌdɪstrɪˈbjuːʃn/ | The pattern of values or outcomes and their frequencies or probabilities. |
| population/ˌpɒpjʊˈleɪʃn/ | The entire set of individuals, items or outcomes about which a statistical study seeks information. |
| test for independence/test fɔː ˌɪndɪˈpendəns/ | A chi-square test of whether two variables are associated in one population. |
| association/əˌsəʊsɪˈeɪʃn/ | A relationship between two variables. |
| expected counts/ekˈspektɪd kaʊnts/ | |
| hypotheses | |
| Large counts | |
| cells/selz/ | |
| p-value/piː ˈvæljuː/ | |
| categories | |
| right-tail area |
คำนวณสถิติ
- สถิติ chi-square เป็นผลบวกเดียวกัน Across ทุกเซลล์ ของตาราง:
-
$$\chi^2 = \sum \frac{(\text{observed} - \text{expected})^2}{\text{expected}}$$
- ใช้จำนวนที่สังเกตของแต่ละเซลล์และจำนวนที่คาดหวังจาก 8.4
- บวกทุกพจน์ของเซลล์เข้าด้วยกันเป็น $\chi^2$

หาค่า p-value
- ใช้การแจกแจง chi-square กับ $df = (\text{rows}-1)(\text{columns}-1)$
- p-value คือพื้นที่ หางขวา เกิน $\chi^2$ ของคุณ
- ค่า $\chi^2$ ที่ใหญ่ → ค่า p ต่ำ → หลักฐานที่แข็งแกร่งต่อต้าน $H_0$
- ได้ $df$ ที่ถูกต้องจากรูปร่างของตาราง, ไม่ใช่ขนาดตัวอย่าง

การแจกแจงค่าχ²: ค่า p คือส่วนหางด้านขวาที่เกินกว่าสถิติทดสอบ
A school surveys one random sample of 300 students and records each student's year group and favourite sport. Which test fits?
ความยาก 1/5 · 100 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
One sample with two categorical variables per student → independence. Separate samples from each year group would be homogeneity.
การ์ดนี้ได้รับการแก้ไขแล้ว จึงแสดงเป็นภาษาอังกฤษจนกว่าคำแปลจะได้รับการอัปเดต
Worked test: State and Plan
State. $H_0$: the distribution of main news source is the same for adults under 40 and adults aged 40 or older in this city. $H_a$: the distributions differ. $\alpha=0.05$.
Plan. Chi-square test for homogeneity.
- Random: independent random samples from each age group.
- 10%: Assume each age group in the city has at least 1,000 adults, so 100 is no more than 10% of each group.
- Large counts 大频数条件: expected count $=\dfrac{\text{row total}\times\text{column total}}{\text{table total}}$. Each row total is 100, so the expected counts are $\frac{100\times60}{200}=30$, $\frac{100\times115}{200}=57.5$, $\frac{100\times25}{200}=12.5$ in each row; all at least 5.
In a two-way table with total 400, a row total is 160 and a column total is 90. Find the expected count for that cell.
ความยาก 2/5 · 140 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
(row total × column total) ÷ table total = 160 × 90 ÷ 400 = 36.
สรุปในบริบท
- สำหรับ ความสม่ำเสมอ: "หลักฐานน่าเชื่อถือว่าการแจกแจงแตกต่างกัน Across กลุ่ม" (ถ้าปฏิเสธ)
- สำหรับ ความเป็นอิสระ: "หลักฐานน่าเชื่อถือว่าตัวแปรสองตัวเกี่ยวข้องกัน" (ถ้าปฏิเสธ)
- ชื่อตัวแปร/กลุ่มและบริบทจริง
- การไม่ปฏิเสธสมมติฐานศูนย์ไม่เคยพิสูจน์ได้ว่ากลุ่มมีค่าเท่ากันหรือตัวแปรเป็นอิสระต่อกัน
With χ² = 6.0 at df = 1, the p-value ≈ 0.014. At α = 0.05, the decision is...
ความยาก 1/5 · 100 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
0.014 ≤ 0.05 → reject H0.
The p-value for a two-way chi-square test is a right-tail area.
ความยาก 1/5 · 100 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
Chi-square is always right-tailed.
For a 3×4 two-way table, find the degrees of freedom (r−1)(c−1).
ความยาก 2/5 · 140 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
(3−1)(4−1) = 2×3 = 6.
เขียนสรุปผลให้สอดคล้องกับการทดสอบ ปฏิเสธใน homogeneity → การกระจายของกลุ่มแตกต่างกัน; ปฏิเสธใน independence → ตัวแปรมีความสัมพันธ์กัน อย่าพูดว่า "ตัวแปรมีความสัมพันธ์" สำหรับ homogeneity หรือพูดว่า "กลุ่มแตกต่างกัน" สำหรับ independence — แม้คณิตศาสตร์จะคล้ายกันแต่ ข้ออ้าง ไม่เหมือนกัน
In the news-source test, which statement best describes the difference between the age groups?
ความยาก 1/5 · 100 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
The TV cells give the largest terms (3.33 each). Observational data show a difference, not a cause.
การทดสอบ $2\times2$ independence ให้ $\chi^2 = 6.0$, $df = 1$, $\alpha = 0.05$
- p-value: พื้นที่ด้านขวา beyond $6.0$ ที่ $df=1 \approx 0.014$
- ตัดสินใจ: $0.014 \le 0.05$ → ปฏิเสธ $H_0$
- สรุป: มีหลักฐานที่ชัดเจนว่าตัวแปรทั้งสองมีความสัมพันธ์กัน (ในบริบท)
Rejecting H0 in a test of INDEPENDENCE means...
ความยาก 1/5 · 100 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
Independence: reject → the variables are associated.
Rejecting H0 in a test of HOMOGENEITY means...
ความยาก 1/5 · 100 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
Homogeneity: reject → the group distributions differ.
A chi-square test for independence of "owns a pet" and "exercises daily" in a random sample of adults gives p = 0.31 (α = 0.05). Write the conclusion.
A large p-value means weak evidence, not proof of independence.
คำนวณ $\chi^2 = \sum \frac{(\text{observed}-\text{expected})^2}{\text{expected}}$ ทั่วทุกเซลล์ หาค่า p-value ด้านขวา ที่ $df = (\text{rows}-1)(\text{columns}-1)$ และเปรียบเทียบกับ $\alpha$ เขียน สรุปผล ให้สอดคล้องกับแบบแผน: การกระจายแตกต่างกัน (homogeneity) หรือ ตัวแปรมีความสัมพันธ์กัน (independence), ในบริบท
เขียนจาก 4 องศาอิสระ
- การทดสอบค่าχ² ใช้ตารางขนาด 3 × 3
- สถิติบทเรียน 6 เป็นค่าchi-square ที่คำนวณได้ ไม่ใช่ องศาอิสระของตารางนี้
การ์ดนี้เป็นการ์ดใหม่ จึงแสดงเป็นภาษาอังกฤษจนกว่าคำแปลจะพร้อม
- The design decides the test, not the table. The same table could come from one sample (independence) or several samples (homogeneity).
- df uses rows and columns of categories 类别, not the totals row or column: a $2\times3$ table has $df=2$.
- Expected counts are usually not whole numbers (57.5 is fine). Never round them to make the check pass.
การ์ดนี้เป็นการ์ดใหม่ จึงแสดงเป็นภาษาอังกฤษจนกว่าคำแปลจะพร้อม
A two-way chi-square test compares observed and expected counts in every cell: $\chi^2=\sum\frac{(\text{O}-\text{E})^2}{\text{E}}$, with $\text{E}=\frac{\text{row total}\times\text{column total}}{\text{table total}}$ and $df=(r-1)(c-1)$; the p-value is the right-tail area 右尾面积. Several samples → homogeneity (distributions differ?); one sample, two variables → independence (association?). Conclude in context and use the largest terms to say where the difference lies.
เกิดปัญหาอะไรขึ้น? เฉพาะทีมเว็บไซต์เท่านั้นที่เห็นข้อมูลนี้