AHL 4.12 — Data collection and χ² categorisation(データの集め方と χ² のカテゴリ分け)

ノートWhat you should be able to do
  • survey(調査)や questionnaire(アンケート)の質問を見て、biased(かたよった)・personal(個人的な)・unstructured(選択肢のない)・imprecise(あいまいな)ところを指摘し、直せる。
  • たくさんある変数の中から、調べたい問いに関係する変数を選べる。
  • reliability(信頼性)と validity(妥当性)のちがいを説明し、test-retest(再テスト法)・parallel forms(平行検査法)・content・criterion-related の \(4\) つを使い分けられる。
  • 数値データを \(\chi^2\) の表のカテゴリに区切り、その区切り方を説明できる。
  • expected frequency(期待度数)が \(5\) より大きくなるように、カテゴリをまとめられる。
  • goodness of fit で、データから推定した母数の数だけ degrees of freedom(自由度)が減ることを使える。

The idea

1. Designing the data collection(データを集める側に立つ)

SL の Topic 4 では、データはすでにそこにありました。表が与えられ、それを整理し、検定にかけていました。

この項目では、その手前に立ちます。

  1. 何を知りたいか(問い)
  2. どう聞くか(質問の設計)
  3. 何を記録するか(変数の選択)
  4. どう区切るか(カテゴリ分け)

この \(4\) 段のあとで、はじめて \(\chi^2\) を計算します。

この \(4\) 段のどこかで失敗すると、\(\chi^2\) をどれだけ正しく計算しても、答えに意味がありません。 だから、この項目では計算の手前の段階を学びます。

標本の取り方は SL 4.1、\(\chi^2\) 検定の手順は SL 4.11 でやりました。ここで足すのは、質問の設計、カテゴリの作り方、自由度の数え方です。\(\chi^2\) の値と \(p\)-value は電卓が出すので、新しく手で計算するのは期待度数を作るところだけです。

そのかわり、この項目の設問の多くは、英語の文で説明して答える問題です。区切り方なら「なぜそう区切ったか」まで書いて、はじめて答えになります。このページでは、その文の型を毎回示します。

ノートExploration(探究課題・IA)でも、ここが効きます

自分でデータを集めて \(\chi^2\) を使うなら、その集め方を説明する部分が評価されます。この項目の言葉は、そのまま IA で使えます。

2. Designing questions(質問のつくり方)

同じことを聞いても、質問の書き方しだいで、集まる答えが変わります。よい質問かどうかを見る観点は、biased かどうか、personal かどうか、structured かどうか、precise かどうかの \(4\) つです。\(1\) つずつ見ます。

図 1: よくない質問 \(3\) つと、その直し方です。

biased と unbiased

biased question(かたよった質問)は、答えを一方に誘導する質問です。leading question(誘導質問)ともいいます。

図 1 の左を見てください。

✗ Don’t you agree that the new bus route is good?

Don't you agree と言われると、No と答えにくくなります。質問そのものが、答えを押しています。

✓ How would you rate the new bus route?

こちらは、どちらへも答えられます。unbiased(かたよっていない)質問です。

ヒント「よい」「便利な」のような語が入っていたら、疑ってください

the good new route、this convenient service、the problem of ... のような言い方は、答える前に評価を与えています。

質問文から、評価を表す形容詞を抜く——これが直し方です。

personal

personal question(個人的な質問)は、年齢・収入・成績・健康など、正直に答えにくい質問です。

聞いてはいけないわけではありません。ただし、

  • 答えたくない人が答えないまま返す(missing data が増える)
  • 答えても、本当のことを書かない

ということが起こります。集まったデータが、その分だけかたよります。

ノート直し方は \(2\) つあります
  • 範囲で聞く。 What is your income? ではなく、Which band is your income in? として、幅のある選択肢を出します
  • 匿名にする。 The questionnaire is anonymous と最初に書いておきます

答案では、「なぜ答えにくいのか」と「どう直すのか」の両方を書いてください。

unstructured と structured

unstructured question(自由回答の質問)は、答えを自由に書かせる質問です。structured question(選択式の質問)は、選択肢から選ばせる質問です。

図 1 の真ん中です。

✗ What do you think of the canteen?

✓ Rate the canteen: very poor / poor / fair / good / very good

structured な質問では、選択肢がそろっていること(consistent answer choices)が条件です。

\(\chi^2\) にかけるなら、structured でなければなりません。 自由に書かれた文章は、そのままでは度数に数えられないからです。

警告選択肢は、重ならず、もれなく

\(\chi^2\) の表は、\(1\) つの回答が、ちょうど \(1\) つのマスに入ることを前提にしています。ですから選択肢は

  • 重ならない(0–10、10–20 は \(10\) がどちらか分かりません。0–9、10–19 にします)
  • もれがない(0–9、10–19 だけでは、\(20\) 以上の人が入れません。20 or more を足します)

の \(2\) つをみたす必要があります。この \(2\) つは、第5節のカテゴリ分けとまったく同じ条件です。

precise questioning

precise question(正確な質問)は、誰が読んでも同じ意味になる質問です。そうでないものを imprecise(あいまいな)といいます。

図 1 の右です。

✗ Do you exercise often?

✓ How many days last week did you exercise for 30 minutes or more?

often(よく)は、人によって意味が違います。週 \(1\) 回を often と思う人もいれば、毎日でなければ often ではないと思う人もいます。同じ人の同じ生活について、答えがばらついてしまいます。

直し方は、期間・量・単位を入れることです。「先週」「\(30\) 分以上」「何日」と決めれば、解釈の幅がなくなります。

ヒントあいまいな語のリスト

often、regularly、a lot、good、young、nearby、recently——どれも人によって意味が変わります。

問題文でこれらを見つけたら、それが指摘すべき点です。

例題 1 A student wants to find out whether the members of her school use the new library. She plans to ask students the following question.

Don’t you think the excellent new library is often useful?

(a) State two reasons why this question is not well designed.

(b) Write an improved question that could be used in a \(\chi^2\) test for independence.

(a) この \(1\) 文には、第2節で見た問題が \(3\) つ入っています。

表 1: この質問の問題点
問題 どこに出ているか
biased(誘導的) Don't you think ...? と excellent
imprecise(あいまい) often——人によって意味が違う
unstructured(選択肢がない) useful かどうかを、どう答えればよいか決まっていない

two reasons なので、\(2\) つ書けば足ります。どこが悪いのかを、質問文の言葉を引いて示してください。

試験ではこう書く

The question is biased: “Don’t you think” and “excellent” both push the student towards agreeing.

The question is imprecise: “often” means different things to different students, so their answers cannot be compared.

(誘導的であること、あいまいであること——それぞれ、質問文のどの語がそうさせているかを示しています。)

(b) \(\chi^2\) test for independence にかけるので、答えがカテゴリになる必要があります(第3節)。

試験ではこう書く

How many times did you use the library last week?

\(0\) / \(1\)–\(2\) / \(3\)–\(4\) / \(5\) or more

(\(3\) つとも直っています。評価を表す語がなく unbiased、「先週」「何回」と決めてあって precise、選択肢が重ならず、もれもない structured。)

