Chi-squared tests
導入済み
8:10
高等確率・統計
ダブリン、一九〇八年。ギネス醸造所の内部で、ウィリアム・ゴセットという若い化学者は非常に現実的な問題に直面していた。彼は僅かなバッチのみをテストすることができた。…
英語のナレーション・英語と中国語の字幕を切り替え可能
このレッスンの内容
| English | 意味 |
|---|---|
| chi-squared/kaɪ skweəd/ | カイ二乗 |
| observed/ɒbˈzɜːvd/ | 観測値 |
| expected/ekˈspektɪd/ | 期待値 |
| degrees of freedom/dɪˈɡriːz ɒv ˈfriːdəm/ | 自由度 |
| critical value/ˈkrɪtɪkl ˈvæljuː/ | 有意水準 |
| goodness of fit/ˈɡʊdnəs ɒv fɪt/ | 適合度 |
| contingency table/kənˈtɪndʒənsi ˈteɪbl/ | 列联表 |
| independence/ˌɪndɪˈpendəns/ | 独立性 |
| expected frequency/ekˈspektɪd ˈfriːkwənsi/ |
データは理論に適合するか?
- サイコロは各目に均等に落ちると予想したり、目の色が髪の色と独立していると想定したりする。データが実際にそう一致しているか?
- $\chi^2$(カイ二乗)検定は、観測された頻度がモデルの予測からどれだけ逸脱しているかを計測し、そのギャップが偶然によるものとしては大きすぎないかどうかを調べる。
Chi-squared test route
Follow observed and expected counts to a test decision.
検定統計量
- 観測された各値 $O$ と、モデルから得られる期待値 $E$ を比較する:
- $\chi^2$ が小さいことはデータが適合することを意味し、大きいことは適合しないことを意味する。
The chi-squared test statistic is:
難易度 1/5 · 100 コイン + 今日初回達成時の小ボーナス
χ² sums (observed − expected)² ÷ expected over all categories.
棄却領域
- $\chi^2$ を右側の自由度に対する表の閾値と比較する。
- $\chi^2$ が閾値を超えた(上側尾に位置した)場合、モデルを棄却する。

大きなχ²は塗りつぶされた尾に入ります — 偶然では説明できないほど大きいため、モデルは棄却されます。
A large chi-squared value (beyond the critical value) leads you to reject the model.
難易度 1/5 · 100 コイン + 今日初回達成時の小ボーナス
A large χ² means a discrepancy at least this large would be unlikely under the null hypothesis.
A 3 × 4 contingency table is tested for independence. How many degrees of freedom?
難易度 2/5 · 140 コイン + 今日初回達成時の小ボーナス
ν = (3 − 1)(4 − 1) = 6.
A Poisson model is fitted to 6 classes (after pooling), with λ estimated from the data. What is ν?
難易度 1/5 · 100 コイン + 今日初回達成時の小ボーナス
ν = 6 − 1 − 1 = 4: one for the total, one for the estimated λ.
worked example(計算例)
- 観測頻度 $20, 30, 25, 25$、それぞれが $25$ と期待される。
- $\chi^2 = \dfrac{(20-25)^2 + (30-25)^2 + 0 + 0}{25} = \dfrac{25 + 25}{25} = 2$.
- 臨界値と比較すると、$\chi^2$ が $2$ で小さいため、データは適合している。

Observed counts 20, 30, 25, 25, each expected 25. What is χ² = Σ(O−E)²/E?
難易度 2/5 · 140 コイン + 今日初回達成時の小ボーナス
((−5)² + 5² + 0 + 0)/25 = 50/25 = 2.
Observed counts are 10, 20 and 30, and each expected count is 20. What is chi-square, and why are expected counts below 5 pooled?
Chi-square adds squared differences divided by the expected counts. The approximation needs those expected counts not to be tiny.
2つの用途
- 適合度の検定: データが提案された分布(一様分布、二項分布、ポアソン分布など)に従うか?
- 独立性: 交差集計表において、2つの分類は独立しているか?(期待 $= \dfrac{\text{row total} \times \text{column total}}{\text{grand total}}$。)
小さな期待頻度を組み合わせる。 期待頻度が 5未満 の場合、まずクラスを統合せよ — 極めて小さな期待頻度における $\chi^2$ の近似は信頼できない。
Match each chi-squared use to what it tests.
難易度 2/5 · 140 コイン + 今日初回達成時の小ボーナス
Goodness of fit checks a distribution; the independence test uses a contingency table.
Before testing, pool any class whose expected frequency is below ______.
難易度 1/5 · 100 コイン + 今日初回達成時の小ボーナス
The χ² approximation needs expected counts of at least 5; combine smaller ones.
In a contingency table with grand total 200, a row total is 80 and a column total is 45. Find the expected frequency for that cell.
難易度 2/5 · 140 コイン + 今日初回達成時の小ボーナス
80 × 45 ÷ 200 = 18.
理解できましたか
- $\chi^2 = \displaystyle\sum\frac{(O-E)^2}{E}$ — 観測頻度対 期待頻度
- 大きな $\chi^2$ (閾値を超え、上側尾にある)はモデルを棄却する
- 用途: 適合度の検定 と 独立性;5未満の期待頻度は組み合わせる
カイ二乗値 10 から読み取る
- 観測頻度は 10、20、30 である。各期待頻度は 20 である。
- カイ二乗値を求める。期待頻度が 5 未満の場合は、検定前に集計する必要がある。

Without looking back: a test of independence on a 2 × 2 table gives χ² = 2.9. State the hypotheses, ν, the 5% critical value and the conclusion.
Never say H₀ is proved true.
このカードは新しいため、翻訳ができるまで英語で表示されます。
You've got it
- $\chi^2 = \displaystyle\sum\frac{(O-E)^2}{E}$ — observed vs expected counts
- a large $\chi^2$ (beyond the critical value, upper tail) rejects the model
- $\nu$ = classes − 1 − estimated parameters; contingency table $(r-1)(c-1)$
- uses: goodness of fit 拟合优度 and independence; pool expected counts below 5; conclude in context
Observed counts are 10, 20 and 30, and each expected count is 20. What is chi-square?
難易度 1/5 · 100 コイン + 今日初回達成時の小ボーナス
Each outer cell contributes 5, and 5 plus 5 is 10.
何が問題でしたか?この内容はサイトの運営チームだけが確認します。