# Bayes specify informative and uninformative prior

I would be really thankful for any hint

Let $x_1,\dots x_n$ be a sample from a geometric distribution with probability parameter $\theta$

$f(x_i\mid \theta)=\theta(1-\theta)^{x_i}$

The likelihood is given by $L(\theta\mid x_i, \dots, x_n)=\prod_i f(x_i\mid \theta)$ Assume we have observed a sample of size n=5 with values $x_i=5,6,9,5,4$. Specify a) an informative prior, (b) and uninformative prior, and determine the posterior distribution for each setting. Make a plot of prior, likelihood and posterior distribution.

• Any hint would be really useful – Makko Feb 22 '13 at 19:37
• Prior for what parameter(s) in what model? – Glen_b -Reinstate Monica Feb 22 '13 at 19:45
• Geometric likelihood – Makko Feb 22 '13 at 19:47
• do you have any information on which to inform the prior? – David LeBauer Feb 22 '13 at 20:51
• On the conjugate prior distribution for theta.@David – Makko Feb 22 '13 at 21:13

Where to put the data

The data values go into the likelihood. The likelihood is a product of $f(x_i\mid \theta)$, one for each data value. You just substitute the data into the formula you gave!

Your data are $x_i$ values. The first data point is $x_1$, and so on. Your likelihood is a product of $f(x_i\mid \theta)$. You gave a formula for $f(x_i\mid \theta)$. You substitute each data value in for its particular $x_i$.

and how to make a plot of prior, likelihood and posterior distribution.

Wait, you don't know how to draw plots of functions? All three are simply functions of $\theta$. You should plot those functions for values that are interesting (where they're not really small) - for the likelihood and posterior, this will be values reasonably close to $\hat{\theta}$

• Thank you one more time. I just need to use the R for plots – Makko Feb 24 '13 at 10:22
• Ok so for each value 5,6,9,5,4 I , so I substitute the x with 5, then with 6 and so on? And on the end I have 5 different plots? – Makko Feb 24 '13 at 16:56
• f(x_i\mid \theta)=\theta(1-\theta)^{x_i} in this formula – Makko Feb 24 '13 at 17:00
• This is the right formula? – Makko Feb 24 '13 at 19:03
• Yes, you substitute each one in (unless you can see how to combine them so you only have to compute a sufficient statistic, which makes it easier). No you don't have 5 functions for the likelihood. Read the second sentence of my answer again please. Yes, that's the right function to put the $x_i$ in, but each is only one term in the likelihood (again, see that second sentence). – Glen_b -Reinstate Monica Feb 24 '13 at 22:20

An informative prior would require some prior knowledge about $\theta$: for instance, if you know both the mean and the variance on $\theta$, you can use a Beta prior $$\theta \sim f(\theta) = \dfrac{ \theta^{\alpha-1}(1-\theta)^{\beta-1}} {B(\alpha,\beta)}$$ and pick $(\alpha,\beta)$ according to this prior information...

A noninformative prior is derived from a formal rule like Jeffreys', which leads to the Beta $B(1/2,1.2)$ prior.

• I'm just so confused! It is my first stat homework. So I just pick some random alpha and beta and put it in the formula above – Makko Feb 24 '13 at 16:53
• Certainly acceptable for a first homework!!! – Xi'an Feb 24 '13 at 17:47