SlideShare una empresa de Scribd logo
1 de 67
Descargar para leer sin conexión
@
Created by /Yoshitake TAKEBAYASHI @psycle44
:
:
:
http://ikiru.ncnp.go.jp/ikiru-hp/genjo/toukei/index.html
Noma, H. Statist. Med. 2011, 30 3304–3312
K=10
TOPICS
MCMC
21
21
21
21
21
PC
!!
!!
....
:
:
(θ) (σ^2)
(D)
https://ksmzn.shinyapps.io/statdist/
...
P(D|θ) θ
P(D|θ)= (θ) (D)
P(θ|D)
P(θ|D)= (D) (θ)
P(D|θ) θ
95%
μ
P(θ|D)
95%
..???
Θ ..???
Θ
( )
※
MCMC
MCMC
MarcovChainMonteCarlo Methods
MCMC??
MCMC
step1: x1
step2: x2 , x1
step3: x1 step2 , x2
step4: x2 step3 , x1
step3,4
...
MCMC
:
BURNIN WARM-UP
stan
GELMAN & RUBIN
GEWEKE
GELMAN & RUBIN
1.01
chain chain
1
chain
GEWEKE
MCMC Z
±1.96 →
5
MCMC
MCMC
MCMC
Y
α β
MCMC
chain
burin
thin( )
Stan
MCMC
library(rstan)
N <- 500
x <- rnorm(N, mean = 50, sd = 10)
y <- 10 + 0.8 * x + rnorm(N, mean =0, sd = 7)
stancode <- '
data{ int<lower=0> N;
real x[N];
real y[N];
}
parameters { real alpha;
real beta;
real<lower=0> s;
}
model{ for(i in 1:N)
y[i] ~ normal(alpha + beta * x[i], s); #推定するモデル
alpha ~ normal(0, 100); #パラメータの事前分布
beta ~ normal(0, 100); #パラメータの事前分布
s ~ inv_gamma(0.001, 0.001);
}
'
datastan <- list(N=N, x=x, y=y)
fit <- stan(model_code = stancode,data=datastan,iter=5000,chain=4)
my_shinystan <- as.shinystan(fit)
launch_shinystan(my_shinystan)
On the shinyRStan
SHINYSTAN
SEM
MCMC
RHAT
MCMC
ENJOY!!

Más contenido relacionado

La actualidad más candente

ベイズ統計入門
ベイズ統計入門ベイズ統計入門
ベイズ統計入門
Miyoshi Yuya
 
グラフィカルモデル入門
グラフィカルモデル入門グラフィカルモデル入門
グラフィカルモデル入門
Kawamoto_Kazuhiko
 

La actualidad más candente (20)

Cmdstanr入門とreduce_sum()解説
Cmdstanr入門とreduce_sum()解説Cmdstanr入門とreduce_sum()解説
Cmdstanr入門とreduce_sum()解説
 
マルコフ連鎖モンテカルロ法 (2/3はベイズ推定の話)
マルコフ連鎖モンテカルロ法 (2/3はベイズ推定の話)マルコフ連鎖モンテカルロ法 (2/3はベイズ推定の話)
マルコフ連鎖モンテカルロ法 (2/3はベイズ推定の話)
 
Stan超初心者入門
Stan超初心者入門Stan超初心者入門
Stan超初心者入門
 
PRML輪読#1
PRML輪読#1PRML輪読#1
PRML輪読#1
 
ベイズファクターとモデル選択
ベイズファクターとモデル選択ベイズファクターとモデル選択
ベイズファクターとモデル選択
 
ベルヌーイ分布からベータ分布までを関係づける
ベルヌーイ分布からベータ分布までを関係づけるベルヌーイ分布からベータ分布までを関係づける
ベルヌーイ分布からベータ分布までを関係づける
 
ベイズ統計入門
ベイズ統計入門ベイズ統計入門
ベイズ統計入門
 
深層学習の数理
深層学習の数理深層学習の数理
深層学習の数理
 
社会心理学者のための時系列分析入門_小森
社会心理学者のための時系列分析入門_小森社会心理学者のための時系列分析入門_小森
社会心理学者のための時系列分析入門_小森
 
階層ベイズとWAIC
階層ベイズとWAIC階層ベイズとWAIC
階層ベイズとWAIC
 
グラフィカルモデル入門
グラフィカルモデル入門グラフィカルモデル入門
グラフィカルモデル入門
 
深層生成モデルと世界モデル
深層生成モデルと世界モデル深層生成モデルと世界モデル
深層生成モデルと世界モデル
 
