Q:

Compute the posterior density for r

I'm trying to understand the posterior distribution. For a simple example if i consider the beta function with parameters $\alpha=1=\beta$. Then the prior would be uniform in the range of 0 to 1 so $p(r) = 1$. If the likelihood is binomial, since we consider an experiment with two possible outcomes, would it be correct to say that the posterior density is given by the following?
$$p(r|y) = P(y|r) p(r) = \binom{n}{y}r^y(1-r)^{n-y}\cdot 1$$
Also if anyone could point me to some good resources regarding this it would be greatly appreciated, as i find a lot of confusing stuff online regarding this topic.

A:

Not quite: 

$\binom{n}{y}r^y(1-r)^{n-y}$ may sum over $y$ to $1$ but it does not integrate over $r$ to $1$ so it is not a probability density
more generally the posterior density is proportional to the prior density multiplied by the likelihood rather than being equal to it  
so the answer should be $\dfrac{\binom{n}{y}r^y(1-r)^{n-y}\cdot 1}{\int\limits _{r=0}^1 \binom{n}{y}r^y(1-r)^{n-y}\cdot 1\, dr}$ with some obvious cancellations; this is the density of a Beta distribution with parameters $\alpha=1+y,\beta=1+n-y$ 

