Skip to content

Instantly share code, notes, and snippets.

@kiwamizamurai
Last active February 7, 2020 01:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kiwamizamurai/0418ca9c0c5e5ed0a5b48b9928a0d36d to your computer and use it in GitHub Desktop.
Save kiwamizamurai/0418ca9c0c5e5ed0a5b48b9928a0d36d to your computer and use it in GitHub Desktop.
bayes-tutorial.ipynb
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kiwamizamurai
Copy link
Author

kiwamizamurai commented Dec 13, 2019

シュミレーションのコードについて

y = dist.pdf(x, 1 + heads, 1 + N - heads)

二項分布にベータ分布を掛け忘れてる?
理解においては本質的なミスでは無いが重要な問題ではある。

つまり、最終的な事後分布の形が試行の順番によらないことを考えると
事前分布に一様分布を用いた場合、尤度は二項分布となり、その積分はベータ分布となる
よって最終的に得られる事後分布は「ベータ分布x二項分布」か?

http://r-tips.hatenablog.com/entry/beta-distribution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment