Carrying Out a Goodness-of-Fit Test (Extension)
مُقدَّم
7:48
الاستدلال للبيانات التصنيفية: كاي-تربيع
رمي نرد عادل ستين مرة. يجب أن يظهر كل وجه عشر مرات. لكن الأمر لا يحدث أبداً — ثمانية هنا، thirteen هناك. الفجوات موجودة دائماً. لذا رمِ مرة أخرى…
سرد باللغة الإنجليزية · ترجمة نصية بالإنجليزية و中文 يمكنك التبديل بينهما
في هذا الدرس
| English | المعنى |
|---|---|
| random sample/ˈrændəm ˈsæmpl/ | A sample chosen by a chance process. |
| chance variation | |
| chi-square goodness-of-fit test/kaɪ skweə ˈɡʊdnəs ɒv fɪt test/ | |
| two-way tests | |
| chi-square statistic/kaɪ skweə stəˈtɪstɪk/ | إحصاء كاي-تربيع |
| category/ˈkætɪɡəri/ | A group in a categorical variable. |
| observed count/ɒbˈzɜːvd kaʊnt/ | The number actually seen in a category. |
| expected count/ekˈspektɪd kaʊnt/ | The count expected in a category if the null hypothesis is true. |
| p-value/piː ˈvæljuː/ | The probability, assuming the null model, of a test statistic at least as extreme as the observed one in the direction or directions tested. |
| right-tail area | |
| chi-square distribution/kaɪ skweə ˌdɪstrɪˈbjuːʃn/ | A right-skewed distribution used for chi-square tests. |
| skewed right/skjuːd raɪt/ | |
| right-tailed | |
| proportions | |
| Large counts | |
| fail to reject/feɪl tə rɪˈdʒekt/ | |
| significant result | |
| probability/ˌprɒbəˈbɪlɪti/ | A numerical measure of how likely an event is, ranging from zero to one. |
| Hypotheses | |
| denominator/dɪˈnɒmɪneɪtə/ | The lower part of a fraction, indicating the divisor or the number of equal parts in a whole. |
| categorical variable/ˌkætɪˈɡɒrɪkl ˈveərɪəbl/ | A variable that places individuals in groups. |
إحصائية كاي-تربيع
- إحصائية كاي-تربيع تجمع الفجوات المعيارية عبر جميع الفئات:
-
$$\chi^2 = \sum \frac{(\text{observed} - \text{expected})^2}{\text{expected}}$$
- كل حد يقارن التعداد المرصود والمتوقع لفئة واحدة.
- التربيع يجعل كل فجوة موجبة؛ القسمة على المتوقع تضبط مقياسها.
فجوات أكبر، كاي-تربيع أكبر
- إذا كانت التعدادات المرصودة $\approx$ المتوقعة في كل مكان، يكون كل حد صغيراً → $\chi^2$ صغير.
- عدم التطابق الكبير يجعل الحدود كبيرة → $\chi^2$ كبير.
- لذا فإن قيمة $\chi^2$ الكبيرة هي دليل ضد التوزيع الادعي.
- $\chi^2$ دائمًا $\ge 0$ (مجموع مربعات على قيم موجبة).

توزيع كاي-تربيع: الشكل يعتمد على df والقيمة p هي الذيل الأيمن
One category has observed 8, expected 10. Compute (observed − expected)²/expected.
الصعوبة 2/5 · 140 عملة + مكافأة صغيرة عند الإنجاز الأول اليوم
(8−10)²/10 = 4/10 = 0.4.
A large chi-square statistic is evidence against the claimed distribution.
الصعوبة 1/5 · 100 عملة + مكافأة صغيرة عند الإنجاز الأول اليوم
Big gaps → big χ² → evidence against H0.
In the chi-square formula, each denominator is the ___ count.
الصعوبة 1/5 · 100 عملة + مكافأة صغيرة عند الإنجاز الأول اليوم
Divide the squared gap by the expected count.
The chi-square statistic can be negative.
الصعوبة 1/5 · 100 عملة + مكافأة صغيرة عند الإنجاز الأول اليوم
It's a sum of squares over positive expecteds — always ≥ 0.
إيجاد قيمة p
- قيمة p هي المساحة إلى اليمن لـ $\chi^2$ تحت منحنى كاي-تربيع عند $df$ الصحيح.
- كاي-تربيع اختبار ذيل أيمن — فقط القيم الكبيرة تُعتبر "متطرفة".
- $\chi^2$ كبير يقع بعيداً لليمين → قيمة p صغيرة → دليل قوي ضد $H_0$.
- استخدم تقنية أو جدولاً مع $df = \text{categories} - 1$.

