Setting Up a Goodness-of-Fit Test (Extension)
הוצג
7:48
מסקנה עבור נתונים קטגוריאליים: קו-ריבוע (Chi-Square)
גלול קוביית משחק הוגנת שישים פעמים. כל צד אמור לצאת עשר פעמים. אבל זה לעולם לא קורה — שמונה כאן, שנים-עשר שם. הפער תמיד קיים. אז גלול עוד פעם…
קריינות באנגלית · כתוביות באנגלית ובסינית 中文 שאפשר להחליף ביניהן
בשיעור הזה
| English | משמעות |
|---|---|
| goodness-of-fit/ˈɡʊdnəs ɒv fɪt/ | A test of whether one categorical variable fits a claimed distribution. |
| hypotheses | |
| variable/ˈveərɪəbl/ | A characteristic recorded for each individual, such as height or eye colour. |
| distribution/ˌdɪstrɪˈbjuːʃn/ | The pattern of values or outcomes and their frequencies or probabilities. |
| proportions | |
| expected count/ekˈspektɪd kaʊnt/ | תדירות מצופה |
| category/ˈkætɪɡəri/ | A group in a categorical variable. |
| null model | |
| chi-square statistic/kaɪ skweə stəˈtɪstɪk/ | |
| observed counts/ɒbˈzɜːvd kaʊnts/ | |
| Random/ˈrændəm/ | |
| random sample/ˈrændəm ˈsæmpl/ | A sample chosen by a chance process. |
| randomized process | |
| sampling without replacement | |
| chi-square approximation | |
| simulation method | |
| Degrees of freedom/dɪˈɡriːz ɒv ˈfriːdəm/ | |
| probabilities | |
| parameters/pəˈræmɪtəz/ | Values that specify a model or function, or named inputs that a subroutine receives. |
| chi-square curve | |
| 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. |
| sample size/ˈsæmpl saɪz/ | |
| independent observations |
הנחות ההתאמה המצוינת
- בדיקת התאמה בודקת משתנה אחד מול התפלגות נטענת.
- הנחת אפס $H_0$: החלוקה הטעונה נכונה (למשל, כל היחסים כפי שנציינו).
- הנחת החלופה $H_a$: החלוקה אינה כפי שהוצגה (לפחות יחס אחד שונה).
- $H_a$ היא statement יחידה של "יש בעיה כלשהי" — ולא כיוון.

ספרי ציפוי
- הספר הצפוי לקטגוריה = $n \times$ (היחס הנטען שלה).
- עבור $100$ סוכריות ב-$25\%$ כל אחת: צפויים $= 100 \times 0.25 = 25$ בכל צבע.
- ספרי ציפוי אינם חייבים להיות מספרים שלמים — שמרו אותם מדויקים.
- אלו הם הערכים שדגם האפס צופה, בממוצע.
בדיקת התנאים
- אקראיות: הנתונים מגיעים מדגימה אקראית או מתהליך מקריזציה.
- 10%: $n \le 0.10N$ אם הדגימה מתבצעת ללא החזרה.
- ספרים גדולים: כל ספר ציפוי $\ge 5$ (זו גרסת קארטא-ריבוע).
- כל הספירות הצפויות חייבות לעבור את $5$, או שהמודל $\chi^2$ הוא לא אמין.
דרגות חופש
- לבדיקת התאמה, $df = (\text{number of categories}) - 1$.
- ארבעה צבעי סוכריות → $df = 4 - 1 = 3$.
- ה-$df$ קובעת איזה עקומת קארטא-ריבוע להשתמש עבור ערך ה-p.
- היא תלויה בקטגוריות, ולא בגודל הדגימה.
תנאי הספירות הגדולות למבחן קוואי-ריבוע הוא "כל ספירה צפויה $\ge 5$," לא נצפת. בדקו את הספירות הצפויות, ובדקו אותן כולן — ספירה צפויה אחת קטנה פוגעת במבחן. והמשתנה $df = \text{categories} - 1$ כאן (שגיאה נפוצה היא שימוש ב-$n-1$, שמיועד ל-$t$, לא להתאמה מצוינת של קוואי-ריבוע).
בדקו האם קובייה הוגנת עם $60$ זריקות. $H_0$: לכל צד יש סיכוי $1/6$.
- ספירה צפויה לכל צד: $60 \times \tfrac{1}{6} = 10$ (כל $\ge 5$ ✓).
- $df$: $6 - 1 = 5$ (שישה צדדים).
- $H_a$: הקובייה אינה הוגנת — סיכוי של לפחות צד אחד שונה.
מבחן התאמה מצוינת יש לו $H_0$: החלוקה הטעונה תקפה, מול $H_a$: היא לא. ספירה צפויה $= n \times$ (יחס טעון); בדקו אקראי, 10%, וכל ספירה צפויה $\ge 5$. דרגות החופש הן $(\text{categories}) - 1$.
כתוב מספירות צפויות של 20
- מודל התאמה בעל ארבע קטגוריות בעלות סיכוי שווה.
- ישנם 80 תצפיות. הספירות הצפויות בשיעור 10 ו-5 הן גודל דגימה אחר.
A null goodness-of-fit model specifies four equally likely categories for 80 independent observations. Find each expected count and check the expected-count condition.
Equal categories share the sample size.
A null goodness-of-fit model specifies four equally likely categories for 80 independent observations. Find each expected count and check the expected-count condition.
רמת קושי 1/5 · 100 מטבעות + בונוס קטן בהשלמה הראשונה היום
80 divided by 4 is 20. Other options — 10 (the other sample); 5 (the minimum condition).
The claimed distribution
Expected counts come from the null distribution's proportions.
A fair die is rolled 60 times. What is the expected count for each face (60 × 1/6)?
רמת קושי 2/5 · 140 מטבעות + בונוס קטן בהשלמה הראשונה היום
60 × 1/6 = 10.
For a goodness-of-fit test with 6 categories, what are the degrees of freedom?
רמת קושי 2/5 · 140 מטבעות + בונוס קטן בהשלמה הראשונה היום
df = categories − 1 = 6 − 1 = 5.
The large counts condition for a chi-square test requires...
רמת קושי 1/5 · 100 מטבעות + בונוס קטן בהשלמה הראשונה היום
All EXPECTED counts must be at least 5.
Expected counts must always be whole numbers.
רמת קושי 1/5 · 100 מטבעות + בונוס קטן בהשלמה הראשונה היום
Keep them exact — they need not be integers.
The alternative hypothesis for a goodness-of-fit test says...
רמת קושי 1/5 · 100 מטבעות + בונוס קטן בהשלמה הראשונה היום
Ha is a non-directional 'the distribution isn't as claimed'.
מה השתבש? רק צוות האתר רואה זאת.