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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
florets1
July 11, 2024
Marketing & SEO
370
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
65
整数計画ソルバーで遊ぼう/using_an_integer_programming_solver_in_r
florets1
0
47
データ分析をはじめよう/lets_start_data_analysis
florets1
2
1.1k
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
860
Tableauとggplot2の背景/Background_of_Tableau_and_ggplot2
florets1
0
100
Rで学ぶデータハンドリング入門/Introduction_to_Data_Handling_with_R
florets1
0
170
人工知能はクロスジョインでできている/AI_Is_Built_on_Cross_Joins
florets1
0
140
仮説の取扱説明書/User_Guide_to_a_Hypothesis
florets1
4
500
複式簿記から純資産を排除する/eliminate_net_assets_from_double-entry_bookkeeping
florets1
1
530
Other Decks in Marketing & SEO
See All in Marketing & SEO
Web 2.0 Backlinks Not Indexed: Platform Rules That Kill Them
speedyindexteam
PRO
1
840
The Art of Disruption - Mark Perkins
ewraith
0
750
The Death of a PPC Purist - Hero Conf UK - April 2026 - Chris Ridley
c_j_ridley
0
180
The State of Search: SEO and AI for B2B SaaS Founders
aleyda
0
210
Lean Content: Content Creation For Tiny Teams
portentint
PRO
1
120
How to Use MCP Servers for SEO: Practical Use Cases
pelogia
0
860
Industrial context graphs
venkatapagadala1
1
220
国境を越えて大ウケ!「会議脱出ボタン」LTの裏側とスライドの哲学
kizawa2020
1
120
Anatomy of an AI Shopping Answer - BrightonSEO San Diego
metehanyesilyurt
0
470
Unlocking the Potential of Vector Embeddings
athenseo
PRO
0
190
Building a Creative Culture that Works For Different Personalities (and in Different Locations)
richardpaul22
0
360
SEO чек-лист для ускорения индексации молодого сайта
speedyindexteam
PRO
0
200
Featured
See All Featured
KATA
mclloyd
PRO
35
16k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.9k
We Are The Robots
honzajavorek
0
380
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
470
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
340
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
The Spectacular Lies of Maps
axbom
PRO
1
1.1k
Design in an AI World
tapps
1
340
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
3.2k
WCS-LA-2024
lcolladotor
0
840
Testing 201, or: Great Expectations
jmmastey
46
8.3k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
490
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回やったら→多重検定 二項分布の多クラス拡張である多項分布で検定すれば→流行ってない 二項分布を正規分布で近似して、標準正規分布の二乗和が従う分布(カイ二乗分布) を使って検定する どのパラメーターが偏っているか個別にはわからないが、サイコロが偏っていること はわかる