SlideShare ist ein Scribd-Unternehmen logo
1 von 23
多重検定
1.統計的検定とは
2.多重検定の問題
3.補正手法
統計的検定とは
3
 検定(test)
基準に即して検品(試験)を行い, その合否や等級(=良し悪し)を認定す
ること
 例1. 学校のテスト
目的:生徒が優秀であるかどうかを認定する
指標:試験の点数
基準:60点
 例2. 工場の検査(SDTest)
目的:製品が良品であるかどうかを認定する
指標:スコア(超平面距離)
基準:訓練画像分布の3σ(α=0.0013)
 統計的検定(統計学的仮説検定):統計的パラメータに対して検定
 仮説:目標に対応するもの
 統計量:指標に対応するもの
 有意水準:基準に対応するもの
統計的検定とは
3
 帰無仮説と対立仮説
 帰無仮説:「否定されると期待される」仮説
統計量と基準値に差がないことを仮定することが多い
 対立仮説:帰無仮説が棄却されたときに採択される仮説
 仮説検定はある種のストーリー(正義vs悪?)
帰無仮説を仮定して話を進めていくとおかしいことが起こる
→帰無仮説が間違っている!
→対立仮説が正しかったんだ!
帰無仮説
対立仮説
統計的検定とは
3
 統計量の分布
 一般に統計量はある確率分布に従っている(そういう統計量を選ぶ)
 確率が低いこと(=めったにないこと)が起きる
→ 稀に起こることが今起こるなんておかしい!
→ 帰無仮説の棄却へ
 SDTestではスコアが正規分布に従うことを仮定している
例: 独立二群のt検定の統計量(t値)
𝑡 =
𝑥− 𝑦
1
𝑚
+
1
𝑛
𝜎
𝜎:推定分散
サンプル数m,nが大きければ
t値は正規分布に従う 正規分布
統計的検定とは
3
 工場の例を統計的検定の言葉で書き直すと…
 工場の検査
帰無仮説:製品が良品である (↔︎対立仮説:不良品である)
統計量:スコア(超平面距離), 正規分布を仮定
基準:訓練画像分布の3σ(α=0.0013)
この例の場合, 「製品が良品であるかどうかをスコアが正規分布に従
うことを仮定して有意水準0.0013で検定する」などと言う.
…つまりどういうこと?
どうやって判定するの?
基準ってどうやって決めるの?
有意水準って?
統計的検定とは
3
 判定の方法(図説します)
実際に得られた統計量からp値を計算し, その値が有意水準より小さい
時に帰無仮説を棄却する.
 p値:確率変数がある値以下(または以上)の値をとる確率
p値が小さい=めったに起こらない
 有意水準:判定に用いる閾値を定めるp値のこと(αと表す)
 有意水準は第1種の過誤をおかす確率と言い換えられる.
判定は必ずある程度の誤りを含む
帰無仮説を保留 対立仮説を採択
帰無仮説が真 正しい判定(TN) 第1種の過誤(FP)
帰無仮説が偽 第2種の過誤(FN) 正しい判定(TP)
統計的検定とは
3
 誤りの許容度合い
第1種の過誤と第2種の過誤はトレードオフの関係.
もし第2種の過誤(FN)を無くしたければ, 第1種の過誤が発生してしまう
のをある程度認めて検定せざるを得ない...
→ 第1種の過誤を許容する度合いが有意水準
 製造の現場では3σ(α=0.0013)がよく用いられる.
 検出力:1 - (第2種の過誤が起こる確率)
1に近いほど良い.
帰無仮説を保留 対立仮説を採択
帰無仮説が真 正しい判定(TN) 第1種の過誤(FP)
帰無仮説が偽 第2種の過誤(FN) 正しい判定(TP)
統計的検定とは
3
 判定の例(SDTest)
• 帰無仮説:対象は良品である
• 統計量:正規分布
• 有意水準0.05(下側検定)
p値が0.05となるスコアは-2.0で
あったとすると, 右図のように
判定が左右に分かれる.
 スコア:-3.5 (p値:0.011) の場合
p値<0.05 (p値が有意水準より低い) であるから,「良品である」という
帰無仮説が棄却され, 「不良品である」という対立仮説が採択される.
→ NG!
 スコア:1.5 (p値:0.641) の場合
p値>0.05 (p値が有意水準より高い)であるから, 「良品である」という
帰無仮説が棄却されずに保留され, 「不良品である」とは言えない.
→ OK!
p値
0.05
-3.5 1.5OK!NG!
統計的検定とは
3
まとめ
 統計的検定には, 仮説, 統計量, そして有意水準が必要
 確率分布からp値を求め, 有意水準を超えるか超えないかで判定する
 どんな判定にも必ずある程度の誤りを含む
