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
160
0
Share
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
ルール・ロール・ツールを創る / Creating Rules, Roles and Tools
ks91
PRO
0
31
コーディング・エージェントの活用 / Using Coding Agents
ks91
PRO
0
26
AGI (Artificial General Intelligence) の論点 / Key Issues in AGI (Artificial General Intelligence)
ks91
PRO
0
22
ワールドカフェ再び、そしてゴール・ルール・ロール・ツール / World Café Revisited, and the Goals-Rules-Roles-Tools
ks91
PRO
0
180
AI の技術 / AI technology
ks91
PRO
0
84
対話による知の拡張と傾聴の理論 / Expansion of Knowledge Through Dialogue and the Theory of Active Listening
ks91
PRO
0
24
プロンプトに対する攻撃と防御 / Attacks and Defenses Against Prompts
ks91
PRO
0
19
AI 前提社会における(地球)環境データのセンシング / Sensing of (Global) Environmental Data in an AI-Driven Society
ks91
PRO
0
32
自然言語の扱いと翻訳のためのプロンプト / Handling Natural Language and Prompts for Translation
ks91
PRO
0
25
Other Decks in Business
See All in Business
市場特性に応じたマルチプロダクト戦略と持続的な成長を支える組織デザイン
play_inc
0
2.8k
営業職/新卒向け会社紹介資料(テックファーム株式会社)
techfirm
1
1.6k
malna-recruiting-pitch
malna
0
20k
2026_05_movus会社紹介資料
movustech
0
1.4k
涅槃へGO!〜わたしの世界は、全てわたしの認識でできている〜
doiko123
0
590
.nagoyaドメインから始めるドメイン管理_20260429
masakiokuda
0
470
株式会社アシスト_会社紹介資料
ashisuto_career
3
170k
株式会社ELYZA(イライザ) 採用情報資料 / RECRUIT PITCH
elyza
2
750k
Codexを安心して業務活用するには?──「権限・接続・実行」の考え方
hima2b4
0
160
何者かになる必要はあるのか?
kkb1016
0
230
子育てとキャリアのビルディングブロック
news_it_enj
2
200
YassLab (株) サービス紹介 / Introduction of YassLab
yasslab
PRO
3
42k
Featured
See All Featured
Un-Boring Meetings
codingconduct
0
290
How to Ace a Technical Interview
jacobian
281
24k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
Exploring anti-patterns in Rails
aemeredith
3
360
WENDY [Excerpt]
tessaabrams
10
37k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.1k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
230
30 Presentation Tips
portentint
PRO
1
290
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.5k
Crafting Experiences
bethany
1
150
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.4k
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