๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

Statistics/Bayesian Statistics

๋‹ค์–‘ํ•œ ์ผค๋ ˆ์‚ฌ์ „๋ถ„ํฌ(Conjugate prior distribution)

๋ฌธ์ œ๋ฅผ ํ†ตํ•ด ๋‹ค์–‘ํ•œ ์ผค๋ ˆ์‚ฌ์ „๋ถ„ํฌ(Conjugate prior distribution)์— ๋Œ€ํ•ด ์•Œ์•„๋ณด์ž.

 

๋ฌธ์ œ 1)

 

10๋ถ„๋™์•ˆ ์ •๋ฅ˜์žฅ์— ๋„์ฐฉํ•˜๋Š” ๋ฒ„์Šค ์ˆ˜์˜ ๋ถ„ํฌ๊ฐ€ ์ง€์ˆ˜๋ถ„ํฌ๋ฅผ ๋”ฐ๋ฅด๊ณ , ์ง€์ˆ˜๋ถ„ํฌ์˜ ๋ชจ์ˆ˜๊ฐ€ ๊ฐ๋งˆ๋ถ„ํฌ(alpha = 100, beta = 1000)๋ฅผ ๋”ฐ๋ฅธ๋‹ค. 10๋ถ„๋™์•ˆ 12๋Œ€์˜ ๋ฒ„์Šค๊ฐ€ ๋„์ฐฉํ•˜์˜€๋‹ค. ์ด๋•Œ, ์‚ฌํ›„๋ถ„ํฌ์™€ ์‚ฌํ›„ํ‰๊ท ์„ ๊ตฌํ•˜์—ฌ๋ผ.

 

ํ’€์ด)

 

 

โ–ท ์‚ฌํ›„๋ถ„ํฌ๋Š” alpha๊ฐ€ 101, beta๊ฐ€ 1012์ธ ๊ฐ๋งˆ๋ถ„ํฌ์ด๋‹ค. ์‚ฌ์ „๋ถ„ํฌ์™€ ์‚ฌํ›„๋ถ„ํฌ๊ฐ€ ๊ฐ๋งˆ ๋ถ„ํฌ๋ฅผ ๋”ฐ๋ฅด๋ฏ€๋กœ ์ผค๋ ˆ์‚ฌ์ „๋ถ„ํฌ๋ผ๊ณ  ํ•  ์ˆ˜ ์žˆ๋‹ค.

 

โ–ท ์‚ฌ์ „๋ถ„ํฌ์˜ ESS(Effective Sample Size)๋Š” alpha์™€ beta์˜ ํ•ฉ์ด๋ฏ€๋กœ, 1100์ด๋‹ค.

 

โ–ท ์‚ฌํ›„ํ‰๊ท ์€ 0.0998๋กœ ๊ฑฐ์˜ ๋ณ€ํ™”๊ฐ€ ์—†๋Š” ๊ฒƒ์œผ๋กœ ๋‚˜ํƒ€๋‚ฌ๋‹ค. ์ด๋Š” ESS๊ฐ€ ๋ฐ์ดํ„ฐ์˜ ๊ฐœ์ˆ˜์— ๋น„ํ•ด ์••๋„์ ์œผ๋กœ ํฌ๊ธฐ ๋•Œ๋ฌธ์— ๋ฐ์ดํ„ฐ๊ฐ€ ์‚ฌํ›„ํ‰๊ท ์—์„œ ๋ฏธ์น˜๋Š” ์˜ํ–ฅ์ด ๋ฏธ๋ฏธํ•œ ๊ฒƒ์œผ๋กœ ๋ณผ ์ˆ˜ ์žˆ๋‹ค.

 

๋ฌธ์ œ 2)

 

๋ฐ์ดํ„ฐ๊ฐ€ ์ •๊ทœ๋ถ„ํฌ๋ฅผ ๋”ฐ๋ฅด๊ณ , ์ด ์ •๊ทœ๋ถ„ํฌ์˜ ๋ถ„์‚ฐ์€ ๊ณ ์ •๋˜์–ด ์žˆ๋‹ค. ์ •๊ทœ๋ถ„ํฌ์˜ ํ‰๊ท ์ด ์ •๊ทœ๋ถ„ํฌ๋ฅผ ๋”ฐ๋ฅผ ๋•Œ, ํ‰๊ท ์˜ ์‚ฌํ›„๋ถ„ํฌ์™€ ์‚ฌํ›„ํ‰๊ท ์„ ๊ตฌํ•˜์—ฌ๋ผ.

 

ํ’€์ด)

 

 

โ–ท ์‚ฌํ›„๋ถ„ํฌ๋ฅผ ๊ตฌํ•˜๋Š” ๊ณผ์ •์€ ๋ณต์žกํ•˜์—ฌ ์ƒ๋žตํ•˜์˜€๋‹ค.

 

