Bayesian Inference

Example 1

For a biased coin-flipping example, assuming the probability to get the head can be between 0 and 1, then what is its posterior given the observed data:

  1. Source code BI_coin.R.

  2. Results:

  • b11d100.pdf uses beta(1,1) prior given 100 flips 65 heads;
  • b55d100.pdf uses beta(5,5) prior given 100 flips 65 heads;
  • b11d4.pdf uses beta(1,1) prior given 4 flips 4 heads;
  • b55d4.pdf uses beta(5,5) prior given 4 flips 4 heads.