I would like help on the following question and I will show my work. Here is the question in my notes and I will follow up with my work:
Q: Suppose a forest is segmented into strips, referred to as transects, within which trees occur roughly in a linear sequence. Assuming trees are independent of each other within a transect, and that a tree within a transect is infected with probability $\pi$, the probability within a transect that the $(r+1)th$ tree is the first one observed to be infected is $$(1-\pi)^r\pi$$ for $r=0,1,2...$ and we have the data for $ten$ independent transects within a forest:
$$0,0,0,1,0,4,1,1,0,0 $$
Thus, if the forester wants to apply a Bayesian inference to the above scenario. She takes as her prior for $\pi$ a probability distribution proportional to:
$$\pi^{3.09-1}(1-\pi)^{8.96-1}$$
Using the data above, find the researcher's posterior probability that $\pi > 0.4$
So here is what I have done: To find the posterior distribution, we first have to find the likelihood thus since $n=10$ and each observation is I.I.D we have:
$$L=\pi(1-\pi)^{\sum_{i=1}^{10}r_i^2}$$ and we multiply $L$, the likelihood by the prior which is where I have a problem. Do we just multiply the prior given to the likelihood and solve? Because if I do that I get:
$$\pi^{3.09}(1-\pi)^{14.96}$$ We can forget about the denominator since it wont be a function of $\pi$ correct? Can anyone help please? Thanks so much!
You have ten positive infected cases (one in each transect) so your likelihood function should be $$L=\pi^{10}(1-\pi)^{\sum_{i=1}^{10}r_i}$$ and so your posterior density function should be proportional to $$\pi^{13.09-1}(1-\pi)^{15.96-1}.$$
Both your prior and posterior distributions are Beta distributions.