A chi-square test is...
الصعوبة 1/5 · 100 عملة + مكافأة صغيرة عند الإنجاز الأول اليوم
Only large χ² is extreme → right tail only.
A goodness-of-fit test compares the colours of 300 candies with a claimed distribution over 6 colours. What are the degrees of freedom?
الصعوبة 2/5 · 140 عملة + مكافأة صغيرة عند الإنجاز الأول اليوم
df = number of categories − 1 = 6 − 1 = 5. The sample size does not affect df.
تم تصحيح هذه البطاقة، لذلك تظهر باللغة الإنجليزية حتى يتم تحديث ترجمتها.
Worked test: State and Plan
State. $H_0$: the colour distribution of the tulip mix is as labelled ($p_{\text{red}}=0.40$, $p_{\text{yellow}}=0.35$, $p_{\text{white}}=0.25$). $H_a$: at least one of these proportions 比例 is different. Use $\alpha=0.05$.
Plan. Chi-square test for goodness of fit.
- Random: the 200 bulbs are a random sample.
- 10%: Assume there are at least 2,000 bulbs of this mix, so 200 is no more than 10% of them.
- Large counts 大频数条件: expected counts are $200(0.40)=80$, $200(0.35)=70$, $200(0.25)=50$, all at least 5.
A claim gives a category probability of 0.02. What is the smallest sample size that gives this category an متوقع count of at least 5?
الصعوبة 1/5 · 100 عملة + مكافأة صغيرة عند الإنجاز الأول اليوم
Expected count = $n(0.02)\ge5$, so $n\ge250$.
كاي-تربيع دائماً اختبار ذو ذيل أيمن — لا تضاعف الذيل أبداً. فقط قيم $\chi^2$ الكبيرة هي المفاجئة، لذا فإن قيمة p هي مساحة الذيل الأيمن فقط (على عكس $z$ ثنائي الاتجاه أو $t$). أيضاً، أدخل التعدادات في الصيغة، وليس النسب، واستخدم المتوقع (وليس المرصود) في كل مقام.

The claimed distribution
Expected counts come from the null distribution's proportions.
A spinner should land on A, B and C equally often. In 90 spins: A 40, B 25, C 25. Calculate $\chi^2$.
الصعوبة 2/5 · 140 عملة + مكافأة صغيرة عند الإنجاز الأول اليوم
Expected 30 each. $\frac{(40-30)^2}{30}+\frac{(25-30)^2}{30}+\frac{(25-30)^2}{30}=\frac{100+25+25}{30}=5$.
اختبار النرد: $8, 12, 9, 11, 10, 10$ مُلاحظة؛ $10$ متوقعة في كل حالة؛ $df = 5$.
- $\chi^2 = \tfrac{(8-10)^2}{10} + \tfrac{(12-10)^2}{10} + \cdots = \tfrac{4+4+1+1+0+0}{10} = 1.0$.
- قيمة p: مساحة الذيل الأيمن beyond $1.0$ عند $df=5$ كبيرة ($\approx 0.96$).
- القرار: $0.96 > 0.05$ → عدم رفض الفرضية الصفرية؛ لا يوجد دليل على أن النرد غير عادل.
يقيس إحصاء كاي-تربيع $\chi^2 = \sum \frac{(\text{observed} - \text{expected})^2}{\text{expected}}$ إجمالي عدم التطابق. قيمته p هي مساحة الذيل الأيمن عند $df = \text{categories} - 1$. قارنها بـ $\alpha$: افرض $H_0$ إذا كانت p $\le \alpha$ (النموذج يفتقر للتوافق)، وإلا لا ترفض — صياغتها في السياق.
اكتب من مساهمة قدرها 1.6
- خلية واحدة لها تعداد مرصود 14 وتعداد مستنتج 10.
- مساهمة الدرس 0.4 هي خلية أخرى.
A goodness-of-fit test gives p-value = 0.03. Which interpretation is correct?
الصعوبة 1/5 · 100 عملة + مكافأة صغيرة عند الإنجاز الأول اليوم
A p-value is computed assuming $H_0$ is true. It is never the probability that $H_0$ is true.
هذه البطاقة جديدة، لذلك تظهر باللغة الإنجليزية حتى تصبح ترجمتها جاهزة.
How an FRQ is scored
- Hypotheses 假设 in context, with the claimed proportions.
- Test named and all three conditions checked: random, 10%, expected counts at least 5 (show the numbers).
- Mechanics: $\chi^2$, df and p-value all correct.
- Conclusion linked to the p-value and $\alpha$, in context, with no claim that $H_0$ is proved.
هذه البطاقة جديدة، لذلك تظهر باللغة الإنجليزية حتى تصبح ترجمتها جاهزة.
- Use counts, not percentages, in the formula, and the expected count in each denominator 分母.
- Check expected counts, not observed counts, for the large-counts condition.
- Never double the tail. Chi-square p-values are right-tail areas 右尾面积 only.
- "Fail to reject" is not "the label is correct"; it means the evidence is not strong enough to say it is wrong.
هذه البطاقة جديدة، لذلك تظهر باللغة الإنجليزية حتى تصبح ترجمتها جاهزة.
A chi-square goodness-of-fit test checks one categorical variable 分类变量 against a claimed distribution. $H_0$: the claimed proportions are correct. Conditions: random, 10%, all expected counts $\ge5$. $\chi^2=\sum\frac{(\text{O}-\text{E})^2}{\text{E}}$ with $df=\text{categories}-1$; the p-value is the right-tail area. Conclude in context, and look at the largest term to see where the data differ most.
ما المشكلة؟ لا يرى ذلك سوى فريق الموقع.