Carrying Out a Two-Way Chi-Square Test
Đã giới thiệu
7:48
Suy luận cho Dữ liệu Phân loại: Chi-Square
Lăn xúc xắc công bằng sáu mươi lần. Mỗi mặt nên xuất hiện mười lần. Nhưng nó chưa bao giờ làm như vậy — tám cái ở đây, mười ba cái ở đó. Những khoảng cách luôn tồn tại. Vì vậy hãy lăn thêm…
Thuyết minh tiếng Anh · Có thể chuyển đổi phụ đề tiếng Anh và tiếng Trung
Trong bài học này
| English | Ý nghĩa |
|---|---|
| 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 |
Tính thống kê
- Thống kê chi-bình phương là tổng trên mọi ô của bảng:
-
$$\chi^2 = \sum \frac{(\text{observed} - \text{expected})^2}{\text{expected}}$$
- Sử dụng số lượng quan sát được và số lượng kỳ vọng của từng ô từ 8.4.
- Add all the cell terms into one $\chi^2$.

Tìm p-value
- Use the chi-square distribution with $df = (\text{rows}-1)(\text{columns}-1)$.
- Giá trị p chính là diện tích đuôi bên phải vượt quá $\chi^2$ của bạn.
- A large $\chi^2$ → small p-value → strong evidence against $H_0$.
- Lấy đúng $df$ từ hình dạng bảng, không phải kích thước mẫu.

Phân phối chi-bình phương: giá trị p là đuôi phải vượt qua thống kê kiểm định
A school surveys one random sample of 300 students and records each student's year group and favourite sport. Which test fits?
Độ khó 1/5 · 100 xu + phần thưởng nhỏ khi hoàn thành lần đầu tiên hôm nay
One sample with two categorical variables per student → independence. Separate samples from each year group would be homogeneity.
Thẻ này đã được chỉnh sửa nên sẽ hiển thị bằng tiếng Anh cho đến khi bản dịch được cập nhật.
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.
Độ khó 2/5 · 140 xu + phần thưởng nhỏ khi hoàn thành lần đầu tiên hôm nay
(row total × column total) ÷ table total = 160 × 90 ÷ 400 = 36.
Kết luận trong bối cảnh
- Đối với tính đồng nhất: "có bằng chứng thuyết phục rằng các phân bố khác nhau giữa các nhóm" (nếu bác bỏ).
- Đối với tính độc lập: "có bằng chứng thuyết phục rằng hai biến có liên quan" (nếu bác bỏ).
- Name the variables/groups and the actual context.
- Không bác bỏ giả thuyết không bao giờ chứng minh các nhóm là giống nhau / các biến độc lập.
With χ² = 6.0 at df = 1, the p-value ≈ 0.014. At α = 0.05, the decision is...
Độ khó 1/5 · 100 xu + phần thưởng nhỏ khi hoàn thành lần đầu tiên hôm nay
0.014 ≤ 0.05 → reject H0.
The p-value for a two-way chi-square test is a right-tail area.
Độ khó 1/5 · 100 xu + phần thưởng nhỏ khi hoàn thành lần đầu tiên hôm nay
Chi-square is always right-tailed.
For a 3×4 two-way table, find the degrees of freedom (r−1)(c−1).
Độ khó 2/5 · 140 xu + phần thưởng nhỏ khi hoàn thành lần đầu tiên hôm nay
(3−1)(4−1) = 2×3 = 6.
Viết kết luận phù hợp với kiểm định. Bác bỏ trong kiểm định tính đồng nhất → phân phối nhóm khác nhau; bác bỏ trong kiểm định tính độc lập → các biến có liên quan. Đừng nói "các biến liên quan" cho thiết kế tính đồng nhất, hoặc "các nhóm khác nhau" cho thiết kế tính độc lập — toán học chung nhưng tuyên bố thì không.
In the news-source test, which statement best describes the difference between the age groups?
Độ khó 1/5 · 100 xu + phần thưởng nhỏ khi hoàn thành lần đầu tiên hôm nay
The TV cells give the largest terms (3.33 each). Observational data show a difference, not a cause.
Một $2\times2$ kiểm định tính độc lập đưa ra $\chi^2 = 6.0$, $df = 1$, $\alpha = 0.05$.
- p-value: diện tích đuôi phải vượt qua $6.0$ tại $df=1 \approx 0.014$.
- Quyết định: $0.014 \le 0.05$ → bác bỏ $H_0$.
- Kết luận: bằng chứng thuyết phục hai biến có liên quan (trong ngữ cảnh).
Rejecting H0 in a test of INDEPENDENCE means...
Độ khó 1/5 · 100 xu + phần thưởng nhỏ khi hoàn thành lần đầu tiên hôm nay
Independence: reject → the variables are associated.
Rejecting H0 in a test of HOMOGENEITY means...
Độ khó 1/5 · 100 xu + phần thưởng nhỏ khi hoàn thành lần đầu tiên hôm nay
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.
Tính $\chi^2 = \sum \frac{(\text{observed}-\text{expected})^2}{\text{expected}}$ trên tất cả ô, tìm p-value đuôi phải tại $df = (\text{rows}-1)(\text{columns}-1)$, và so sánh với $\alpha$. Viết kết luận phù hợp với thiết kế: phân phối khác nhau (tính đồng nhất) hoặc biến liên quan (tính độc lập), trong ngữ cảnh.
Viết từ 4 bậc tự do
- Một phép kiểm chi-bình phương sử dụng bảng kích thước 3 × 3.
- Thống kê bài học 6 là giá trị chi-bình phương đã tính toán, không phải bậc tự do của bảng này.
Đây là thẻ mới nên sẽ hiển thị bằng tiếng Anh cho đến khi bản dịch sẵn sàng.
- 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.
Đây là thẻ mới nên sẽ hiển thị bằng tiếng Anh cho đến khi bản dịch sẵn sàng.
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.
Đã xảy ra vấn đề gì? Chỉ đội ngũ trang web nhìn thấy thông tin này.