多重検定の問題
3
 ちょっと休憩…
ここまでわかりましたか? 質問などどうぞ
 休憩ついでに確率のおはなし
Q. サイコロを1回投げて6が出る確率は?
Q. サイコロを3回投げて1回でも6が出る確率は?
Q. サイコロをn回投げて1回でも6が出る確率は?
多重検定の問題
3
 ちょっと休憩…
ここまでわかりましたか? 質問などどうぞ
 休憩ついでに確率のおはなし
Q. サイコロを1回投げて6が出る確率は?
A.
1
6
Q. サイコロを3回投げて1回でも6が出る確率は?
A. 1 −
5
6
3
=
91
216
Q. サイコロをN回投げて1回でも6が出る確率は?
A. 1 −
5
6
𝑁
多重検定の問題
3
 ここから統計のおはなし
Q. 有意水準0.1の検定を1回行ったとき, 第1種の過誤を起こす確率は?
A.
1
10
= 10%
Q.有意水準0.1の検定を3回行ったとき, 1度でも第1種の過誤を起こす確率
は?
A. 1 −
9
10
3
=
271
1000
= 27.1%
Q.有意水準0.1の検定をN回行ったとき, 1度でも第1種の過誤を起こす確率
は?
A. 1 −
9
10
𝑁
… Nが大きいとめちゃくちゃ大きい!困る!
(N=10で約65%, N=30で約95% 間違える)
(注. ここでは簡単の為, 全ての帰無仮説が真であるとしている.)
多重検定の問題
3
 多重検定
複数の帰無仮説について検定を行うことを多重検定という.
 それぞれ個別の検定の有意水準を定めても, 全体として1度でも第1種
の過誤を起こす確率は検定回数に対して指数関数的に増加する.
例. 𝑖回目の検定の帰無仮説𝐻 𝑖
が真のとき,
𝑃 𝑇 ≤ 𝑡 𝑖 ≤ 𝛼 𝑤ℎ𝑒𝑟𝑒 𝑇 ~ 𝑁 𝜇, 𝜎
となると𝐻 𝑖は誤って棄却され(第1種の過誤), その確率は𝛼に等しい.
𝑛0個の帰無仮説が真のとき, 1つでも第1種の過誤を起こす確率は
𝑃 𝑖{𝑇 ≤ 𝑡 𝑖} = 1 − 𝑃 𝑖 𝑇 > 𝑡 𝑖
各検定が互いに独立な時は
= 1 − 1 − 𝛼 𝑛0 ( ≫ 𝛼)
→ 第1種の過誤を抑える補正が必要
多重検定の問題
3
 真の帰無仮説 𝐻1, … , 𝐻 𝑛0 / 偽の帰無仮説 𝐻 𝑛0+1, … , 𝐻 𝑁
 帰無仮説の保留 𝐻0 / 棄却 𝐻1
 FWER(familywise error rate)
真の帰無仮説を1つでも誤って棄却する確率
𝐹𝑊𝐸𝑅 = 𝑃 𝑉 ≥ 1 = 𝑃(𝐻1
1
∪ ⋯ ∪ 𝐻1
𝑛0
)
 FDR(false discovery rate)
真の帰無仮説のうち誤って棄却するものの割合
FDR = 𝐸
𝑉
max 𝑅, 1
𝐻0 𝐻1
True: 𝐻1, … , 𝐻 𝑛0 𝑈 𝑉 𝑛0
False: 𝐻 𝑛0+1
, … , 𝐻 𝑁 𝑇 𝑆 𝑛1
𝑁 − 𝑅 𝑅 𝑁
補正手法
3
 補正の種類
 統計量の補正:LSD法, HSD法, Dunnet法, etc. (今回は扱わない)
 有意水準の補正:Bonfferoni法, Holm法, BH法, etc
統計量 に依存しない汎用的な手法
今回は後者の有意水準の補正のみ解説する.
 有意水準の補正はp値の補正とも言う(意味は同じ).
統計量 有意水準帰無仮説
𝐻: 𝑇~𝑁(𝜇, 𝜎) 𝑇 =
𝑥 − 𝑦
1
𝑚
+
1
𝑛
𝜎
𝛼
𝛼′補正有意水準
補正手法
 有意水準の補正
 FWERの調整
• Bonferroni法
• Holm法
 FDRの調整
• BH法
Carlo Emilio Bonferroni
(1892-1960)
Sture Holm
(1936-)
Yoav Benjamini
(1949-)
補正手法(FWER調整)
3
 Bonferroni法 (1936)