ベイズモデリングと仲良くするために
ベイズモデリングと仲良くするためにベイズモデリングと仲良くするために
ベイズモデリングと仲良くするために
 
正準相関分析
正準相関分析正準相関分析
正準相関分析
 
MCMCとともだちになろう【※Docswellにも同じものを上げています】
MCMCとともだちになろう【※Docswellにも同じものを上げています】MCMCとともだちになろう【※Docswellにも同じものを上げています】
MCMCとともだちになろう【※Docswellにも同じものを上げています】
 
レプリカ交換モンテカルロ法で乱数の生成
レプリカ交換モンテカルロ法で乱数の生成レプリカ交換モンテカルロ法で乱数の生成
レプリカ交換モンテカルロ法で乱数の生成
 
Recent Advances on Transfer Learning and Related Topics Ver.2
Recent Advances on Transfer Learning and Related Topics Ver.2Recent Advances on Transfer Learning and Related Topics Ver.2
Recent Advances on Transfer Learning and Related Topics Ver.2
 
Chapter2.3.6
Chapter2.3.6Chapter2.3.6
Chapter2.3.6
 
MCMC法
MCMC法MCMC法
MCMC法
 
基礎からのベイズ統計学 輪読会資料 第4章 メトロポリス・ヘイスティングス法
基礎からのベイズ統計学 輪読会資料 第4章 メトロポリス・ヘイスティングス法基礎からのベイズ統計学 輪読会資料 第4章 メトロポリス・ヘイスティングス法
基礎からのベイズ統計学 輪読会資料 第4章 メトロポリス・ヘイスティングス法
 

Destacado

Destacado (20)

分類分析 (taxometric analysis)
分類分析 (taxometric analysis)分類分析 (taxometric analysis)
分類分析 (taxometric analysis)
 
STARD2015に学ぶ「診断精度の分析」の書き方
 STARD2015に学ぶ「診断精度の分析」の書き方 STARD2015に学ぶ「診断精度の分析」の書き方
STARD2015に学ぶ「診断精度の分析」の書き方
 
項目反応理論による尺度運用
項目反応理論による尺度運用項目反応理論による尺度運用
項目反応理論による尺度運用
 
潜在クラス分析
潜在クラス分析潜在クラス分析
潜在クラス分析
 
ベイズ学習勉強会 EMアルゴリズム (作成途中)
ベイズ学習勉強会 EMアルゴリズム (作成途中)ベイズ学習勉強会 EMアルゴリズム (作成途中)
ベイズ学習勉強会 EMアルゴリズム (作成途中)
 
ノンパラメトリックベイズ4章クラスタリング
ノンパラメトリックベイズ4章クラスタリングノンパラメトリックベイズ4章クラスタリング
ノンパラメトリックベイズ4章クラスタリング
 
近似ベイズ計算によるベイズ推定
近似ベイズ計算によるベイズ推定近似ベイズ計算によるベイズ推定
近似ベイズ計算によるベイズ推定
 