ノート解答例(答案用紙にはこう書く)

(a) It is biased: “Don’t you think” and “excellent” lead the student towards a positive answer.

It is imprecise: “often” is not defined, so different students will interpret it differently.

(b) How many times did you use the library last week? \(0\) / \(1\)–\(2\) / \(3\)–\(4\) / \(5\) or more.

ヒントtwo reasons に \(3\) つ書いても、点は増えません

\(3\) つ目を書いて時間を使うより、\(2\) つを \(1\) 行ずつ、根拠つきで書くほうが確実です。

「biased です」だけでは足りません。どの語がそうさせているかを引いてください。

3. Selecting relevant variables(調べる変数を選ぶ)

現実のデータには、必要のない列がたくさん入っています。 アンケートを取れば \(20\) 問ぶんの答えが集まりますが、\(1\) つの問いに答えるのに \(20\) 個すべては要りません。

選ぶ基準は \(2\) つです。

表 2: 変数を選ぶ \(2\) つの基準
基準 中身
relevant(関係がある) その変数が、立てた問いに直接かかわるか
appropriate(扱いに合っている) その変数が、使いたい検定に合った型か
重要\(\chi^2\) にかけるなら、カテゴリでなければなりません

\(\chi^2\) の表に入るのは 度数です。ですから、変数はカテゴリになっていることが必要です。

  • はじめからカテゴリのもの(性別、学年、好きな科目)… そのまま使えます
  • 数値のもの(身長、点数、時間)… 区切ってカテゴリにします(第5節)

数値のまま \(\chi^2\) に入れることはできません。「\(168.3\) cm の人が何人」では、どのマスにも \(1\) 人ずつしか入らないからです。

警告「関係がありそうだから全部入れる」は、選択ではありません

Explain which variables you would use と問われたら、選んだ理由を書きます。「多いほうがよい」ではありません。

関係のない変数を混ぜると、表のマスが増え、\(1\) マスあたりの度数が小さくなります。第5節の「\(5\) より大きい」がみたせなくなる——これが、余分な変数の実害です。

4. Reliability and validity(信頼性と妥当性)

reliability と validity は、どちらも「測り方のよさ」を表す言葉ですが、見ているところが違います。意味は \(1\) 行ずつです。

表 3: reliability と validity
語 意味
reliability(信頼性) 同じことをもう一度測ったら、同じ結果になるか
validity(妥当性) それが測りたかったものを、本当に測っているか
図 2: reliability と validity は、別のものです。

図 2 が、この \(2\) つの関係です。的の中心が「本当の値」、点が「測った値」です。

  • reliable … 点どうしがまとまっている(何度やっても同じ)
  • valid … 点が中心を向いている(正しいものを測っている)
重要reliable でも valid でないことがあります

図 2 の \(2\) 番目を見てください。\(5\) 発とも同じところに当たっていますが、中心から外れています。

体重計が、いつも \(3\) kg 多く出るとします。何度乗っても同じ値が出るので reliable ですが、体重を正しく測っていないので valid ではありません。

この \(2\) つは別々に確かめる必要があります。 「同じ結果が出たから正しい」とは言えません。

reliability tests

reliability を確かめる方法は \(2\) つです。

表 4: \(2\) つの reliability test
方法 やること 何が分かるか
test-retest 同じ人に、同じテストを、時間をおいてもう一度受けてもらう \(2\) 回の結果が近ければ reliable
parallel forms 同じ内容の別の問題(\(2\) つの版)を作り、両方受けてもらう \(2\) つの版の結果が近ければ reliable
ヒント\(2\) つの使い分け
  • test-retest … 同じテストをもう一度。ただし、覚えてしまうという問題があります。\(2\) 回目のほうが点が上がるなら、それは reliability ではなく記憶です。だから時間をあけます
  • parallel forms … 別の問題なので、覚える問題は起きません。ただし、\(2\) つの版が本当に同じ難しさかを確かめるのが難しくなります

どちらを選んでも構いませんが、Give a reason と問われたら、この長所と短所のどちらかにふれてください。

どちらの方法でも、確かめるのは\(2\) 回の結果がどれだけ一致しているかです。実際には、\(2\) 組の値の correlation coefficient(相関係数)(SL 4.4)を見ます。

validity tests

こちらも \(2\) つです。

表 5: \(2\) つの validity test
方法 やること 何が分かるか
content validity(内容的妥当性) 測りたい内容が、もれなく入っているかを確かめる 範囲がそろっていれば valid
criterion-related validity(基準関連妥当性) すでに信用されている別のものさしと比べる よく一致していれば valid

例で見ます。

  • content … 学期の数学のテストが、その学期に習った全部の単元から出ているか。\(1\) 単元だけから出ていたら、content validity は低いです
  • criterion-related … 新しく作った短い体力テストの結果を、きちんとした測定機器で測った値と比べる。近ければ criterion-related validity が高いです
ノート\(4\) つの名前は、そのまま書けるようにしてください

test-retest、parallel forms、content、criterion-related。試験では、この \(4\) つの名前を使って答えます。

答案では、名前だけでなく「何をするのか」を \(1\) 行添えてください。名前だけでは点になりません。

例題 2 A teacher designs a new \(20\)-minute test to measure students’ arithmetic skill.

(a) Describe how the teacher could use a test-retest method to check the reliability of the test.

(b) The results of the new test agree closely with the results of a well-established arithmetic test taken by the same students. State which type of validity this supports, and explain your answer.

(c) The new test contains only addition questions. Comment on the validity of the test.

(a) test-retest は「同じ人に、同じテストを、時間をおいて」でした(第4節)。

Describe なので、やることを順に書きます。 「時間をおく」理由まで書けると、答案が強くなります。

試験ではこう書く

Give the same test to the same group of students a second time, after an interval long enough that they do not simply remember their answers.

If the two sets of scores agree closely, the test is reliable.

(同じ生徒に、覚えていない程度の間隔をあけて、同じテストをもう一度。\(2\) 回の得点が近ければ reliable、という意味です。)

(b) 「すでに信用されている別のものさしと比べる」——これが criterion-related validity です(第4節)。

試験ではこう書く

Criterion-related validity.

The new test is being compared with an established test that is already accepted as a measure of arithmetic skill, and the close agreement suggests that the new test measures the same thing.

(すでに認められているものさしと比べていて、よく一致しているから、という意味です。)

(c) 足し算だけでは、計算力の一部しか測っていません。 引き算・かけ算・わり算が入っていないからです。これは content validity の問題です。

Comment on と言われているので、どの validity が、なぜ低いのかを書きます。

試験ではこう書く

The test has low content validity.

Arithmetic skill also includes subtraction, multiplication and division, but the test covers only addition, so it does not cover the whole of what it claims to measure.

(内容が全体をおおっていないので content validity が低い、という意味です。)

ノート解答例(答案用紙にはこう書く)

(a) Give the same test to the same students again after a suitable interval, and compare the two sets of scores. Close agreement indicates reliability.

