SlideShare ist ein Scribd-Unternehmen logo
1 von 18
Downloaden Sie, um offline zu lesen
twitterアカウント:@AsaKiriSun
第77回R勉強会@東京(#TokyoR)
2019/04/13
twitterアカウント:@AsaKiriSun
第77回R勉強会@東京(#TokyoR)
2019/04/13
1989年静岡生まれ。RGui派でベイズ派。
理論統計に関する話なら、だいたいしゃ
べれる気がする。最近一番申し訳なかっ
たことは、井之頭公園で一人手漕ぎボー
トをしたらカップルの船に激突したこと。
>個人サイト
AsaKiriSunの日記
トイレの見取り図です
(といれのみとりずです)
twitterアカウント:@AsaKiriSun
第77回R勉強会@東京(#TokyoR)
2019/04/13
統計の問題で使用頻度が正規分布の次に使用頻度が高い二項分布。
でも、みんな二項分布で prob ばかりもてはやしすぎじゃないだ
ろうか?もう一つのパラメーター size にもっと興味をもったって
いいじゃないか。
実際に、調べてみれば二項分布の size の推定に関する理論は存在
する。でも、微妙に惜しい感じなのだ。この惜しさをみなさんも
一緒に味わってほしい。
• 気になる
• 統計の勉強で一番最初に扱う
• データ例も豊富
• 理論研究山ほど
rbinom(n,size,prob) のprob のイメージ
• 興味がない
• 扱ってるのを見たことがない
• データ例もない
• 理論研究なさそう
• Rのパッケージもない。
rbinom(n,size,prob) のsize のイメージ
twitterアカウント:@AsaKiriSun
第77回R勉強会@東京(#TokyoR)
2019/04/13
みなさんの中の二項分布のパラメーターのイメージも大体似たよ
うなものじゃないだろうか。でも、これは我々がsizeに興味を
持っていないだけで、ちゃんと調べればsizeにも「これは !」と
愛したくなるポイントが出てくるはずである。
とりあえずsizeの推定手法の論文をあさってみることにした。
• モーメント法を利用した手法(1941)
• ベイズを使用した手法(1986)
• 順序統計量を使用した手法(2008)
rbinom(n,size,prob) のsizeの主要な推定手法
twitterアカウント:@AsaKiriSun
第77回R勉強会@東京(#TokyoR)
2019/04/13
3本だけ・・・?ちゃんと調べたのか?みなさんもそうお思いか
もしれない。でも、本当に見つからないのだ。ベイズを使用した
手法の引用数が100未満なのである。一通りみてそんな感じな
のだ。
気を取り直して今回は、理論も説明しやすいモーメント法を使用
した手法とベイズを使用した手法の2つを紹介していこう。
モーメント法を利用した手法
• 、
1940年代の手法だけあって式もシンプルだ。
実装もすぐすんだ。人間にやさしい。
うまく動くか数値シミュレーションしてみよう。
10000回シミュレーションしてみた
rbinom(n=10,size=200,prob=0.5) rbinom(n=10,size=200,prob=0.01)
twitterアカウント:@AsaKiriSun
第77回R勉強会@東京(#TokyoR)
2019/04/13
だめだ。
prob=0.5のときには、それなりにうまく推定できてるように見え
たが、prob=0.01にした途端size<0となるような推定値を返すよう
になってしまった。あと、とんでもなく大きな値も返す時もある。
他の論文をあたると、probが小さいと理論的に真の値に推定値に
収束しないことがあるらしい。あと、漸近分布も存在しないから
信頼区間も作れない。
気を取り直してベイズ手法で推定をしてみよう。
• 、
ベイズを利用した手法
上の式を与えたもとで事後期待値を使用するらしい。
ベイズを使うならそりゃそうなるだろう、という立式だ。
シンプル is ベスト。こういうのは大体うまくいくはず。
モーメント法と同じ条件でシミュレーションしてみよう。
1000回シミュレーションしてみた
rbinom(n=10,size=200,prob=0.5) rbinom(n=10,size=200,prob=0.01)
twitterアカウント:@AsaKiriSun
第77回R勉強会@東京(#TokyoR)
2019/04/13
悪くはないが、良くもない・・・
モーメント法のように破綻した推定値を返すことはなけど、今回
のようなシンプルなケースですらバイアスが大きすぎる。理論上
は一致性を持つらしいけど全然収束はしない。
ベイズなので信用区間は簡単に計算できるのは強みではある。
あと計算時間がかかるのは完全に自分のせいだ。
• モーメント法を利用した手法(1941)
• probが小さいと破綻する。
• ベイズを使用した手法(1986)
• モーメント法のように破綻はしない
• 悪くはないが良くもない。
rbinom(n,size,prob) のsizeの手法まとめ
twitterアカウント:@AsaKiriSun
第77回R勉強会@東京(#TokyoR)
2019/04/13
では次に、これを使うための実データを見つけなければならない。
ただ、この世にはsizeが不明な状況がめったに存在しない・・・
なんとかしてひねり出したデータと結果で今回の発表を閉めたい
と思う。
10年分の船舶転覆回数データから船舶の数を求める
https://jtsb.mlit.go.jp/jtsb/ship/ship-accident-toukei.php運輸安全委員会、船舶事故の統計
> #モーメント法
> c(n1_hat,p_hat)
[1] 82.6509028 0.6497207
> #ベイズ
> n2_hat;#推定値
[1] 364.0308
> n.interval#信用区間
[1] 70 1801
twitterアカウント:@AsaKiriSun
第77回R勉強会@東京(#TokyoR)
2019/04/13
船の専門家じゃないのでよくわからないが、
絶対に少ない

Weitere ähnliche Inhalte

Empfohlen

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
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationErica Santiago
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellSaba Software
 
Introduction to C Programming Language
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming LanguageSimplilearn
 

Empfohlen (20)

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...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
 
Introduction to C Programming Language
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming Language
 

Rbinom(n=10 size, prob)で sizeとprobが未知なのに「size」を推定する