Carrying Out a Two-Way Chi-Square Test
مُقدَّم
7:48
الاستدلال للبيانات التصنيفية: كاي-تربيع
رمي نرد عادل ستين مرة. يجب أن يظهر كل وجه عشر مرات. لكن الأمر لا يحدث أبداً — ثمانية هنا، thirteen هناك. الفجوات موجودة دائماً. لذا رمِ مرة أخرى…
سرد باللغة الإنجليزية · ترجمة نصية بالإنجليزية و中文 يمكنك التبديل بينهما
في هذا الدرس
| 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^2 = \sum \frac{(\text{observed} - \text{expected})^2}{\text{expected}}$$
- استخدم كل خلية عدد مُلاحظ وعدد متوقع من 8.4.
- اجمع جميع حدود الخلايا في $\chi^2$ واحد.

إيجاد قيمة p
- استخدم توزيع كاي-تربيع مع $df = (\text{rows}-1)(\text{columns}-1)$.
- قيمة p هي مساحة الذيل الأيمن beyond $\chi^2$ الخاص بك.
- $\chi^2$ كبيرة → قيمة p صغيرة → دليل قوي ضد $H_0$.
- احصل على $df$ الصحيح من شكل الجدول، وليس حجم العينة.

توزيع كاي-تربيع: القيمة الاحتمالية (p-value) هي الذيل الأيمن الذي يتجاوز إحصاء الاختبار
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.
الاستنتاج في السياق
- بالنسبة لـ التجانس: "دليل مقنع على اختلاف التوزيعات عبر المجموعات" (إذا تم الرفض).
- بالنسبة لـ الاستقلالية: "دليل مقنع على ارتباط المتغيرين" (إذا تم الرفض).
- سمِّ المتغيرات/المجموعات والسياق الفعلي.
- عدم رفض الفرضية الصفرية لا يثبت أبداً أن المجموعات متطابقة أو أن المتغيرات مستقلة.
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.
صغ الاستنتاج ليتوافق مع نوع الاختبار. ارفض الفرضية الصفرية في اختبار التجانس → تتفاوت توزيعات المجموعات؛ ارفض الفرضية الصفرية في اختبار الاستقلال → المتغيرات مرتبطة. لا تقل "المتغيرات مرتبطة" لتصميم التجانس، أو "المجموعات تتفاوت" لتصميم الاستقلال — لأن الحسابات مشتركة لكن الادعاء مختلف.
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$ للاستقلال $\chi^2 = 6.0$، $df = 1$، $\alpha = 0.05$.
- قيمة p: مساحة الذيل الأيمن 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 للذيل الأيمن عند $df = (\text{rows}-1)(\text{columns}-1)$، وقارنها بـ $\alpha$. صغّ الاستنتاج ليتناسب مع التصميم: تفاوت التوزيعات (التجانس) أو ارتباط المتغيرات (الاستقلال)، في السياق.
اكتب من 4 درجة حرية
- يستخدم اختبار كاي-تربيع جدولاً مقاسه 3 × 3.
- إحصاء الدرس 6 هو قيمة كاي-تربيع المحسوبة، وليس درجات الحرية الخاصة بهذا الجدول.
هذه البطاقة جديدة، لذلك تظهر باللغة الإنجليزية حتى تصبح ترجمتها جاهزة.
- 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.
ما المشكلة؟ لا يرى ذلك سوى فريق الموقع.