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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Kenji Saito
PRO
January 21, 2024
Business
0
160
R を用いた検定(補講) (2) — カイ二乗検定 / Other Tests Using R (1) - Chi-Square Test
早稲田大学大学院経営管理研究科「企業データ分析」2023 冬のオンデマンド教材 第10回で使用したスライドです。
Kenji Saito
PRO
January 21, 2024
Tweet
Share
More Decks by Kenji Saito
See All by Kenji Saito
非営利組織の起業/発表と総括 / Starting up a Nonprofit Organization, Presentation and Summary
ks91
PRO
0
51
自己開発 / Self-Development
ks91
PRO
1
13
あなたは何によって憶えられたいですか? / What Do You Want to be Remembered for?
ks91
PRO
0
15
ボランティアと理事会 / Volunteers and Board of Directors
ks91
PRO
0
38
メタ・ネイチャーポジティブへの道 / The Path to Meta Nature Positive
ks91
PRO
0
31
アカデミーキャンプ2026 初春「ミライ、ゲーミファイ」DAY 3 / Academy Camp 2026 Early Spring "GAMIFY THE FUTURE!!" DAY 3
ks91
PRO
0
49
アカデミーキャンプ2026 初春「ミライ、ゲーミファイ」DAY 2 / Academy Camp 2026 Early Spring "GAMIFY THE FUTURE!!" DAY 2
ks91
PRO
0
83
アカデミーキャンプ2026 初春「ミライ、ゲーミファイ」DAY 1 / Academy Camp 2026 Early Spring "GAMIFY THE FUTURE!!" DAY 1
ks91
PRO
0
78
成果と意思決定 / Performance and Making Decisions
ks91
PRO
0
67
Other Decks in Business
See All in Business
プロダクトにAIを。 確率的なふるまいと向き合う。
sugitlab
1
340
それでも、変えていくーエンタープライズでビジネスと_開発をつなぐアジャイル奮闘記などから学んだAgile Leadership
junki
1
130
本気で解かれるべき 課題を創る(アジェンダ・セッティング)
hik0107
2
250
「要はバランス」を見極める - ADR実践で目指す技術的卓越への道 / It Depends: Practicing ADRs Toward Technical Excellence
ewa
0
1.8k
TAIAN Company Deck
taian
0
23k
ノッカリアドベントカレンダー全記録まとめ
szkm555
0
130
AI時代のPMに求められるマインドセット
kozotaira
1
190
会社紹介資料202601.pdf
gmofh_hr_team
0
1.4k
【27新卒セールス(FS・店舗)】BuySell Technologies会社紹介資料
buyselltechnologies
0
250k
エピックベース株式会社_会社概要資料_202601
takayoshimatsuda
PRO
1
440
採用ピッチ資料
s_kamada
0
260
キャリアコンサルティングの継続利用がキャリア自律に及ぼす効果の検証
techtekt
PRO
1
130
Featured
See All Featured
The Language of Interfaces
destraynor
162
26k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
Abbi's Birthday
coloredviolet
1
4.7k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
170
sira's awesome portfolio website redesign presentation
elsirapls
0
140
Optimizing for Happiness
mojombo
379
71k
A Tale of Four Properties
chriscoyier
162
24k
Thoughts on Productivity
jonyablonski
74
5k
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.1k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
55
Documentation Writing (for coders)
carmenintech
77
5.2k
New Earth Scene 8
popppiees
1
1.5k
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