Rで項目反応理論、テキストマイニング、Rの研修やってますという三題噺(33rd #TokyoR)
Rで項目反応理論、テキストマイニング、Rの研修やってますという三題噺(33rd #TokyoR)Rで項目反応理論、テキストマイニング、Rの研修やってますという三題噺(33rd #TokyoR)
Rで項目反応理論、テキストマイニング、Rの研修やってますという三題噺(33rd #TokyoR)
 
ベータ分布
ベータ分布ベータ分布
ベータ分布
 
第3章 変分近似法 LDAにおける変分ベイズ法・周辺化変分ベイズ法
第3章 変分近似法 LDAにおける変分ベイズ法・周辺化変分ベイズ法第3章 変分近似法 LDAにおける変分ベイズ法・周辺化変分ベイズ法
第3章 変分近似法 LDAにおける変分ベイズ法・周辺化変分ベイズ法
 
13.01.20. 第1回DARM勉強会資料#4
13.01.20. 第1回DARM勉強会資料#413.01.20. 第1回DARM勉強会資料#4
13.01.20. 第1回DARM勉強会資料#4
 
観察研究の必須事項
観察研究の必須事項観察研究の必須事項
観察研究の必須事項
 
13.01.20.第1回DARM勉強会資料#2
13.01.20.第1回DARM勉強会資料#213.01.20.第1回DARM勉強会資料#2
13.01.20.第1回DARM勉強会資料#2
 
観察研究の質の評価
観察研究の質の評価観察研究の質の評価
観察研究の質の評価
 
第2回DARM勉強会
第2回DARM勉強会第2回DARM勉強会
第2回DARM勉強会
 
Darm3(samplesize)
Darm3(samplesize)Darm3(samplesize)
Darm3(samplesize)
 
第4回DARM勉強会 (構造方程式モデリング)
第4回DARM勉強会 (構造方程式モデリング)第4回DARM勉強会 (構造方程式モデリング)
第4回DARM勉強会 (構造方程式モデリング)
 
「操作変数法」の報告事例
「操作変数法」の報告事例「操作変数法」の報告事例
「操作変数法」の報告事例
 
13.01.20.第1回DARM勉強会資料#3
13.01.20.第1回DARM勉強会資料#313.01.20.第1回DARM勉強会資料#3
13.01.20.第1回DARM勉強会資料#3
 
ノンパラベイズ入門の入門
ノンパラベイズ入門の入門ノンパラベイズ入門の入門
ノンパラベイズ入門の入門
 

Similar a ベイズ推定の概要@広島ベイズ塾

coqun
coquncoqun
coqun
MoCo7
 

Similar a ベイズ推定の概要@広島ベイズ塾 (9)

BERT入門
BERT入門BERT入門
BERT入門
 
Hierarchical matrix techniques for maximum likelihood covariance estimation
Hierarchical matrix techniques for maximum likelihood covariance estimationHierarchical matrix techniques for maximum likelihood covariance estimation
Hierarchical matrix techniques for maximum likelihood covariance estimation
 
Py con 2018_youngsooksong
Py con 2018_youngsooksongPy con 2018_youngsooksong
Py con 2018_youngsooksong
 
Application of parallel hierarchical matrices and low-rank tensors in spatial...
Application of parallel hierarchical matrices and low-rank tensors in spatial...Application of parallel hierarchical matrices and low-rank tensors in spatial...
Application of parallel hierarchical matrices and low-rank tensors in spatial...
 
coqun
coquncoqun
coqun
 
Hermite integrators and Riordan arrays
Hermite integrators and Riordan arraysHermite integrators and Riordan arrays
Hermite integrators and Riordan arrays
 
Geohydrology ii (3)
Geohydrology ii (3)Geohydrology ii (3)
Geohydrology ii (3)
 
When Computers Don't Compute and Other Fun with Numbers
When Computers Don't Compute and Other Fun with NumbersWhen Computers Don't Compute and Other Fun with Numbers
When Computers Don't Compute and Other Fun with Numbers
 
Recurrence relation solutions
Recurrence relation solutionsRecurrence relation solutions
Recurrence relation solutions
 

Más de Yoshitake Takebayashi

Más de Yoshitake Takebayashi (6)

単一事例研究法と統計的推測:ベイズ流アプローチを架け橋として
単一事例研究法と統計的推測:ベイズ流アプローチを架け橋として単一事例研究法と統計的推測:ベイズ流アプローチを架け橋として
単一事例研究法と統計的推測:ベイズ流アプローチを架け橋として
 
単一事例研究法と統計的推測:ベイズ流アプローチを架け橋として (文字飛び回避版はこちら -> https://www.slideshare.net/yos...
単一事例研究法と統計的推測:ベイズ流アプローチを架け橋として (文字飛び回避版はこちら -> https://www.slideshare.net/yos...単一事例研究法と統計的推測:ベイズ流アプローチを架け橋として (文字飛び回避版はこちら -> https://www.slideshare.net/yos...
単一事例研究法と統計的推測:ベイズ流アプローチを架け橋として (文字飛び回避版はこちら -> https://www.slideshare.net/yos...
 
フェーズI/IIに置けるベイジアン・アダプティブ・メソッド
フェーズI/IIに置けるベイジアン・アダプティブ・メソッドフェーズI/IIに置けるベイジアン・アダプティブ・メソッド
フェーズI/IIに置けるベイジアン・アダプティブ・メソッド
 
観察研究の必須事項
観察研究の必須事項観察研究の必須事項
観察研究の必須事項
 
内容的妥当性,構造的妥当性と仮説検定の評価
内容的妥当性,構造的妥当性と仮説検定の評価内容的妥当性,構造的妥当性と仮説検定の評価
内容的妥当性,構造的妥当性と仮説検定の評価
 
13.01.20.第1回DARM勉強会資料#1
13.01.20.第1回DARM勉強会資料#113.01.20.第1回DARM勉強会資料#1
13.01.20.第1回DARM勉強会資料#1
 

Último

Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
MateoGardella
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 

Último (20)

SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 

ベイズ推定の概要@広島ベイズ塾