# Bayesian estimation with given prior

Given the i.i.d. random variables $X_{1}, X_{2},...,X_{n}$ with frequenty function: $f(x|p)=(x-1)(1-p)^{x-2}p^2$, with $x =2,3,...$

Pick as a priori density $f_{P}(p) \propto p(1-p)1_{(0,1]}(p)$.

Give the posterior estimate for $p$ based on this prior.

I find Bayesian estimation very hard to grasp, can someone help me out on this one?

Outline and Hints: According to the applicable version of Bayes' Theorem, you have $$f(p\,|\,\mathbf{x}) \propto f(p) \times f(\mathsf{x}\,|\, p).$$ Here $f(p\,|\,\mathbf{x})$ represents the posterior distribution of $p$ given data, $f(\mathsf{x}\,|\, p)$ is the likelihood function of the data, and $f(p)$ is the PDF of the prior distribution [in your case $\mathsf{Beta}(2,2)].$
With your prior and data consisting of $x$ successes in $n$ binomial trials, one can see that the posterior distribution would be $\mathsf{Beta}(2+x,\; 2+n-x).$ [This is easy to see looking at the kernel of the likelihood because the beta prior and binomial likelihood are 'conjugate' (mathematically compatible).]
You don't say what kind of Bayesian estimate you want. For point estimates, the mode and mean (and even the median) of the posterior distribution have been used. For a Bayesian 95% probability interval estimate one method is to find quantiles .025 and .975 of the posterior distribution. (Something like the qbeta function in R can be used to do the numerical integration, if necessary.)
Addendum per comment: I answered for binomial data. But your likelihood function is $\prod_{i=1}^n f(x_i|p)$, for the given $f(x|p).$ Then you would get somewhat different beta parameters for the posterior. My guess is that the answer is the mode of the posterior distribution, but I don't have the full context of what you've been studying. In meetings next few days so can't quickly go further into it. If you can't get it on your own, then I suggest you 'unaccept' my 'outline and hints' and maybe someone else will help.
• Well the answer is $(2n-1)/(n\bar{X}_{n}-2)$, could you give me some hints on the method to get there? (and thank you for your previous answer) – Keep_On_Cruising Oct 2 '17 at 12:53
• @O.Kro I think the answer is $\frac{2n+1}{n\bar{X}_n+2}$. – Sayan Oct 2 '17 at 17:20