SlideShare a Scribd company logo
1 of 14
Bootstrap Method
の勉強メモ
注:このスライドはブログ記事の一部として利用しています。
Webページデザインとは何の関係もありません。
統計分野でのBootstrapのスライドとなります
内容についての正確性は保証できかねますのでご了承ください
未知の母集団𝑃
?
𝑋1 𝑋2 𝑋3 ・・・ 𝑋n
n個の
ランダム
サンプリング
𝑀 = 𝑔(𝑋1, 𝑋2,, 𝑋3 ⋯ , 𝑋 𝑛)
𝑀: 推定したいパラメーター
ここで、母集団Pがどんな分布なのかは不明・・・
母集団𝑃
?
もし、母集団PからB回、ランダムサンプリングすることが
できたらこんな感じで推定が可能。
n個のRS
→ 𝑀1
n個のRS
→ 𝑀2
n個のRS
→ 𝑀 𝐵
・
・
・
平均
𝑚 =
1
𝐵
𝑗=1
𝐵
𝑀𝑗
分散
𝑠2 =
1
𝐵
𝑗=1
𝐵
(𝑀𝑗)2 −
1
𝐵
𝑗=1
𝐵
𝑀𝑗
2
平均
𝑚 =
1
𝐵
𝑗=1
𝐵
𝑀𝑗 →
𝑃
𝐸 𝑀
分散
𝑠2 =
1
𝐵
𝑗=1
𝐵
(𝑀𝑗)2 −
1
𝐵
𝑗=1
𝐵
𝑀𝑗
2
→
𝑃
𝑉𝑎𝑟(𝑀)
Bの数を無限に増やしていくと、Mの真の平均𝐸(𝑀)と、
真の分散𝑉𝑎𝑟 𝑀 の値となる
母集団𝑃
? ただし、現実は、母集団から無限に
ランダムサンプリングすることはできない。
手元のデータからなんとかしたい
そのためには
・Empirical Distribution Function
・Plug-in Estimator
の考え方が必要
手元の
データ
Empirical Distribution Function
𝐹 𝑥 =
1
𝑛
𝑖=1
𝑛
𝐼(𝑋𝑖 ≤ 𝑥)
𝐼はインジケーター関数
例:10個のランダムサンプルの結果が
{1,3,3,5,6,7,7,7,8,8}であれば 𝐹(𝑥)は、こん
な感じのグラフになる
𝐹 𝑥 =
0, 𝑥 < 1
0.1, 1 ≤ 𝑥 < 3
0.3, 3 ≤ 𝑥 < 5
⋯
1, 8 ≤ 𝑥
𝐹 4 =
1
10
𝑖=1
10
𝐼(𝑋𝑖 ≤ 𝑥)
=
1
10
𝐼 𝑋1 ≤ 4 + 𝐼 𝑋2 ≤ 4 + 𝐼 𝑋3 ≤ 4
+𝐼 𝑋4 ≤ 4 + 𝐼 𝑋5 ≤ 4 + 𝐼 𝑋6 ≤ 4
+𝐼 𝑋7 ≤ 4 + 𝐼 𝑋8 ≤ 4 + 𝐼 𝑋9 ≤ 4 + 𝐼 𝑋10 ≤ 4 )
=
1
10
𝐼 1 ≤ 4 + 𝐼 3 ≤ 4 + 𝐼 3 ≤ 4
+𝐼 5 ≤ 4 + 𝐼 6 ≤ 4 + 𝐼 7 ≤ 4
+𝐼 7 ≤ 4 + 𝐼 7 ≤ 4 + 𝐼 8 ≤ 4 + 𝐼 8 ≤ 4 )
=
1
10
1 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 = 0.3
x=4のとき
Statistical Functional
0.0
0.1
0.2
0.3
0.4
1 2 3 4 5
0.00
0.25
0.50
0.75
1.00
1 2 3 4 5
PMF:𝑝(𝑥)
𝑝 2 = 0.4
CDF:𝐹(𝑥)
𝑥 = 2
𝐹 2 = 0.6
𝐹 1 = 0.2
𝑑𝐹 𝑥
𝑑𝑥
= 0.4, 𝑖𝑓 𝑥 = 2
𝑑𝐹 𝑥
𝑑𝑥
= 𝑝(𝑥)
𝑑𝐹 𝑥 = 𝑝 𝑥 𝑑𝑥
とできる。
これは、連続値のPDFでも同様なので、
CDFの傾きとPMFの個別の値が一致する
ことを利用して、
𝐸 𝑋 = 𝑥 𝑑𝐹(𝑥) = 𝑥 𝑝 𝑥 𝑑𝑥 =
𝑥
𝑥 𝑝(𝑥)
Statistical Functional とは、推定したい
値をCDFを含んだ形とすること?で、
例えば、E(X)であれば、
Statistical Functional
𝑀 = 𝑔 𝐹 = 𝐸 𝑋 = 𝑥 𝑑𝐹(𝑥) = 𝑥 𝑝 𝑥 𝑑𝑥
𝑀 = 𝑔 𝐹 = 𝜎2
= 𝑥2
𝑑𝐹(𝑥) − 𝑥 𝐹 𝑥 𝑑𝑥
2
このように、平均や分散等、色々な統計的な推定したい値をF(x)を用いて表現可能。
Plug-in Estimator
母集団𝑃
?
手元の
データ
ここで、母集団からMを推定したい場合、Fの分布がわかっていれば、Mを推定できるが、
それがわからないので、𝐶𝐷𝐹: 𝐹(𝑥)の代わりに、𝐸𝐷𝐹: 𝐹(𝑥)を用いる!
𝑀は𝑀のplug-in estimator!
𝑀 = 𝑔(𝐹) 𝑀 = 𝑔( 𝐹)
𝐹 𝑥 =
1
𝑛
𝑖=1
𝑛
𝐼(𝑋𝑖 ≤ 𝑥)
まとめるt、EDF: 𝐹(𝑥)は、
𝐹 𝑥 =
0, 𝑥 < 1
0.1, 1 ≤ 𝑥 < 3
0.3, 3 ≤ 𝑥 < 5
⋯
1, 8 ≤ 𝑥
その、PMF(𝑓(𝑥))は、
𝑓 𝑥 =
1
𝑛
, 𝑥 ∈ {𝑥1, 𝑥2, ⋯ 𝑥 𝑛}
𝑀 = 𝑔 𝐹 = 𝑟 𝑥 𝑑 𝐹(𝑥) = 𝑟 𝑥 𝑓 𝑥 𝑑𝑥 =
1
𝑛
𝑖=1
𝑛
𝑟(𝑥)
𝑑𝐹 𝑥
𝑑𝑥
= 𝑓(𝑥)
なので、
𝑀 =
1
𝑛
𝑖=1
𝑛
𝑟(𝑥)
分散を求めてみると
𝑀 = 𝑔 𝐹 = 𝜎2
= 𝑥2 𝑑 𝐹 (𝑥) − 𝑥 𝐹 𝑥 𝑑𝑥
2
= 𝑥2
𝑓 𝑥 𝑑𝑥 − 𝑥𝑓 𝑥 𝑑𝑥
2
=
1
𝑛
𝑖=1
𝑛
𝑥2
−
1
𝑛
𝑖=1
𝑛
𝑥
2
と、EDFから 𝑀を求めることは比較的簡単!
ここで、この 𝑀の分散を求める場合は、
母
集
団
?
→ 𝑀1
n個のRS
→ 𝑀2
→ 𝑀 𝐵
・
・
・
平均
𝐸[ 𝑀] =
1
𝐵
𝑗=1
𝐵
𝑀𝑗
分散
𝑉𝑎𝑟( 𝑀) =
1
𝐵
𝑗=1
𝐵
( 𝑀𝑗)2
−
1
𝐵
𝑗=1
𝐵
𝑀𝑗
2
手
元
の
デ
ー
タ
RS
とすることで求めることができる
分布:𝐹
分布: 𝐹
ここで、ブートストラップで推定した𝑉𝑎𝑟( 𝑀)が母集団のMの分散と一致するためには何が必要かを考えると、
母
集
団
?
→ 𝑀1
n個のRS
→ 𝑀2
→ 𝑀 𝐵
・
・
・
平均
𝐸[ 𝑀] =
1
𝐵
𝑗=1
𝐵
𝑀𝑗
分散
𝑉𝑎𝑟( 𝑀) =
1
𝐵
𝑗=1
𝐵
( 𝑀𝑗)2
−
1
𝐵
𝑗=1
𝐵
𝑀𝑗
2
手
元
の
デ
ー
タ
RS
分布:𝐹
分布: 𝐹
仮定1
仮定2
𝑉𝑎𝑟( 𝑀) =
1
𝐵
𝑗=1
𝐵
( 𝑀𝑗)2
−
1
𝐵
𝑗=1
𝐵
𝑀𝑗
2
分布:𝐹 分布: 𝐹
仮定1
仮定2
仮定1:
母集団の分布のCDF(𝐹)と手元のデータのEDF( 𝐹)が近似できること
また、
分散を求める関数がSmoothness Conditionを満たしていること(微分可能なこと)
𝑉𝑎𝑟(𝑀; 𝐹) 𝑉𝑎𝑟( 𝑀; 𝐹)
仮定2:
𝑉𝑎𝑟 𝑀 と𝑉𝑎𝑟( 𝑀; 𝐹)が近似できること
・CDFとEDFが近似できるかどうかはわからないものの、データ数が十分に多ければ
ある程度近似できる?
・微分可能な条件等については、調べきれていないが、分散は問題なしとのこと。
・ここの近似は、Bの数を大きくすること(サンプリング回数を大きくする)こと
で、問題はなさそう。

More Related Content

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
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
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
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...
 

Bootstrap methodの勉強メモ