(b) Criterion-related validity: the new test agrees with an established test that is already accepted as measuring arithmetic skill.

(c) Low content validity: only addition is tested, so the test does not cover the whole of arithmetic skill.

警告(c) で「reliable ではない」と書かない

足し算だけのテストでも、何度受けても同じ点が出るなら reliable です。 問題は、測っているものが違うこと——つまり validity です(図 2 の \(2\) 番目)。

この取りちがえが、この項目でいちばん多い失点です。

5. Categorising numerical data(数値データをカテゴリに区切る)

ここから、この項目の計算に近い部分です。

身長・点数・時間のような数値データを \(\chi^2\) にかけるには、まず区間に区切って、度数を数えられる形にします。区切ってできた \(1\) つ \(1\) つを class(階級)といいます(SL 4.2)。

区切り方は \(1\) 通りではありません。そこが問われます。

区切り方の \(3\) つの条件

表 6: 区切り方の条件
条件 中身
重ならない \(1\) つの値が、\(2\) つの class に入らない
もれがない どの値も、どこかの class に入る
期待度数が \(5\) より大きい これが、この項目の中心です
重要期待度数は \(5\) より大きく

class は、expected frequency(期待度数)がどれも \(5\) より大きくなるように選びます。

見るのは期待度数であって、observed frequency(観測度数)ではありません。 実際に \(2\) 人しかいない class でも、期待度数が \(8\) なら構いません。

\(5\) を下回る class があったら、隣とまとめます(次の節)。

なぜ \(5\) なのかは Why it works で説明します。

\(5\) 以下の class は、隣とまとめます

図 3: 両端の class を、隣とまとめます。

図 3 の左は、身長を \(8\) つの class に区切ったときの期待度数です。点線は期待度数 \(5\) の線です。両端の \(2\) つが \(3.41\) で、\(5\) を下回っています。

そこで、両端をそれぞれ隣とまとめます。

\[ 3.413 + 10.27 = 13.68, \qquad 10.27 + 3.413 = 13.68 \]

右がその結果です。class は \(8\) つから \(6\) つになり、どれも \(5\) を超えました。

警告まとめるのは、隣どうしだけです

いちばん下の class といちばん上の class をまとめてはいけません。区間としてつながっていないからです。

数値データの class には順序があります。 まとめてよいのは、その順序で隣り合っているものだけです。

ヒント両端は「未満」「以上」の形にします

図 3 の右では、いちばん下が under 16、いちばん上が 32 and over になっています。

normal distribution のような連続分布を当てはめるときは、この形が必要です。\(8\) より小さい値や \(40\) より大きい値にも、モデルは確率を与えているからです。両端を開いておけば、確率の合計がちょうど \(1\) になります。

区切り方を説明する

justify と問われたら、上の条件のどれを使ったかを書きます。型は決まっています。

試験ではこう書く

The classes do not overlap and cover all the data.

The two end classes had expected frequencies below \(5\), so each was combined with the class next to it.

All six remaining classes now have an expected frequency greater than \(5\).

(重ならず、もれもないこと。両端の期待度数が \(5\) 未満だったのでまとめたこと。まとめたあとは全部 \(5\) を超えていること——この \(3\) 点です。)

例題 3 The times, in minutes, taken by \(60\) students to complete a puzzle are to be tested against a proposed model using a \(\chi^2\) goodness of fit test. Under the model, the expected frequencies for six equal classes would be

表 7: Expected frequencies under the model
class \(0 \le t < 4\) \(4 \le t < 8\) \(8 \le t < 12\) \(12 \le t < 16\) \(16 \le t < 20\) \(t \ge 20\)
expected frequency \(3.1\) \(18.4\) \(21.7\) \(11.6\) \(4.2\) \(1.0\)

(a) State which classes must be combined, and give a reason.

(b) Write down the expected frequencies after combining.

(c) The model has no parameters estimated from the data. Write down the number of degrees of freedom.

(a) 第5節の条件を使います。\(5\) より大きくない class を探します。

\[ 3.1 \ (< 5), \qquad 4.2 \ (< 5), \qquad 1.0 \ (< 5) \]

\(3\) つあります。まとめるのは隣どうしだけでした(第5節)。

  • \(0 \le t < 4\)(\(3.1\))は、隣の \(4 \le t < 8\) とまとめます
  • \(16 \le t < 20\)(\(4.2\))と \(t \ge 20\)(\(1.0\))は隣どうしなので、この \(2\) つをまとめます。\(4.2 + 1.0 = 5.2\) で、\(5\) を超えます

試験ではこう書く

Combine \(0 \le t < 4\) with \(4 \le t < 8\), and combine \(16 \le t < 20\) with \(t \ge 20\).

Each of these classes has an expected frequency less than \(5\), and every class used in a \(\chi^2\) test must have an expected frequency greater than \(5\).

(どれをまとめるかと、その理由(期待度数が \(5\) 未満)を書いています。)

(b) 足します。

\[ 3.1 + 18.4 = 21.5, \qquad 4.2 + 1.0 = 5.2 \]

表 8: まとめたあと
class \(0 \le t < 8\) \(8 \le t < 12\) \(12 \le t < 16\) \(t \ge 16\)
expected frequency \(21.5\) \(21.7\) \(11.6\) \(5.2\)

検算。 \(21.5 + 21.7 + 11.6 + 5.2 = 60\) ✓ もとの合計と同じです。

全部 \(5\) を超えました ✓

(c) class は \(4\) つ、推定した母数は \(0\) 個です(式 1)。

\[ \nu = 4 - 1 - 0 = 3 \]

ノート解答例(答案用紙にはこう書く)

(a) Combine \(0 \le t < 4\) with \(4 \le t < 8\), and \(16 \le t < 20\) with \(t \ge 20\), because each has an expected frequency less than \(5\).

(b)

表 9: まとめたあと
class \(0 \le t < 8\) \(8 \le t < 12\) \(12 \le t < 16\) \(t \ge 16\)
\(E\) \(21.5\) \(21.7\) \(11.6\) \(5.2\)

(c) \(\nu = 4 - 1 - 0 = 3\)

ヒントまとめたあと、合計が変わっていないことを見てください

期待度数の合計は、いつもデータの個数(ここでは \(60\))です。まとめても、足し合わせているだけなので合計は変わりません。

\(60\) にならなかったら、足し間違いか、写し間違いです。\(5\) 秒の検算です。

6. Degrees of freedom with estimated parameters(母数を推定したときの自由度)

\(\chi^2\) goodness of fit(適合度検定)の degrees of freedom(自由度)は、SL ではいつも \(n-1\) でした。HL では、分布の parameter(母数)をデータから推定したとき、推定した数だけ自由度が減ります。

なお、試験では自由度は必ず \(1\) より大きくなります。これは HL でも同じで、\(\nu = 1\) になる問題は出ません。

この項目には公式集の欄がないので、次の式は自分で覚えておきます(形の意味は Why it works で説明します)。

\[ \nu = k - 1 - q \tag{1}\]

  • \(k\) … 検定に使う class の数(まとめたあとの数です)
  • \(q\) … データから推定した parameter(母数)の数
