# Thread: Posterior Distribution

1. ## Posterior Distribution

Suppose I have which are i.i.d as Bernoulli random variables with and the prior is normal with mean 0 and variance 100. How can I find the posterior distribution if the number of equal to one is 5 and n is 16?

What do I use for the likelihood here? Do I differentiate since it's CDF of logistic distribution or do I use the pdf of a bernoulli?

The question confuses me

2. ## Re: Posterior Distribution

If I told you P(Xi = 1) = p then what would the likelihood be? Ok now substitute in for p and you have your likelihood.

3. ## Re: Posterior Distribution

so I just have to find the product of the 1 over 1 + e ?

4. ## Re: Posterior Distribution

What? The likelihood would be a binomial distribution: (16 choose 5) * p^5 (1-p)^11 and replace p with the quantity above.

5. ## Re: Posterior Distribution

Also are you sure the prior has a variance of 0?

6. ## Re: Posterior Distribution

I meant 100 sorry

7. ## Re: Posterior Distribution

Just want to say that a prior with variance 0 is very stubborn - it will not change.

8. ## Re: Posterior Distribution

Originally Posted by BGM
Just want to say that a prior with variance 0 is very stubborn - it will not change.
I myself am a fan of point mass priors. It makes analyzing the posterior very easy.

9. ## Re: Posterior Distribution

If you have a point mass prior, you are "not Bayesian" :P

Anyway back to OP problem, since they are not in a conjugate class, so after using the Bayes theorem to write down the posterior, not much can be simplified.

10. ## Re: Posterior Distribution

Originally Posted by BGM
If you have a point mass prior, you are "not Bayesian" :P
Why not? You're just a very confident Bayesian. We do it all the time when we actually set what we think some of the hyperparameters are - this is equivalent to giving them a point mass prior.

11. ## Re: Posterior Distribution

Why is it a binomial by the way? Also, can I not get rid of the 16 choose 5 as a constant of proportionality~?

12. ## Re: Posterior Distribution

The combinatoric coefficient in the front is not important. You will cancel it anyway. You can also think the sample condition on the parameter is just Bernoulli.

13. ## Re: Posterior Distribution

If Bernoulli has PMF and I find the product of this to get the likelihood function of theta, then where does N choose Xi come into it?

14. ## Re: Posterior Distribution

Because you don't know the order that the successes came. There is only 1 way to order having no successes. There are 16 ways to have 1 success... it's the same argument as in the development of the binomial distribution. Mainly because it is a binomial distribution.

15. ## Re: Posterior Distribution

Hi again, I have found the posterior to be

Is this correct? And also, now I need to use use a normal prior as the proposal density and describe a rejection sampler for sampling from this posterior density, any ideas on how to do that?