0% found this document useful (0 votes)
2 views4 pages

Bayesian Inference for Coin Flipping

The document outlines a task involving Bayesian Inference related to flipping a coin N times, resulting in M heads. It requires writing code to calculate the posterior probability using a Beta Distribution and a Gaussian Distribution, as well as determining the value of f that maximizes the likelihood of the data. Additionally, it involves plotting the Likelihood, Prior, and Posterior Distributions.

Uploaded by

hemantsaini97835
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views4 pages

Bayesian Inference for Coin Flipping

The document outlines a task involving Bayesian Inference related to flipping a coin N times, resulting in M heads. It requires writing code to calculate the posterior probability using a Beta Distribution and a Gaussian Distribution, as well as determining the value of f that maximizes the likelihood of the data. Additionally, it involves plotting the Likelihood, Prior, and Posterior Distributions.

Uploaded by

hemantsaini97835
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Unit 2

Source Code:

Output:
Bayesian Inference a) In an experiment of flipping a coin N times, M heads showed up (fraction of heads f
= M/N). Write a code to determine the posterior probability, given the following prior for the probability
of f: i. Beta Distribution B(a, b) with given values of a and b . ii. Gaussian Distribution with a given mean
and variance. b) Using the Likelihood of Binomial distribution, determine the value of f (fraction of heads)
that maximizes the probability of the data. c) Plot the Likelihood (normalised), Prior and Posterior
Distributions.

You might also like