図 4: 自由度の数え方です。

図 4 は、第5節の例に当てはめたものです。\(8\) つを \(6\) つにまとめ、\(\mu\) と \(\sigma\) を推定したので \(\nu = 6 - 1 - 2 = 3\) です。

\(q\) は、どう数えるか

問題文が値を教えてくれたら \(0\)、データから計算したら \(1\) つにつき \(1\) です。

表 10: \(q\) の数え方
当てはめる分布 データから推定するもの \(q\)
割合が問題文で与えられている(サイコロが公平、\(2:3:5\) など) なし \(0\)
binomial \(B(n,\ p)\) で、\(p\) をデータから出す \(p\) \(1\)
Poisson(ポアソン分布)で、\(m\)(平均)をデータから出す \(m\) \(1\)
normal \(N(\mu,\ \sigma^{2})\) で、\(\mu\) と \(\sigma\) をデータから出す \(\mu\)、\(\sigma\) \(2\)
normal で、\(\mu\) と \(\sigma\) が問題文に書いてある なし \(0\)
警告最後の \(2\) 行を、見くらべてください

同じ normal でも、\(\mu\) と \(\sigma\) をどこから持ってきたかで \(q\) が変わります。

  • 「この工場の製品は \(N(50,\ 4)\) に従うと言われている。合うか」→ 与えられている → \(q = 0\)
  • 「このデータは normal に従うか」→ データから \(\mu\) と \(\sigma\) を出すしかない → \(q = 2\)

問題文に数が書いてあるかどうかを、先に確かめてください。

重要independence の自由度は、変わりません

SL 4.11 の \(\chi^2\) test for independence は、いままでどおり

\[ \nu = (r-1)(c-1) \]

です。\(r\) は行の数、\(c\) は列の数。式 1 を使うのは goodness of fit だけです。

(independence でも期待度数を推定してはいますが、その分はすでに \((r-1)(c-1)\) の形に織り込まれています。)

警告GOF では、自由度を自分で電卓に入れます

χ² GOF は Deg of Freedom を聞いてきます(SL 4.11 の GDC の節)。

電卓は、class をいくつまとめたかも、parameter を何個推定したかも知りません。 ここは自分で数えて入れるところです。

例 4 では、\(\nu\) を \(3\) にするか \(5\) にするかで、\(p\)-value が \(5\) 倍変わります。

例題 4 The heights, in centimetres, of \(150\) plants are shown in the table.

表 11: Heights of \(150\) plants
height \(h\) \(8 \le h < 12\) \(12 \le h < 16\) \(16 \le h < 20\) \(20 \le h < 24\) \(24 \le h < 28\) \(28 \le h < 32\) \(32 \le h < 36\) \(36 \le h < 40\)
frequency \(3\) \(7\) \(35\) \(30\) \(31\) \(34\) \(6\) \(4\)

Using mid-interval values, the mean of the data is \(24.0\) cm and the standard deviation is \(6.0\) cm.

A researcher wishes to test, at the \(5\%\) significance level, whether these heights can be modelled by a normal distribution.

(a) Find the expected frequencies under the normal model, treating the lowest class as “less than \(12\)” and the highest as “\(36\) or more”.

(b) State which classes must be combined, and justify your choice of categorisation.

(c) Find the number of degrees of freedom.

(d) Carry out the test and state your conclusion in context.

(a) 高さを表す random variable(確率変数)を \(H\) とします。\(\mu = 24.0\)、\(\sigma = 6.0\) の normal distribution で、各区間の確率を出します(SL 4.9)。それに \(150\) を掛けたものが期待度数です。

いちばん下は \(-\infty\) から \(12\)、いちばん上は \(36\) から \(\infty\) とします。そうしないと、確率の合計が \(1\) になりません(第5節)。

\[ P(H < 12) = 0.0228 \quad \Rightarrow \quad E = 150 \times 0.0228 = 3.413 \]

同じように残りも出します。

表 12: 期待度数(\(4\) 有効数字)
class \(< 12\) \(12\)–\(16\) \(16\)–\(20\) \(20\)–\(24\) \(24\)–\(28\) \(28\)–\(32\) \(32\)–\(36\) \(\ge 36\)
\(O\) \(3\) \(7\) \(35\) \(30\) \(31\) \(34\) \(6\) \(4\)
\(E\) \(3.413\) \(10.27\) \(24.19\) \(37.13\) \(37.13\) \(24.19\) \(10.27\) \(3.413\)

検算。 \(E\) の合計は \(150\) です ✓ \(O\) の合計も \(150\) ✓

(b) 両端が \(3.413\) で、\(5\) を下回っています(第5節)。それぞれ隣とまとめます。

\[ 3.413 + 10.27 = 13.68 \]

表 13: まとめたあと
class \(< 16\) \(16\)–\(20\) \(20\)–\(24\) \(24\)–\(28\) \(28\)–\(32\) \(\ge 32\)
\(O\) \(10\) \(35\) \(30\) \(31\) \(34\) \(10\)
\(E\) \(13.68\) \(24.19\) \(37.13\) \(37.13\) \(24.19\) \(13.68\)

検算。 まとめても合計は \(150\) のままです ✓

試験ではこう書く

The classes below \(12\) and \(36\) or more have expected frequencies of \(3.41\), which is less than \(5\), so each is combined with the class next to it.

The six remaining classes do not overlap, cover all the data, and every expected frequency is now greater than \(5\).

(両端の期待度数が \(5\) 未満なので隣とまとめたこと、まとめたあとは重なりもなく、もれもなく、全部 \(5\) を超えていること——第5節の \(3\) 点です。)

(c) class は \(6\) つ。データから推定した parameter は \(\mu\) と \(\sigma\) の \(2\) 個です。問題文が「平均は \(24.0\)、standard deviation(標準偏差)は \(6.0\)」と書いていますが、それはデータから計算した値であって、与えられたモデルの値ではありません(第6節)。

\[ \nu = 6 - 1 - 2 = 3 \]

(d) SL 4.11 の \(5\) ステップどおりに進めます。

\(H_0\): The heights can be modelled by a normal distribution.

\(H_1\): The heights cannot be modelled by a normal distribution.

\(\chi^2\) を組み立てます。

\[ \chi^2 = \frac{(10-13.68)^2}{13.68} + \frac{(35-24.19)^2}{24.19} + \frac{(30-37.13)^2}{37.13} + \cdots \]

\[ = 0.991 + 4.83 + 1.37 + 1.01 + 3.98 + 0.991 = 13.2 \]

\(\nu = 3\) を電卓に入れて(GDC 第2節)、

\[ p = 0.00429 \]

\(p < 0.05\) なので、\(H_0\) を reject します。

試験ではこう書く

\(\chi^2 = 13.2\), \(\nu = 3\), \(p = 0.00429\).

Since \(p < 0.05\), reject \(H_0\).

There is sufficient evidence at the \(5\%\) level that the heights of these plants are not well modelled by a normal distribution.

(\(p\) が \(0.05\) より小さいので \(H_0\) を棄却し、これらの植物の高さは normal distribution(正規分布)ではうまく表せない、という意味です。)

