Carrying Out a Goodness-of-Fit Test (Extension)
導入済み
7:48
カテゴリーデータのための推論:カイ二乗
公平なサイコロを六十回振ります。各面は十回ずつ出るはずです。しかし、そうはなりません—ここ八回、あそこ十三回。ギャップは常に存在します。もう一度振って…
英語のナレーション・英語と中国語の字幕を切り替え可能
このレッスンの内容
| 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}}$$
- 各項は1つのカテゴリの観測値と期待値を比較する。
- 二乗することですべての乖離を正にし、期待値で割ることでスケール調整を行う。
大きな乖離=大きなカイ二乗
- 観測値が everywhere $\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値は、適切な$df$のχ²曲線下において、$\chi^2$の右側の面積である。
- χ²は片側右尾検定であり、大きい値のみが「極端」とみなされる。
- 大きな$\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$.
χ²は常に片側右尾検定である — 必ず両側の tail を二重にしない。 大きい$\chi^2$の値のみが驚くべきものであるため、p値は右側のtail面積のみである(両側$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値: $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$ と比較する: p $\le \alpha$ なら $H_0$ を棄却 (モデルが良くない)、そうでなければ 帰無仮説を棄却できない — 文脈に合わせて述べる。
寄与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.
何が問題でしたか?この内容はサイトの運営チームだけが確認します。