โ–ท ์‚ฌํ›„๋ถ„ํฌ๋Š” ์ •๊ทœ๋ถ„ํฌ๋ฅผ ๋”ฐ๋ฅธ๋‹ค. ์‚ฌ์ „๋ถ„ํฌ์™€ ์‚ฌํ›„๋ถ„ํฌ๊ฐ€ ์ •๊ทœ๋ถ„ํฌ๋ฅผ ๋”ฐ๋ฅด๋ฏ€๋กœ ์ผค๋ ˆ์‚ฌ์ „๋ถ„ํฌ๋ผ๊ณ  ํ•  ์ˆ˜ ์žˆ๋‹ค.

 

โ–ท ์‚ฌํ›„ํ‰๊ท ์€ ๋ฐ์ดํ„ฐ ํ‰๊ท ๊ณผ ์‚ฌ์ „๋ถ„ํฌ ํ‰๊ท ์˜ ๊ฐ€์ค‘ํ‰๊ท (Weighted average)์ด๋‹ค. ESS๋Š” ๊ฐ€๋Šฅ๋„์˜ ๋ถ„์‚ฐ์„ ์‚ฌ์ „๋ถ„ํฌ์˜ ๋ถ„์‚ฐ์œผ๋กœ ๋‚˜๋ˆˆ ๊ฒƒ์ธ๋ฐ, ์ด๋Š” ๋‚ฉ๋“ํ•  ๋งŒํ•˜๋‹ค. ์™œ๋ƒํ•˜๋ฉด ์‚ฌ์ „๋ถ„ํฌ์˜ ๋ถ„์‚ฐ์ด ์ž‘์•„์งˆ ์ˆ˜๋ก ESS๊ฐ€ ์ปค์ง€๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค. ์ด๋•Œ, ์‚ฌ์ „๋ถ„ํฌ์˜ ๋ถ„์‚ฐ์ด ์ž‘๋‹ค๋Š” ๊ฒƒ์€ ์‚ฌ์ „์ •๋ณด๊ฐ€ ๋งŽ๋‹ค๊ณ  ๋ณผ ์ˆ˜ ์žˆ๋‹ค.

 

๋ฌธ์ œ 3)

 

๋ฐ์ดํ„ฐ๊ฐ€ ์ •๊ทœ๋ถ„ํฌ๋ฅผ ๋”ฐ๋ฅธ๋‹ค. ์ •๊ทœ๋ถ„ํฌ์˜ ํ‰๊ท ์ด ์ •๊ทœ๋ถ„ํฌ๋ฅผ ๋”ฐ๋ฅด๊ณ  ๋ถ„์‚ฐ์ด ์—ญ๊ฐ๋งˆ๋ถ„ํฌ๋ฅผ ๋”ฐ๋ฅผ ๋•Œ, ํ‰๊ท ๊ณผ ๋ถ„์‚ฐ์˜ ์‚ฌํ›„๋ถ„ํฌ๋ฅผ ๊ตฌํ•˜์—ฌ๋ผ.

 

ํ’€์ด)

 

 

โ–ท ํ‰๊ท ๊ณผ ๋ถ„์‚ฐ์˜ ์‚ฌํ›„๋ถ„ํฌ๋ฅผ ๊ตฌํ•˜๋Š” ๊ณผ์ •์€ ๋ณต์žกํ•˜์—ฌ ์ƒ๋žตํ•˜์˜€๋‹ค.

 

โ–ท ํ‰๊ท ๊ณผ ๋ถ„์‚ฐ์˜ ์‚ฌ์ „๋ถ„ํฌ๊ฐ€ ๊ฐ ์‚ฌํ›„๋ถ„ํฌ์™€ ๊ฐ™์€ ๋ถ„ํฌ๋ฅผ ๋”ฐ๋ฅด๋ฏ€๋กœ ์ผค๋ ˆ์‚ฌ์ „๋ถ„ํฌ๋ผ๊ณ  ํ•  ์ˆ˜ ์žˆ๋‹ค.

 

โ–ท ํ‰๊ท ์˜ ์‚ฌํ›„ํ‰๊ท ์€ ๋ฐ์ดํ„ฐ ํ‰๊ท ๊ณผ ์‚ฌ์ „๋ถ„ํฌ ํ‰๊ท ์˜ ๊ฐ€์ค‘ํ‰๊ท ์ด๊ณ , ESS๋Š” w์ด๋‹ค. w๋Š” ์‚ฌ์ „๋ถ„ํฌ์˜ ๋ถ„์‚ฐ์ด ์ž‘์œผ๋ฉด ์ปค์ง€๋ฏ€๋กœ ESS๋กœ์จ ๋‚ฉ๋“ํ•  ๋งŒํ•˜๋‹ค.

 


Reference:

"Bayesian Statistics: From Concept to Data Analysis," Coursera, https://www.coursera.org/learn/bayesian-statistics/.