ノート解答例(答案用紙にはこう書く)

(a)

表 14: 期待度数
class \(< 12\) \(12\)–\(16\) \(16\)–\(20\) \(20\)–\(24\) \(24\)–\(28\) \(28\)–\(32\) \(32\)–\(36\) \(\ge 36\)
\(E\) \(3.413\) \(10.27\) \(24.19\) \(37.13\) \(37.13\) \(24.19\) \(10.27\) \(3.413\)

(b) The two end classes have \(E = 3.41 < 5\), so each is combined with its neighbour. All six remaining classes then have \(E > 5\).

表 15: まとめたあと
class \(< 16\) \(16\)–\(20\) \(20\)–\(24\) \(24\)–\(28\) \(28\)–\(32\) \(\ge 32\)
\(E\) \(13.68\) \(24.19\) \(37.13\) \(37.13\) \(24.19\) \(13.68\)

(c) \[ \nu = 6 - 1 - 2 = 3 \]

(d) \[ \chi^2 = 13.2, \qquad p = 0.00429 < 0.05 \]

Reject \(H_0\): there is sufficient evidence at the \(5\%\) level that the heights are not normally distributed.

警告自由度とまとめ方で、\(p\) が大きく変わります
表 16: 自由度で \(p\) が変わる
\(\nu\) どこを間違えたか \(\chi^2\) \(p\) \(5\%\) での結論
\(3\) 正しい \(13.2\) \(0.00429\) reject ✓
\(5\) まとめたが、\(-2\) を忘れた \(13.2\) \(0.0219\) reject(同じ結論だが \(p\) が \(5\) 倍)
\(7\) まとめなかった(\(\chi^2\) も変わる) \(14.1\) \(0.0486\) かろうじて reject

この問題では、\(5\%\) ならどれも reject になります。 ただし \(1\%\) で検定すると、正しい \(0.00429\) は reject、\(0.0486\) は reject しない——結論が分かれます。

\(p\) が significance level(有意水準)の近くに落ちる問題では、自由度の数え方が答えそのものを決めます。 そして、どれが正しいかは \(p\)-value を見ても分かりません。数える段階でしか防げません。

Why it works

ここで説明するのは \(2\) つです。なぜ推定するたびに自由度が \(1\) 減るのかと、なぜ期待度数が \(5\) より大きくないといけないのか。

なぜ、推定すると自由度が減るのか

「自由度」は、自由に決められる数がいくつあるかという意味です。

class が \(k\) 個あって、観測度数を \(O_1, O_2, \ldots, O_k\) とします。合計は \(n\) で決まっているので、

\[ O_1 + O_2 + \cdots + O_k = n \]

\(k-1\) 個まで自由に決めれば、最後の \(1\) 個は自動的に決まります。 これが \(-1\) の意味です。

つぎに、\(\mu\) をデータから推定したとします。推定するというのは、「モデルの平均が、データの平均と一致するように \(\mu\) を選ぶ」ということです。つまり

\[ (\text{モデルの平均}) = (\text{データの平均}) \]

という式が \(1\) 本増えます。\(\mu\) を自由に動かせなくなった、ということです。

厳密な理由は、この課程の範囲を越えます。 ただ、向きだけは上の \(2\) 行で見えます。IB では「データから決めた parameter \(1\) つにつき、自由度が \(1\) 減る」として使います。

\(\sigma\) も同じように推定すれば、さらに \(1\) つ減ります。だから normal では \(q = 2\) です。

\[ \nu = \underbrace{k}_{\text{class の数}} - \underbrace{1}_{\text{合計が $n$}} - \underbrace{q}_{\text{推定した母数}} \]

自由度が減ると、同じ \(\chi^2\) の値でも \(p\)-value が小さくなります。 推定した分だけモデルがデータに寄せてあるので、「ずれが小さくて当たり前」——その分、厳しく見るわけです。

なぜ、期待度数が \(5\) より大きくないといけないのか

\(\chi^2\) 統計量は

\[ \chi^2 = \sum \frac{(O - E)^2}{E} \]

でした(SL 4.11)。\(p\)-value は、この値が \(\chi^2\) 分布に従うとみなして出しています。

ところが、これは近似です。\(O\) は整数しか取れないとびとびの値なのに、\(\chi^2\) 分布はなめらかな曲線だからです。

\(E\) が小さいと、この近似がくずれます。理由は分母を見れば分かります。

  • \(E = 2\) のとき、\(O\) が \(1\) ずれるだけで \(\dfrac{1^2}{2} = 0.5\)

  • \(E = 20\) のとき、\(O\) が \(1\) ずれても \(\dfrac{1^2}{20} = 0.05\)

\(E\) が小さい class は、\(1\) 人ずれただけで、その項が大きく動きます。 そうなると、\(\chi^2\) の値のばらつき方が、なめらかな \(\chi^2\) 分布からずれてしまいます。

困るのは、電卓が返す \(p\)-value が当てにならなくなることです。棄却しやすくなるとはかぎらず、逆に棄却しにくくなることもあります。どちらに転ぶかは、表の形によります。

\(5\) という数字そのものに深い意味はありません。近似が実用に耐える目安として広く使われている値で、IB の試験もこの目安を使います。

Common errors

警告自由度から、推定した母数の分を引き忘れる

この項目でいちばん多い失点です。 SL では \(\nu = n-1\) でしたが、HL では 式 1 です。

the mean and standard deviation of the data という言葉が問題文にあったら、その \(2\) つはデータから推定したものです。\(q = 2\) になります。

警告まとめる前の class の数で、自由度を数える

\(k\) は「検定に使う class の数」です(第6節)。\(6\) つを \(4\) つにまとめたなら、\(k = 4\) です。

まとめたら、その場で \(k\) を書き直してください。

警告\(\mu\) と \(\sigma\) が与えられているのに、\(2\) を引く

逆の間違いです。問題文に数が書いてあれば、推定していません。 \(q = 0\) です(表 10)。

「どこから来た数か」を、そのつど確かめてください。

警告観測度数を見て、まとめるかどうかを決める

条件は expected frequency についてのものです(第5節)。観測度数が \(1\) でも、期待度数が \(8\) ならまとめません。

\(E\) の行を見てください。\(O\) の行ではありません。

警告隣り合っていない class をまとめる

いちばん下といちばん上をまとめると、区間としてつながらないものができます。

数値データの class には順序があります。まとめてよいのは隣どうしだけです(第5節)。

警告連続分布を当てはめるとき、両端を閉じたままにする

\(12 \le h < 16\) のままだと、\(12\) より小さい値の確率が抜けます。確率の合計が \(1\) にならず、期待度数の合計もデータの個数に合いません。

いちばん下は「未満」、いちばん上は「以上」にしてください(第5節)。合計が合うかどうかで、その場で気づけます。

警告reliability と validity を取りちがえる
  • reliability … もう一度測っても同じか
  • validity … 測りたいものを測っているか

いつも同じ値が出る、ずれた体重計は reliable ですが valid ではありません(図 2)。

