Carrying Out a Goodness-of-Fit Test (Extension)
הוצג
7:48
מסקנה עבור נתונים קטגוריאליים: קו-ריבוע (Chi-Square)
גלול קוביית משחק הוגנת שישים פעמים. כל צד אמור לצאת עשר פעמים. אבל זה לעולם לא קורה — שמונה כאן, שנים-עשר שם. הפער תמיד קיים. אז גלול עוד פעם…
קריינות באנגלית · כתוביות באנגלית ובסינית 中文 שאפשר להחליף ביניהן
בשיעור הזה
| 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$ (סכום ריבועים על חיוביים).

*חלוקת קווי-ריבוע: הצורה תלויה בד
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-value הוא השטח מימין ל$\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-square is always a right-tailed test — never double the tail. Only large $\chi^2$ values are surprising, so the p-value is the right-tail area only (unlike a two-sided $z$ or $t$). Also, plug counts into the formula, not proportions, and use expected (not observed) in each denominator.

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-value: שטח הזנב הימני מעבר ל$1.0$ ב$df=5$ הוא גדול ($\approx 0.96$).
- החלטה: $0.96 > 0.05$ → אין לדחות; אין ראיות לכך שהקובייה אינה הוגנת.
הסטטיסטיקה של קוואדראט-שיש $\chi^2 = \sum \frac{(\text{observed} - \text{expected})^2}{\text{expected}}$ מודדת את סך חוסר ההתאמה. ה-p-value שלה הוא שטח הזנב הימני ב$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.
מה השתבש? רק צוות האתר רואה זאת.