Carrying Out a Goodness-of-Fit Test (Extension)
Diperkenalkan
7:48
Inferensi untuk Data Kategorikal: Chi-Square
Lempar dadu adil enam puluh kali. Setiap sisi seharusnya muncul sepuluh kali. Tapi tidak pernah terjadi — delapan di sini, thirteen di sana. Celahnya selalu ada. Jadi lempar lagi…
Narasi bahasa Inggris · takarir bahasa Inggris dan 中文 yang dapat dipilih
Dalam pelajaran ini
| English | Makna |
|---|---|
| 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/ | Statistik chi-kuadrat |
| 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. |
Statistik chi-square
- Statistik chi-square menjumlahkan selisih terstandarisasi melintasi semua kategori:
-
$$\chi^2 = \sum \frac{(\text{observed} - \text{expected})^2}{\text{expected}}$$
- Setiap suku membandingkan frekuensi diamati dan yang diharapkan untuk satu kategori.
- Memkuadratkan membuat setiap selisih menjadi positif; membagi dengan yang diharapkan mengukurnya.
Selisih lebih besar, chi-square lebih besar
- Jika $\approx$ diharapkan di mana-mana, setiap suku sangat kecil → $\chi^2$ juga kecil.
- Ketidakcocokan besar membuat suku-suku besar → $\chi^2$ besar.
- Jadi $\chi^2$ yang besar adalah bukti melawan distribusi yang diklaim.
- $\chi^2$ selalu $\ge 0$ (jumlah kuadrat atas nilai positif).

Distribusi chi-kuadrat: bentuk bergantung pada df dan nilai-p adalah ekor kanan
One category has observed 8, expected 10. Compute (observed − expected)²/expected.
Kesulitan 2/5 · 140 koin + bonus kecil pada penyelesaian pertama hari ini
(8−10)²/10 = 4/10 = 0.4.
A large chi-square statistic is evidence against the claimed distribution.
Kesulitan 1/5 · 100 koin + bonus kecil pada penyelesaian pertama hari ini
Big gaps → big χ² → evidence against H0.
In the chi-square formula, each denominator is the ___ count.
Kesulitan 1/5 · 100 koin + bonus kecil pada penyelesaian pertama hari ini
Divide the squared gap by the expected count.
The chi-square statistic can be negative.
Kesulitan 1/5 · 100 koin + bonus kecil pada penyelesaian pertama hari ini
It's a sum of squares over positive expecteds — always ≥ 0.
Temukan nilai p
- p-value adalah area di sebelah kanan $\chi^2$ di bawah kurva chi-square pada $df$ yang tepat.
- Chi-square adalah uji ekor kanan — hanya nilai besar yang "ekstrem."
- $\chi^2$ yang besar berada jauh ke kanan → p-value kecil → bukti kuat melawan $H_0$.
- Gunakan teknologi atau tabel dengan $df = \text{categories} - 1$.

A chi-square test is...
Kesulitan 1/5 · 100 koin + bonus kecil pada penyelesaian pertama hari ini
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?
Kesulitan 2/5 · 140 koin + bonus kecil pada penyelesaian pertama hari ini
df = number of categories − 1 = 6 − 1 = 5. The sample size does not affect df.
Kartu ini telah diperbaiki, jadi ditampilkan dalam bahasa Inggris sampai terjemahannya diperbarui.
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 diharapkan count of at least 5?
Kesulitan 1/5 · 100 koin + bonus kecil pada penyelesaian pertama hari ini
Expected count = $n(0.02)\ge5$, so $n\ge250$.
Chi-square selalu merupakan uji ekor kanan — jangan pernah menggandakan ekornya. Hanya nilai $\chi^2$ yang besar yang mengejutkan, sehingga p-value hanyalah area ekor kanan saja (berbeda dengan uji dua arah $z$ atau $t$). Selain itu, masukkan frekuensi ke dalam rumus, bukan proporsi, dan gunakan yang diharapkan (bukan yang diamati) di setiap penyebut.

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$.
Kesulitan 2/5 · 140 koin + bonus kecil pada penyelesaian pertama hari ini
Expected 30 each. $\frac{(40-30)^2}{30}+\frac{(25-30)^2}{30}+\frac{(25-30)^2}{30}=\frac{100+25+25}{30}=5$.
Die test: $8, 12, 9, 11, 10, 10$ teramati; $10$ diharapkan masing-masing; $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$.
- Nilai-p: area ekor kanan melampaui $1.0$ pada $df=5$ adalah besar ($\approx 0.96$).
- Keputusan: $0.96 > 0.05$ → gagal tolak; tidak ada bukti dadu tersebut tidak adil.
Statistik chi-square $\chi^2 = \sum \frac{(\text{observed} - \text{expected})^2}{\text{expected}}$ mengukur total ketidaksesuaian. Nilai-p-nya adalah area ekor kanan pada $df = \text{categories} - 1$. Bandingkan dengan $\alpha$: tolak $H_0$ jika p $\le \alpha$ (model cocok buruk), atau gagal tolak — nyatakan dalam konteks.
Ditulis dari kontribusi 1.6
- Satu sel memiliki jumlah diamati 14 dan jumlah yang diharapkan 10.
- Kontribusi pelajaran 0.4 adalah sel lain.
A goodness-of-fit test gives p-value = 0.03. Which interpretation is correct?
Kesulitan 1/5 · 100 koin + bonus kecil pada penyelesaian pertama hari ini
A p-value is computed assuming $H_0$ is true. It is never the probability that $H_0$ is true.
Kartu ini baru, jadi ditampilkan dalam bahasa Inggris sampai terjemahannya siap.
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.
Kartu ini baru, jadi ditampilkan dalam bahasa Inggris sampai terjemahannya siap.
- 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.
Kartu ini baru, jadi ditampilkan dalam bahasa Inggris sampai terjemahannya siap.
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.
Apa yang salah? Hanya tim situs yang dapat melihatnya.