Skip to content

Sample from the predictive posterior distribution, show influence of the strength of prior

License

Notifications You must be signed in to change notification settings

Alexandre-aksenov/Predict-posterior-Binomial-using-pymc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

The predictive posterior distribution of the frequency of success in coin flip is estimated by sampling given apriori knowledge and a sample of previous outcomes of flipping the same coin. The algorithm NUTS (implemented in the library pymc) is used for sampling. The histogram of the predictive posterior distribution is plotted after generation.

Selected model.

The Beta prior is used and the effect of strength of the prior is tested. 5 different strengths of prior (numbers of pseudo-trials) are tested.

Results.

As expected, the mean of the posterior distribution converges to the apriori probability of success when the number of pseudo-trials increases. The Standard Deviation of the posterior predictive distribution decreases. On the other hand, its decrease is quite slow.

Feedback and additional questions.

All questions about the source code should be adressed to its author Alexandre Aksenov:

About

Sample from the predictive posterior distribution, show influence of the strength of prior

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published