「同じ結果が出たから正しい」とは書かないでください。

警告\(4\) つの test の名前を、中身なしで書く

test-retest とだけ書いても点になりません。何をするのかを \(1\) 行添えてください(第4節)。

Describe や Explain が付いていれば、なおさらです。

警告質問の直し方で、選択肢を作らない

\(\chi^2\) にかけるなら、答えはカテゴリでなければなりません(第3節)。

How would you rate the library? だけでは、まだ自由回答です。選択肢を並べるところまで書いてください。

警告選択肢が重なっている、またはもれている

0–10、10–20 は \(10\) がどちらか決まりません。0–9、10–19 とします。

上の端も、20 or more のように開いておく必要があります(第2節)。

Using your GDC (TI-Nspire CX II)

この項目で電卓が要るのは、期待度数を作るところと、検定を走らせるところの \(2\) か所です。

1. Expected frequencies from a normal distribution(正規分布の期待度数を作る)

区間ごとの確率は normCdf で出します(SL 4.9)。

menu → Statistics → Distributions → Normal Cdf

\(\mu = 24\)、\(\sigma = 6\) として、

  • \(\texttt{normCdf}\left(20,\ 24,\ 24,\ 6\right) \ \to \ 0.24751\)
  • \(\texttt{normCdf}\left(-9999,\ 12,\ 24,\ 6\right) \ \to \ 0.022750\)
  • \(\texttt{normCdf}\left(36,\ 9999,\ 24,\ 6\right) \ \to \ 0.022750\)

\(150\) を掛ければ期待度数です。

警告両端は \(\pm 9999\) を使ってください

normCdf(8, 12, 24, 6) と打つと、\(8\) より小さいぶんが抜けます。下端は \(-9999\)、上端は \(9999\) と入れてください。

検算。 期待度数を全部足して、データの個数になるかを見ます。合わなければ、両端の入れ方を間違えています。

2. Running a goodness of fit test(適合度検定を行う)

SL 4.11 と同じ手順です。Lists & Spreadsheet に \(2\) 列を作ります。

  • 列 A(obs)… まとめたあとの観測度数 \(10, 35, 30, 31, 34, 10\)
  • 列 B(exp)… まとめたあとの期待度数 \(13.68, 24.19, 37.13, 37.13, 24.19, 13.68\)
menu → Statistics → Stat Tests → χ² GOF

Deg of Freedom に、自分で数えた \(\nu\) を入れます。

重要電卓に入れるのは、まとめたあとのリストです

まとめる前の \(8\) 個を入れてしまうと、\(\chi^2\) の値も自由度も変わります(表 16)。

紙の上でまとめてから、その \(6\) 個だけを打ちこんでください。

3. Mean and standard deviation from a table(表から平均と標準偏差を出す)

例 4 のように階級と度数で与えられたときは、One-Variable Statistics を使います(SL 4.3)。

  • 列 A に mid-interval value(\(10, 14, 18, 22, 26, 30, 34, 38\))
  • 列 B に frequency(\(3, 7, 35, 30, 31, 34, 6, 4\))
menu → Statistics → Stat Calculations → One-Variable Statistics

Frequency List に列 B を指定するのを忘れないでください。\(\bar{x} = 24\)、\(\sigma_x = 6\) が返ります。

ノート使うのは \(\sigma_x\) のほうです

出力には \(s_x\) と \(\sigma_x\) が並びます。当てはめるモデルの \(\sigma\) は、データそのものの標準偏差から決めるので、\(\sigma_x\) を読みます(SL 4.3)。

そして、この \(2\) つを電卓から読んだ時点で、\(q = 2\) が確定します。

Exercises

1 A shop owner writes the following question for a customer survey.

How much do you usually spend here?

(a) Explain why this question is not precise.

(b) Write an improved version with four answer choices.

(a) “Usually” is not defined: it could mean each visit, each week or each month, so different customers will answer about different things and their answers cannot be compared.

(b) How much did you spend here today? Under $10 / $10 to under $20 / $20 to under $30 / $30 or more.

(a) usually と how much の両方があいまいです(第2節)。\(1\) 回あたりなのか、\(1\) か月あたりなのかが決まっていません。

試験ではこう書く

“Usually” does not say over what period, so one customer may answer for a single visit and another for a whole month.

The answers would not be comparable.

(b) 直すところは \(2\) つです。期間を決める(today)と、選択肢を出す(第2節)。

選択肢は、重ならず、もれがないようにします。Under $10、$10 to under $20、$20 to under $30、$30 or more なら、どの金額もちょうど \(1\) か所に入ります。

金額は整数とはかぎりません。 $10–$19、$20–$29 と書くと、$19.50 の人がどこにも入りません。連続な量では「◯以上、△未満」の形にしてください。

いちばん上を $30 or more と開いておくのも要点です。$30 to under $40 で止めると、\(40\) ドル使った人が入れません。

2 A researcher wants to know whether students at a large school prefer to study in the library or at home. She stands outside the library at lunchtime and asks the first \(50\) students who come out.

(a) State the sampling technique she has used.

(b) Explain why this method will produce biased data for her question.

(a) Convenience sampling.

(b) Everyone she asks has just been in the library, so students who prefer to study at home are much less likely to be included. The sample is not representative of all students at the school, and the proportion preferring the library will be overestimated.

(a) ここは SL 4.1 の復習です。「手近な人に聞く」なので convenience sampling です。

(b) ここが、この項目の考え方です。調べたい問いと、sample(標本)の取り方がかみ合っていません。

図書館から出てきた人は、すでに図書館を使うと決めた人です。家で勉強する生徒は、そもそも図書館の外を通りません。

試験ではこう書く

All the students asked have just used the library, so students who prefer to study at home are unlikely to be in the sample.

The sample is not representative, and the proportion who prefer the library will be too high.

Explain why なので、「かたよっている」だけでは足りません。 どちらの向きにかたよるか(図書館派が多く出る)まで書いてください。

3 A school wants to check the reliability of a new reading test.

(a) Describe the parallel forms method.

(b) Give one advantage of using parallel forms rather than test-retest.

(a) Write two versions of the test that cover the same content and are of the same difficulty. Give both versions to the same students, and compare the two sets of scores. If they agree closely, the test is reliable.

(b) The students see different questions, so they cannot simply remember their earlier answers; this problem does affect the test-retest method.

(a) parallel forms は「同じ内容の別の問題を \(2\) 版作って、両方受けてもらう」でした(第4節)。

「同じ内容・同じ難しさ」という条件を落とさないでください。難しさが違えば、結果が違っても reliability を測ったことになりません。

試験ではこう書く

Write two versions of the test that cover the same content and are of the same difficulty.

Give both versions to the same students and compare the two sets of scores.

If the two sets agree closely, the test is reliable.

(b) test-retest の弱点は、\(2\) 回目に前の答えを覚えていることでした。別の問題ならそれが起きません。

試験ではこう書く

With parallel forms the students answer different questions, so their second set of scores cannot be improved simply by remembering their answers from the first test.

「\(1\) つ挙げなさい」なので、\(1\) つで足ります。その \(1\) つを、理由まで書いてください。

