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
Kenji Saito
PRO
January 21, 2024
Business
0
100
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
グリーンマイニングが Bitcoin プロトコルに及ぼす影響 / Impact of Green Mining on the Bitcoin Protocol
ks91
PRO
0
18
FinTech 13-14 : Ideathon, Presentations and Conclusions
ks91
PRO
0
22
デザイン相談会 / Design Consultation
ks91
PRO
0
13
FinTech 11-12 : Cyber-Physical Society and Future of Finance
ks91
PRO
0
49
メタ自然選択と製品トレーサビリティー / Meta-Natural Selection and Product Traceability
ks91
PRO
0
8
伝統的金融に呑まれる分散型金融 / Decentralised Finance Engulfed by Traditional Finance
ks91
PRO
0
15
ウェブサービスデザイン 2 / Web Service Design 2
ks91
PRO
0
24
生成AI による論文執筆サポートの手引き(ワークショップ) / A guide to supporting dissertation writing with generative AI (workshop)
ks91
PRO
0
250
FinTech 9-10: Smart Contracts and Decentralized Finance
ks91
PRO
0
62
Other Decks in Business
See All in Business
新卒エンジニア向け会社紹介資料/newgraduates-engineer
nextbeat
2
1.6k
enechain company deck
enechain
PRO
7
90k
SmartBank - Recruiting Deck
smartbank
10
200k
Ampersand Company Profile
cuebicventures
PRO
0
230
Recruiting Deck_株式会社HACHI
hachi_hiring
1
530
株式会社BFT 会社紹介資料|エンジニア&セールス職向け
bft_recruit
2
11k
パレットクラウド株式会社 採用ピッチ資料
palettecloud
0
5.5k
Startup CTO of the year 2024 株式会社ハイヤールー
kkosukeee
0
3.6k
HERBEST_about service
beat
0
630
【DearOne】Dear Newest Member
hrm
2
6k
Arches 会社説明資料/ HR Deck
arches0501
0
7.5k
Firework Japan Corporate Deck 2024/11
steven11
0
180
Featured
See All Featured
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
0
89
Designing for humans not robots
tammielis
250
25k
Rails Girls Zürich Keynote
gr2m
94
13k
For a Future-Friendly Web
brad_frost
175
9.4k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
Being A Developer After 40
akosma
86
590k
Typedesign – Prime Four
hannesfritz
40
2.4k
A Tale of Four Properties
chriscoyier
156
23k
Building Your Own Lightsaber
phodgson
103
6.1k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
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