Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
R を用いた検定(補講) (2) — カイ二乗検定 / Other Tests Using R...
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Kenji Saito
PRO
January 21, 2024
Business
170
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
R を用いた検定(補講) (2) — カイ二乗検定 / Other Tests Using R (1) - Chi-Square Test
早稲田大学大学院経営管理研究科「企業データ分析」2023 冬のオンデマンド教材 第10回で使用したスライドです。
Kenji Saito
PRO
January 21, 2024
More Decks by Kenji Saito
See All by Kenji Saito
発表と総括 / Presentations and Summary
ks91
PRO
0
45
インシデントレスポンス演習II / Incident Response Exercise II
ks91
PRO
0
58
脱金融のフューチャー・デザイン / Future Design Beyond Finance
ks91
PRO
0
150
戦略と安全保障 / Strategy and Security
ks91
PRO
0
96
ローカル LLM とコンピューティングの脱領土化 / Local LLMs and Deterritorialization of Computing
ks91
PRO
0
23
サイバー戦の現在と未来 / The Present and Future of Cyber Warfare
ks91
PRO
0
80
金融の未来を考える / Thinking About the Future of Finance
ks91
PRO
0
180
AI Agentification: Current State and the Changes Ahead
ks91
PRO
0
51
サイバー攻撃・防御とサイバー法 / Cyber Attacks, Defense, and Cyber Law
ks91
PRO
0
110
Other Decks in Business
See All in Business
Copilotで資料を作るようになって仕事のやり方が変わった話
aonomasahiro
2
700
捨てる、という判断 — エンジニアの役割の変化に向き合うConference
appleworld
1
980
タスク分解も大事だけど、「文脈」を分解するのはもっと大事
masahagiwara
0
130
会社紹介資料/Idein株式会社 ※URLが変わりました
ideininc
0
63k
AI時代のリスク管理は どうあるべきか考えてみる
0air
0
220
[OptQC]Company_introduction_JP
optqc_recruit
0
160
現実は、会話から生まれる。〜 1on1とチームの場を繋ぐ、社会構成主義的実践 〜
emi0726
1
350
Miroom Company Deck
miroom
0
220
株式会社プロッセルテクノロジーズ会社紹介
tom1214
0
280
JBUG福岡#22_登壇資料_「伝えたはず」を「伝わる」に変える実践TIPS
webnaut
0
220
成功を追わない起業と経営 〜環境や立場を活かす戦略(Homing 2026)
kuranuki
2
720
どこまでを引き受けるのか — 変わり続ける役割と、変わらない思考法 / How Much We Take On — Evolving Roles and Enduring Ways of Thinking
nrslib
2
1.1k
Featured
See All Featured
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.9k
How GitHub (no longer) Works
holman
316
150k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
260
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
65
56k
Visualization
eitanlees
152
17k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.6k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
760
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.4k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
260
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
340
Transcript
generated by Stable Diffusion XL v1.0 2023 10 R (
) (2) — χ2 (WBS) 2023 10 R ( ) (2) — χ 2 — 2024-01 – p.1/14
https://speakerdeck.com/ks91/collections/corporate-data-analysis-2023-winter 2023 10 R ( ) (2) — χ 2
— 2024-01 – p.2/14
( 20 ) 1 • 2 R • 3 •
4 • 5 • 6 ( ) • 7 (1) • 8 (2) • 9 R ( ) (1) — Welch • 10 R ( ) (2) — χ2 • 11 R ( ) (1) — 12 R ( ) (2) — 13 GPT-4 14 GPT-4 15 ( ) LaTeX Overleaf 8 (12/21 ) / (2 ) OK / 2023 10 R ( ) (2) — χ 2 — 2024-01 – p.3/14
χ2 : : ( ) 3 ( ) 2023 10
R ( ) (2) — χ 2 — 2024-01 – p.4/14
χ2 ( ) ( ) ( ) χ2 = n
i=1 (fi − ˆ fi )2 ˆ fi ( f (frequency) ˆ f ( )) χ2 df df = n − 1 χ2 = nj j=1 ni i=1 (fji − ˆ fji )2 ˆ fji (ni × nj ) df = (ni − 1) × (nj − 1) 2023 10 R ( ) (2) — χ 2 — 2024-01 – p.5/14
R 10 4 14 2 4 6 12 8 20
= × ( 12:8 14 ) 8.4 5.6 14 3.6 2.4 6 12 8 20 2023 10 R ( ) (2) — χ 2 — 2024-01 – p.6/14
χ2 ( ) 1 6 (H0 ) # ( H_0
) > chisq.test(c(28, 33, 25, 35, 27, 32), p=c(1/6, 1/6, 1/6, 1/6, 1/6, 1/6)) # ( H_0 ) > chisq.test(c(42, 33, 25, 35, 27, 18), p=c(1/6, 1/6, 1/6, 1/6, 1/6, 1/6)) ‘chisq.test(. . . )’ ( ) ( ) ( ) ← R χ2 2023 10 R ( ) (2) — χ 2 — 2024-01 – p.7/14
( ) 0 5 10 15 20 0.00 0.05 0.10
0.15 χ2(5) x dchisq(x, df) χ2 0.05 (5) = 11.1 χ2 = 2.53 “ .R” source chisqdistg(5, chisq=2.5333) 2023 10 R ( ) (2) — χ 2 — 2024-01 – p.8/14
( ) 0 5 10 15 20 0.00 0.05 0.10
0.15 χ2(5) x dchisq(x, df) χ2 0.05 (5) = 11.1 χ2 = 11.9 chisqdistg(5, chisq=11.867) 2023 10 R ( ) (2) — χ 2 — 2024-01 – p.9/14
χ2 (1) R A 16 4 20 12 8 20
28 12 40 options(digits=7) # A <- matrix(c(16, 12, 4, 8), 2, 2) chisq.test(A, correct=F) 2023 10 R ( ) (2) — χ 2 — 2024-01 – p.10/14
0 5 10 15 20 0.0 0.2 0.4 0.6 0.8
χ2(1) x dchisq(x, df) χ2 0.05 (1) = 3.84 χ2 = 1.9 options(digits=3) chisqdistg(1, chisq=1.9048) 2023 10 R ( ) (2) — χ 2 — 2024-01 – p.11/14
χ2 (2) B 160 40 200 120 80 200 280
120 400 options(digits=7) # B <- matrix(c(160, 120, 40, 80), 2, 2) chisq.test(B, correct=F) 2023 10 R ( ) (2) — χ 2 — 2024-01 – p.12/14
0 5 10 15 20 0.0 0.2 0.4 0.6 0.8
χ2(1) x dchisq(x, df) χ2 0.05 (1) = 3.84 χ2 = 19 options(digits=3) chisqdistg(1, chisq=19.048) 2023 10 R ( ) (2) — χ 2 — 2024-01 – p.13/14
2023 10 R ( ) (2) — χ 2 —
2024-01 – p.14/14