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
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
ロボティクスの技術 / Robotics Technology
ks91
PRO
0
14
インシデントレスポンス演習 I / Incident Response Exercise I
ks91
PRO
0
22
責任 2.0/3.0 ∼ 知的創造過程の脱領土化 / Responsibility 2.0/3.0 - The Deterritorialization of the Intellectual Creative Process
ks91
PRO
0
9
エージェント化するAI:現在地とその先に起きる変化 〜 おかわり / AI as Agents: The Current State and the Changes Ahead - a second helping
ks91
PRO
0
27
金融テクノロジーのガバナンス / Governance of Financial Technology
ks91
PRO
0
50
セキュリティの基礎とインシデントレスポンス / Security Fundamentals and Incident Response
ks91
PRO
0
87
やり抜く力を見せるエージェントたち / Agents Who Demonstrate Perseverance
ks91
PRO
0
35
ブロックチェーン / Blockchain
ks91
PRO
0
120
デジタルとコミュニケーション / Digital and Communication
ks91
PRO
0
53
Other Decks in Business
See All in Business
ITが何の略なのかも知らないままエンジニアになっちゃったのでインターネットに生き恥を晒してみた話
m_k__77
1
270
How SureSmile Clear Aligners Work Step-by-Step Guide for Beginners
burtonadvancedentalmi
0
140
アッテル会社紹介資料/culture deck
attelu
11
17k
kakaopiccoma_engineer_recruitingguide
kakaojapan
2
180
チームマネージャー(SV)のご紹介
rs_mitotakaya
0
220
2025年度「海の家プロジェクト」ピッチ資料
brush2026
0
240
開発時間2時間!gemma 4で動くローカルAIマルチエージェント構築(Python標準ライブラリ縛り)
hideyuki_ogawa
0
260
パーソルクロステクノロジー_グループソリューション本部のご紹介 / Introduction_of_gs
pxt_gs_ssol
0
3.4k
自分のハンドルを握る〜AI時代だからこそ求められるセルフマネジメントの技術/Self-Management Skills Needed More Than Ever in the AI Era
ikuodanaka
0
350
今日から始めるセルフマネジメント/A Practical Guide to Self-Management
ikuodanaka
1
470
AIで経理の仕事はどう変わるのか
shunsuke_takeuchi
PRO
0
350
VISASQ: ABOUT DEV TEAM
eikohashiba
6
44k
Featured
See All Featured
Optimising Largest Contentful Paint
csswizardry
37
3.7k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.5k
SEO for Brand Visibility & Recognition
aleyda
0
4.6k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.3k
The SEO Collaboration Effect
kristinabergwall1
1
480
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.5k
Amusing Abliteration
ianozsvald
1
200
Ruling the World: When Life Gets Gamed
codingconduct
0
250
Designing for Timeless Needs
cassininazir
1
250
Ethics towards AI in product and experience design
skipperchong
2
310
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
720
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
160
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