4 A driving school claims that its written test measures how safely a person will drive.

(a) State how criterion-related validity could be investigated for this test.

(b) The written test contains questions only about road signs. Explain what this suggests about the content validity of the test.

(a) Compare the written test scores with an accepted measure of safe driving, such as the number of accidents each driver has in the following year, or an examiner’s score from a practical driving test. Close agreement would support criterion-related validity.

(b) The content validity is low. Safe driving also involves speed control, awareness of other road users and reacting to hazards, but the test covers only road signs, so it does not cover the whole of what it claims to measure.

(a) criterion-related は「すでに信用されている別のものさしと比べる」でした(第4節)。

このテストが測ろうとしているのは「安全な運転」なので、比べる相手も安全な運転を測っているものでなければなりません。実技試験の点数や、その後の事故件数がそれにあたります。

筆記試験どうしを比べても意味がありません。 比べる相手を何にするかが、この設問の中身です。

試験ではこう書く

Compare the written test scores with an accepted measure of safe driving, such as an examiner’s score from a practical driving test, or the number of accidents each driver has in the following year.

Close agreement would support criterion-related validity.

(b) 標識だけでは、測りたいものの一部しかおおっていません(第4節)。

試験ではこう書く

Safe driving involves much more than knowing road signs, so a test made only of road-sign questions does not cover the whole of what it claims to measure.

Its content validity is low.

「reliable ではない」と書かないでください。 何度受けても同じ点が出るなら、このテストは reliable です。問題は validity です。

5 A questionnaire records, for each student: name, age in years, class, number of hours of sleep last night, favourite colour, distance from home to school, and score in a concentration test.

A researcher wants to test whether the number of hours of sleep is independent of the score in the concentration test.

(a) Write down the two variables that should be selected.

(b) Explain why these two variables must be put into classes before a \(\chi^2\) test for independence can be carried out.

(a) The number of hours of sleep last night, and the score in the concentration test.

(b) Both variables are numerical, so almost every student would have a different value and each cell of the table would contain only one or two students. A \(\chi^2\) test needs frequencies in categories, with expected frequencies greater than \(5\), so the values must first be grouped into classes.

(a) 立てた問いに直接かかわる変数だけを選びます(第3節)。名前・クラス・好きな色・距離・年齢は、この問いには関係しません。

「関係がありそうだから全部入れる」ではありません。

(b) ここがこの設問の中身です。\(\chi^2\) の表に入るのは度数でした。

睡眠時間を \(6.5\) 時間、\(7.25\) 時間……とそのまま使うと、ほとんどの生徒が別のマスに入ってしまいます。 \(1\) マスに \(1\) 人ずつでは、期待度数が \(5\) を超えません(第5節)。

試験ではこう書く

Both variables are numerical, so nearly every student would fall in a different cell and the expected frequencies would be far below \(5\).

Grouping the values into classes gives cells with enough students for the test to be valid.

6 In a \(\chi^2\) goodness of fit test with \(80\) observations, the expected frequencies for seven classes are

表 17: Expected frequencies for seven classes
class A B C D E F G
\(E\) \(2.4\) \(9.6\) \(21.0\) \(24.8\) \(14.2\) \(4.8\) \(3.2\)

(a) State which classes must be combined, and give a reason.

(b) Write down the number of classes used in the test.

(c) The model has one parameter estimated from the data. Find the number of degrees of freedom.

(a) Combine A with B, and combine F with G. Each of A, F and G has an expected frequency less than \(5\).

\[ 2.4 + 9.6 = 12.0, \qquad 4.8 + 3.2 = 8.0 \]

(b) \(5\)

(c) \[ \nu = 5 - 1 - 1 = 3 \]

(a) \(5\) より大きくないのは A(\(2.4\))、F(\(4.8\))、G(\(3.2\))の \(3\) つです。

  • A は端なので、隣の B とまとめます。\(2.4 + 9.6 = 12.0\) ✓
  • F と G は隣どうしなので、この \(2\) つでまとめます。\(4.8 + 3.2 = 8.0\) ✓

F を E とまとめる必要はありません。 F と G をまとめただけで \(5\) を超えるからです。必要な分だけまとめるのが原則です。

検算。 新しい期待度数は \(12.0,\ 21.0,\ 24.8,\ 14.2,\ 8.0\)。合計は \(80\) ✓

試験ではこう書く

Combine A with B, and combine F with G.

A, F and G each have an expected frequency less than \(5\), and every class used in a \(\chi^2\) test must have an expected frequency greater than \(5\).

(b) \(7\) つが \(5\) つになりました。

(c) 式 1 に \(k = 5\)、\(q = 1\) を入れます。

\[ \nu = 5 - 1 - 1 = 3 \]

\(k\) は「まとめたあと」の数です(第6節)。\(7\) を使うと \(\nu = 5\) になり、\(p\)-value が変わります。

7 For each of the following \(\chi^2\) tests, write down the number of degrees of freedom.

(a) A goodness of fit test with \(6\) classes, testing whether a die is fair.

(b) A goodness of fit test with \(8\) classes reduced to \(5\) after combining, fitting a normal distribution whose mean and standard deviation are calculated from the data.

(c) A goodness of fit test with \(7\) classes reduced to \(6\) after combining, fitting a Poisson distribution whose mean is calculated from the data.

(d) A test for independence on a \(3 \times 4\) contingency table.

(a) \(\nu = 6 - 1 = 5\)

(b) \(\nu = 5 - 1 - 2 = 2\)

(c) \(\nu = 6 - 1 - 1 = 4\)

(d) \(\nu = (3-1)(4-1) = 6\)

(a) 「公平」なら確率はどれも \(\frac{1}{6}\) と決まっています。 データから推定するものはありません。\(q = 0\) です。

(b) \(k = 5\)(まとめたあと)、\(q = 2\)(\(\mu\) と \(\sigma\))。

(c) \(k = 6\)(まとめたあと)、\(q = 1\)。Poisson の母数は \(m\) の \(1\) つだけです(公式集では \(X \sim \mathrm{Po}(m)\) と書かれます。AHL 4.17)。

(d) independence は 式 1 を使いません(第6節)。行が \(3\)、列が \(4\) なので \((3-1)(4-1) = 6\) です。

(a) と (d) は SL のままです。 変わるのは (b) と (c)、つまりデータから母数を推定したときだけです。

8 A factory takes \(200\) samples of four items each and records the number of defective items in each sample.

表 18: Defective items in \(200\) samples
number defective \(0\) \(1\) \(2\) \(3\) \(4\)
frequency \(81\) \(88\) \(26\) \(4\) \(1\)

It is proposed that the number of defective items follows a binomial distribution \(B(4,\ p)\).

(a) Show that the value of \(p\) estimated from the data is \(0.195\).

(b) The expected frequencies under this model are \(83.99\), \(81.38\), \(29.57\), \(4.775\) and \(0.2892\). State which classes must be combined, and give a reason.

(c) Find the number of degrees of freedom.

(d) Given that \(\chi^2 = 1.08\), find the \(p\)-value and state the conclusion at the \(5\%\) level.

