Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
カイ二乗検定との遭遇/The_path_to_encountering_the_chi-squ...
Search
florets1
July 11, 2024
Marketing & SEO
380
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
カイ二乗検定との遭遇/The_path_to_encountering_the_chi-square_test
florets1
July 11, 2024
More Decks by florets1
See All by florets1
Rでドレミ/Do-Re-Mi_with_R
florets1
0
130
整数計画ソルバーで遊ぼう/using_an_integer_programming_solver_in_r
florets1
0
54
データ分析をはじめよう/lets_start_data_analysis
florets1
2
1.1k
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
870
Tableauとggplot2の背景/Background_of_Tableau_and_ggplot2
florets1
0
110
Rで学ぶデータハンドリング入門/Introduction_to_Data_Handling_with_R
florets1
0
180
人工知能はクロスジョインでできている/AI_Is_Built_on_Cross_Joins
florets1
0
140
仮説の取扱説明書/User_Guide_to_a_Hypothesis
florets1
4
510
複式簿記から純資産を排除する/eliminate_net_assets_from_double-entry_bookkeeping
florets1
1
530
Other Decks in Marketing & SEO
See All in Marketing & SEO
Industrial context graphs
venkatapagadala1
1
310
6 KI-Analysen mit über 1 Million Produkten Was KI in Produktdaten sieht, was wir übersehen - AI:CAN
kevinki
0
200
Winning organic in 2026_ A framework for surviving Google’s AI era
aleyda
0
660
AI Search Is Driving Revenue: What Winning Brands Do Differently
samanyougarg
1
740
Who owns AI visibility and who gets the budget?
decabbit
0
140
The New Playbook for GEO/SEO Content in 2026 - Digital Summit Denver 26
zjchahalis
0
140
What’s moving the needle in Ecommerce SEO & AI Search in 2026
aleyda
0
750
Страница просканирована, но не проиндексирована: 10 причин и что делать
speedyindexteam
PRO
0
320
The Death Of Traffic: Building Revenue-Focused SEO In A Zero-Click World
alexgalinos
0
260
The Hidden Psychology of Marketing: Strange Phenomenons That Secretly Influence Consumer Buying Decisions
gurzu
0
120
What gets cited and clicked in AI Answers Today... and what should we do about it? - Masters of Search
aleyda
0
220
Free SEO Tools for Indexing Issues: A 2026 Field Manual
speedyindexteam
PRO
0
180
Featured
See All Featured
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
A Soul's Torment
seathinner
8
3.8k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
530
We Are The Robots
honzajavorek
0
400
New Earth Scene 8
popppiees
4
2.7k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
Everyday Curiosity
cassininazir
0
360
Thoughts on Productivity
jonyablonski
76
5.4k
Raft: Consensus for Rubyists
vanstee
142
7.8k
The Curious Case for Waylosing
cassininazir
1
570
The SEO Collaboration Effect
kristinabergwall1
1
600
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.8k
Transcript
1 2024.07.13 Tokyo.R #114 カイ二乗検定との遭遇
2 コインが偏ってないか調べる(1) 確率𝑝で表が出るコインを𝑛回投げる。 表が出る回数は二項分布𝐵(𝑛, 𝑝) に従う 分布の形状はパラメーターによって変化する B(10, 0.8) B(10,
0.5)
3 コインが偏ってないか調べる(2) パラメーターは確率分布ではない流儀 0.5 p パラメーター𝑝は0.5に近いのか それとも遠いのか、なんとも言 えない。 パラメーターは確率分布だとする流儀 0.5
パラメーター𝑝は0.5に近いのか それとも遠いのか、分布の形状 から判断できる。 二項分布𝐵(𝑛, 𝑝) のパラメーター𝑝 に注目 p
4 コインが偏ってないか調べる(3) 実際に観測された値、もしくはそれよりも極端な値が観測される確率(P値)を求めて… パラメーターは確率分布ではない流儀では仮説検定を行う 例えば二項検定
5 サイコロが偏ってないか調べる(1) サイコロの1の目が出る回数の確率は二項分布に従う 分布の形状はパラメーターによって変化する B(n=10, p=1/6)
6 サイコロが偏ってないか調べる(2) パラメーターは確率分布だとする流儀 1/6 パラメーター𝑝は1/6に近いのか それとも遠いのか、分布の形状 から判断できる。 6個のパラメーターそれぞれに ついて、1/6に近いのか遠いのか 判断してやればよい。
p
パラメーター𝑝は1/6に近いのか それとも遠いのか、なんとも言 えない。 7 サイコロが偏ってないか調べる(3) パラメーターは確率分布ではない流儀 1/6 6個のパラメーターそれぞれに ついて、1/6に近いのか遠いのか 仮説検定をすればよい。
p
8 サイコロが偏ってないか調べる(4) パラメーターは確率分布ではない流儀 6個のパラメーターそれぞれに ついて、1/6に近いのか遠いのか 仮説検定をすればよい。 多重検定
9 サイコロが偏ってないか調べる(5) 多重検定やりたくないなあ ではどうするか 素直に考えたら 多項分布を使って検定すればよさそう 多項分布は二項分布を多クラスに拡張した分布だから しかし、なぜかこの手法は流行っていないようだ 実際に流行ってるのはカイ二乗検定
10 カイ二乗分布とは 標準正規分布の二乗和の分布
11 二項分布からカイ二乗分布へ nが十分に大きいとき、二項分布𝐵(𝑛, 𝑝) は 正規分布𝑁(𝑛𝑝, 𝑛𝑝 1 − 𝑝
) で近似できる。 確率変数𝑋が二項分布𝐵(𝑛, 𝑝)に従うとき 𝑋−𝑛𝑝 𝑛𝑝(1−𝑝) は近似的に標準正規分布に従う。 標準正規分布の二乗和はカイ二乗分布 𝜒2 = (𝑋 − 𝑛𝑝)2 𝑛𝑝(1 − 𝑝)
12 カイ二乗検定とは サイコロの目 1 2 3 4 5 6 合計
実測値 24 20 18 19 17 22 120 理論値 20 20 20 20 20 20 120 ズレ (24 − 20)2 20 (20 − 20)2 20 (18 − 20)2 20 (19 − 20)2 20 (17 − 20)2 20 (22 − 20)2 20 (24 − 20)2 20 + (20 − 20)2 20 + (18 − 20)2 20 + (19 − 20)2 20 + (17 − 20)2 20 + (22 − 20)2 20 = 𝜒2 実測値と理論値のズレの和がカイ二乗分布に従っている ことを利用する検定
13 まとめ パラメーターは確率分布だとする 流儀は単純だと思う パラメーターの分布を見比べるだけ どのパラメーターが偏っているかも個別にわかる
14 まとめ パラメーターは確率分布ではない流儀は複雑だと思う パラメーター同士を直接比べてもが近いのか遠いのかなんとも言えない→仮説検定 二項分布に従う現象だから二項検定を6回やったら→多重検定 二項分布の多クラス拡張である多項分布で検定すれば→流行ってない 二項分布を正規分布で近似して、標準正規分布の二乗和が従う分布(カイ二乗分布) を使って検定する どのパラメーターが偏っているか個別にはわからないが、サイコロが偏っていること はわかる