それぞれの検定の有意水準を𝛼から𝜶/𝑵に変更する方法.
検定総数が20ならば, 全ての有意水準を0.05/20 = 0.0025に変更する.
この手法によって全体としてFWERを𝛼に抑えられる.
非常に保守的にFWERを調整する為, 第2種の過誤が起こる可能性が高
くなる.
𝛼′ =
𝛼
𝑁
𝛼𝛼
𝑁
帰無仮説
𝐻1 𝐻2 … 𝐻 𝑖−1 𝐻 𝑖 𝐻 𝑖+1 … 𝐻 𝑁
↑ ↑ ↑ ↑ ↑ ↑
𝛼
𝑁
𝛼
𝑁
𝛼
𝑁
𝛼
𝑁
𝛼
𝑁
𝛼
𝑁
全て同じ補正有意水準で検定.
補正手法(FWER調整)
3
 Holm法 (1979)
全ての帰無仮説をp値の小さい順に並べ替え, 𝑖番目の有意水準を
𝛼(𝑖) =
𝛼
𝑁 − 𝑖 + 1
として𝑖 = 1から順に(p値の小さい順に)検定していく.
途中で帰無仮説が保留された時点でSTOP.
それよりp値が大きい帰無仮説は有意水準によらず保留する.
 Bonferroni法と同じくFWERを𝛼に
抑えられ, なおかつBonferroni法
よりも緩い検定.
帰無仮説 (𝑝(1) ≤ ⋯ ≤ 𝑝(𝑁))
𝐻(1) 𝐻(2) … 𝐻(𝑖−1) 𝐻(𝑖) 𝐻(𝑖+1) … 𝐻(𝑁)
↑ ↑ ↑ ↑ ↑ ↑
𝛼
𝑁
𝛼
𝑁−1
𝛼
𝑁−𝑖+2
𝛼
𝑁−𝑖+1
𝛼
𝑁−𝑖
𝛼
Bonferroni法とHolm法の比較の例
補正手法(FDR調整)
3
 BH法 (Benjamini & Hochberg法, 1995)
全ての帰無仮説をp値の小さい順に並べ替え, 𝑖番目の有意水準を
𝛼 𝑖
=
𝑖𝛼
𝑁
として𝑖 = 𝑁から順に(p値の大きい順に)検定していく.
途中で帰無仮説が棄却された時点でSTOP.
それよりp値が小さい帰無仮説は有意水準によらず棄却する.
FWERをある程度認め, FDRを𝛼に抑えることを目的に考案された.
補正有意水準の比較(𝛼 = 0.05, 𝑁 = 20)
帰無仮説 (𝑝(1) ≤ ⋯ ≤ 𝑝(𝑁))
𝐻(1)
𝐻(2)
… 𝐻(𝑖−1)
𝐻(𝑖)
𝐻(𝑖+1)
… 𝐻(𝑁)
↑ ↑ ↑ ↑ ↑ ↑
𝛼
𝑁
2𝛼
𝑁
(𝑖−1)𝛼
𝑁
𝑖𝛼
𝑁
(𝑖+1)𝛼
𝑁
𝛼
補正手法
3
まとめ
 全体として1度でも第1種の過誤を起こす確率(FWER)を制御するには,
各検定の有意水準をかなり低く補正する必要がある.
 手法:Bonferroni法, Holm法
 FWERの制御は非常に保守的であり, 第2種の過誤をかなり大きく許し
てしまっている.
 第1種の過誤を起こす割合(FDR)を制御する方法では, FWERの増加を少
し許してしまうものの, 第2種の過誤は小さく抑えられる.
 手法:BH法
 検定の目的にあった補正を考えましょう.
参考文献
3
• 「統計WEB」 https://bellcurve.jp/statistics/course/7797.html
• 「FDR の概説とそれを制御する多重検定法の比較」
https://www.jstage.jst.go.jp/article/jjb/29/2/29_2_125/_pdf
• 大阪大学大学院医学研究科腎臓内科 Clinical Journal Club
http://www.med.osaka-u.ac.jp/pub/kid/clinicaljournalclub1.html
• The false discovery rate (FDR) of multiple tests in a class room lecture
(Benditkis Julia, Heesen Philipp, Janssen Arnold 2018)
https://arxiv.org/pdf/1511.07050.pdf
• その他 Wikipediaなど
ありがとうございました.

Weitere ähnliche Inhalte

Empfohlen

Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 

Empfohlen (20)

Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 

RUTILEA社内勉強会第2回 「多重検定」