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 を用いた検定(補講) (1) — Welch 検定 / Other Tests Using...
Search
Kenji Saito
PRO
January 18, 2024
Business
0
95
R を用いた検定(補講) (1) — Welch 検定 / Other Tests Using R (1) - Welch Test
早稲田大学大学院経営管理研究科「企業データ分析」2023 冬のオンデマンド教材 第9回で使用したスライドです。
Kenji Saito
PRO
January 18, 2024
Tweet
Share
More Decks by Kenji Saito
See All by Kenji Saito
P 値と有意差/分散分析 / P-value, Significant Difference and Analysis of Variance
ks91
PRO
0
29
関連2群のt検定/独立2群のt検定 / Related 2-group t-test and independent 2-group t-test
ks91
PRO
0
51
A Guide to Paper Writing Support with Generative AI - A Joint Zemi
ks91
PRO
0
9
正規分布と簡単な統計理論/t分布と信頼区間 / Normal distribution, simple statistical theory, t-distribution and confidence intervals
ks91
PRO
0
43
じわじわ迫ってきている自動化社会 (その先にメタ・ネイチャー) / The Slowly Approaching Automated Society (and its beyond: Meta-Nature)
ks91
PRO
0
6
起こりうる誤った推論/平均・分散・標準偏差・自由度 / Possible false inferences, means, variances, standard deviations and degrees of freedom
ks91
PRO
0
59
LaTeX と Overleaf によるショートペーパー作成 / Short paper writing with LaTeX and Overleaf
ks91
PRO
0
23
R を用いた検定(補講) (1) — Welch 検定 / Tests using R (supplementary) (1) - Welch test
ks91
PRO
0
12
R を用いた検定(補講) (2) — カイ二乗検定 / Tests using R (supplementary) (2) - Chi-squared test
ks91
PRO
0
13
Other Decks in Business
See All in Business
コーポレートストーリー(新規投資家様向け会社説明資料)
gatechnologies
1
9.6k
株式会社EventHub 会社紹介資料
eventhub
1
31k
株式会社miibo|採用デック
natsumidnx
0
270
経験やセンスに頼らずに成果を出すためのチームマネジメント実践ガイド / Team Management Without Relying on Experience or Intuition
happy_imafuku
5
12k
ハードウェア企業から700万ユーザーを抱えるB2B SaaSへ:PMのキャリアシフトで見えた共通点とギャップ
kubell_hr
0
4.2k
会社紹介資料 / ProfileBook
gpol
4
26k
freee + Product Design FY24 Q2
freee
4
9.6k
AWS の生成 AI 最前線 : 顧客起点のイノベーション
icoxfog417
PRO
0
1.4k
仮説のマップ・ループ・リープ ~仮説思考のプロセスについて~
tumada
PRO
12
5.4k
ドローンを活用した汚泥焼却炉内点検のDX
tokyo_metropolitan_gov_digital_hr
1
370
Japan Open Chain ホワイトペーパー
gugroup
2
440
合議で決めたいわけではないけれど、 集合知で助けてほしい。_pmconf_2024
tomosooon
1
5.6k
Featured
See All Featured
How to Think Like a Performance Engineer
csswizardry
22
1.2k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
3
200
A better future with KSS
kneath
238
17k
Building Applications with DynamoDB
mza
92
6.1k
Into the Great Unknown - MozCon
thekraken
34
1.6k
GitHub's CSS Performance
jonrohan
1031
460k
StorybookのUI Testing Handbookを読んだ
zakiyama
28
5.4k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
33
2.7k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Building Adaptive Systems
keathley
38
2.3k
KATA
mclloyd
29
14k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Transcript
generated by Stable Diffusion XL v1.0 2023 9 R (
) (1) — Welch (WBS) 2023 9 R ( ) (1) — Welch — 2024-01 – p.1/10
https://speakerdeck.com/ks91/collections/corporate-data-analysis-2023-winter 2023 9 R ( ) (1) — Welch —
2024-01 – p.2/10
( 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 9 R ( ) (1) — Welch — 2024-01 – p.3/10
t Welch R t.test() Welch Welch 2023 9 R (
) (1) — Welch — 2024-01 – p.4/10
2 t ( ) (1/2) 2 ( ) xA −
xB (1) : (2) : σ ( ) σ sp sp = s2 A (nA − 1) + s2 B (nB − 1) nA + nB − 2 (R var() ) nA + nB − 2 t Welch A B (µA = µB ) A B (µA = µB ) 2023 9 R ( ) (1) — Welch — 2024-01 – p.5/10
2 t ( ) (2/2) xA − xB Student µA
= µB t = (xA − xB ) − (µA − µB ) sp 1 nA + 1 nB = xA − xB sp 1 nA + 1 nB (t ) t dfp = nA + nB − 2 t ( ) t0.05 (dfp ) t0.05 (dfp ) < |t| (P < 0.05) 2023 9 R ( ) (1) — Welch — 2024-01 – p.6/10
Welch t t = xA − xB s2 A nA
+ s2 B nB ( ) v . . . v ≈ ( s2 A nA + s2 B nB )2 s4 A n2 A (nA−1) + s4 B n2 B (nB−1) R 2023 9 R ( ) (1) — Welch — 2024-01 – p.7/10
( ) - (Shapiro-Wilk test) - (Anderson-Darling test for normality)
- (Kolmogorov-Smirnov test for normality) ( ) ( ) (Bartlett’s test for homogeneity of variances) 2023 9 R ( ) (1) — Welch — 2024-01 – p.8/10
.txt A /B g <- read.table(" .txt", header=T) colnames(g) <-
c(" ", " ") sampleA <- g$ sampleB <- g$ # ( ) shapiro.test(x=sampleA) shapiro.test(x=sampleB) # ( ) samples <- c(sampleA, sampleB) group_factor <- factor(rep(c("A", "B"), c(length(sampleA), length(sampleB)))) bartlett.test(formula=samples~group_factor) # Welch (t.test() ) ( Welch ) t.test(sampleA, sampleB) 2023 9 R ( ) (1) — Welch — 2024-01 – p.9/10
2023 9 R ( ) (1) — Welch — 2024-01
– p.10/10