(a) \[ \text{total defectives} = 0(81) + 1(88) + 2(26) + 3(4) + 4(1) = 156 \] \[ \text{total items} = 4 \times 200 = 800 \] \[ p = \frac{156}{800} = 0.195 \]

(b) Combine “\(3\)” with “\(4\)”: their expected frequencies are \(4.775\) and \(0.2892\), both less than \(5\). Together they give \(5.06 > 5\).

(c) \[ \nu = 4 - 1 - 1 = 2 \]

(d) \(p = 0.583 > 0.05\), so do not reject \(H_0\). There is insufficient evidence at the \(5\%\) level that the number of defective items does not follow a binomial distribution.

(a) \(p\) は「\(1\) 個が不良品である確率」です。不良品の総数を、品物の総数で割ります。

\(4\) 個ずつ \(200\) 組なので、品物は \(800\) 個。不良品は \(156\) 個。

\[ p = \frac{156}{800} = 0.195 \]

(b) \(5\) より大きくないのは \(3\)(\(4.775\))と \(4\)(\(0.2892\))です。隣どうしなので、この \(2\) つをまとめます。

\[ 4.775 + 0.2892 = 5.06 > 5 \quad ✓ \]

検算。 期待度数の合計は \(83.99 + 81.38 + 29.57 + 5.06 = 200\) ✓

試験ではこう書く

Combine “\(3\)” with “\(4\)”.

Their expected frequencies, \(4.775\) and \(0.2892\), are both less than \(5\); combined they give \(5.06\), which is greater than \(5\).

(c) \(k = 4\)(まとめたあと)、\(q = 1\)(\(p\) をデータから推定した)。

\[ \nu = 4 - 1 - 1 = 2 \]

この \(-1\) を忘れると \(\nu = 3\) になります。 (a) で \(p\) を計算したこと自体が、\(q = 1\) の証拠です。

(d) 電卓で \(\chi^2 = 1.08\)、\(\nu = 2\) の \(p\)-value を出します。\(0.583\) です。

(丸めていない \(\chi^2 = 1.0766\) から出すと \(0.584\) になります。問題文が \(1.08\) と与えているので、\(0.583\) で構いません。 どちらでも結論は同じです。)

\(p > 0.05\) なので reject しません。

試験ではこう書く

\(p = 0.583 > 0.05\), so do not reject \(H_0\).

There is insufficient evidence at the \(5\%\) level that the number of defective items in a sample of four does not follow a binomial distribution.

accept \(H_0\) とは書きません(SL 4.11)。「合っていると分かった」ではなく「合っていないとは言えない」です。

9 A student has \(30\) measurements of a continuous variable and wants to carry out a \(\chi^2\) goodness of fit test. She proposes to use \(10\) classes, chosen so that each class would have the same expected frequency.

(a) Find the expected frequency in each class under her proposal.

(b) Explain why her choice of categorisation is not appropriate.

(c) Find the greatest number of equally likely classes she could use.

(a) \[ \frac{30}{10} = 3 \]

(b) Each expected frequency would be \(3\), which is less than \(5\). Every class in a \(\chi^2\) test must have an expected frequency greater than \(5\), so this categorisation is not appropriate.

(c) \[ \frac{30}{k} > 5 \quad \Rightarrow \quad k < 6 \]

So the greatest number of equally likely classes is \(5\).

(a) 期待度数が等しいので、全体を階級の数で割るだけです。\(\dfrac{30}{10} = 3\)。

(b) \(3 < 5\) です(第5節)。

試験ではこう書く

With \(10\) equally likely classes each expected frequency is \(30 \div 10 = 3\), which is less than \(5\).

A \(\chi^2\) test requires every expected frequency to be greater than \(5\), so \(10\) classes is too many for only \(30\) measurements.

(c) 条件は \(\dfrac{30}{k} > 5\)、つまり \(k < 6\) です。\(k\) は整数なので、いちばん大きいのは \(5\) です。

警告\(k = 6\) は使えません

\(\dfrac{30}{6} = 5\) ちょうどです。条件は「\(5\) より大きい」(greater than 5)なので、ちょうど \(5\) では足りません。

不等号が \(>\) か \(\ge\) かで、答えが \(5\) か \(6\) かに分かれます。問題文の条件を、そのまま読んでください。

データが少ないほど、使える階級は少なくなります。 \(\chi^2\) で細かく区切れないのは、そのためです。

10 A student plans an Exploration on whether the time secondary students spend on social media is independent of their year group. She will collect data with an online questionnaire.

(a) Write a suitable structured question for measuring the time spent on social media.

(b) Explain how she could check the reliability of her questionnaire.

(c) She receives \(45\) responses and plans a \(3 \times 5\) contingency table. Comment on whether this table is appropriate.

(a) How many hours did you spend on social media yesterday? Under \(1\) / \(1\) to under \(2\) / \(2\) to under \(4\) / \(4\) or more.

(b) Use test-retest: ask the same students to complete the same questionnaire again after a short interval, and compare the two sets of answers. If most students give the same answers both times, the questionnaire is reliable.

(c) A \(3 \times 5\) table has \(15\) cells, so with \(45\) responses the average frequency per cell is only \(3\). Many expected frequencies would be less than \(5\), so the table is not appropriate. She should use fewer categories, for example a \(3 \times 2\) table (\(45 \div 6 = 7.5\) per cell), or collect more responses.

(a) 直すところは \(3\) つでした(第2節)。期間を決める(yesterday)、選択肢を出す、選択肢を重ねず、もれなく。

いちばん上を 4 or more と開いておくのを忘れないでください。

(b) reliability を確かめる方法は \(2\) つでした(第4節)。アンケートなら test-retest が自然です。parallel forms(別の版を作る)でも構いません。 選んだほうを説明してください。

試験ではこう書く

Use a test-retest method: ask the same students to complete the same questionnaire again after a short interval, and compare the two sets of answers.

If most students give the same answers both times, the questionnaire is reliable.

(c) ここがこの問題の中心です。

\[ 3 \times 5 = 15 \ \text{マス}, \qquad \frac{45}{15} = 3 \]

\(1\) マスあたり平均 \(3\) です。期待度数が \(5\) を超えるマスは、ほとんどありません(第5節)。

\(3 \times 3\) でも足りません。\(\dfrac{45}{9} = 5\) ちょうどで、greater than 5 をみたさないからです(演習 \(9\) と同じところです)。時間帯を \(2\) つに減らして \(3 \times 2\) にすれば、\(\dfrac{45}{6} = 7.5\) になります。

試験ではこう書く

The \(3 \times 5\) table has \(15\) cells but only \(45\) responses, so the average frequency per cell is \(3\).

Many expected frequencies would be below \(5\) and the \(\chi^2\) test would not be valid.

She should either combine categories to make a smaller table, such as \(3 \times 2\) with only two time bands, giving \(45 \div 6 = 7.5\) per cell, or collect more responses.

Comment on なので、「適切でない」だけでは足りません。 数で示し、どうすればよいかまで書いてください(第3節)。