Testing Bayesian Statistics Concepts in R: using the Beta-Bernoulli Conjugate Priors to compute the Posterior Distribution

(Sandipan Dey, 10 August 2016)

  • In this article, the Beta-Bernoulli Conjugate Priors will be used to compute the Posterior Probabilities with Coin Tossing Experiment.
  • First, a uniform β(1,1) prior is used to model the unknown probability of success Θ variable for the coin (assuming that all the probabilities in [0,1] are equally likely), so that Θβ(1,1).
  • Then a few trials of the coin tossing are conducted to collect the data and update our prior belief about Θ from the likelihood, which can be modeled as i.i.d. Bernoulli random variables, YiB(α,β),i.
  • The posterior probability distribution is also a Beta distribution as shown in the figure below from the videos of professor Herbert Lee.
    math.png
  • Then the recursive Bayesian updates and the prior and posterior hyper-parameters and the means are updated with each trial. Also, the frequentist’s MLE and 95% confidence interval are computed, along with the Bayesian 95% credible interval.
  • The following animation shows the results of simulation of a random coin tossing experiment with 20 trials, starting with the uniform prior β(1,1)..
    betabinomuniform.gif
  • The next animation shows the same results starting with an improper prior β(0,0).betabinomimproper
  • The next animation shows the same results starting with the Jeffreys prior β(1/2,1/2.betabinomjeffreys
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s