Reducing a expression to find a distribution

This question is related to my privious question Find $P(X=x|Y=y)$ while giving P(X), P(Y) and $P(Y=y|X=x)$ If I do the math I get: $$P(X=x|Y=y) =\frac{P(Y=y|X=x)P(X=x) }{P(Y=y)} =\frac{\binom{n}{y} x^y(1-x)^{n-y}\cdot 1}{\frac{1}{n+1}}=\binom{n}{y} x^y(1-x)^{n-y}(n+1)$$ But I can't see how to multiply this smart so I get a distribution. Can anyone help me with that? Is there a trick?


Solution 1:

\begin{align} &\int_0^1 \binom{n}{y}x^y(1-x)^{n-y}(n+1) \, dx\\ &=(n+1) \binom{n}{y}\int_0^1x^y(1-x)^{n-y}\, dx \\ &= 1 \end{align}

It is a valid distribution.

\begin{align} \frac{\Gamma(1+y)\Gamma(n+1-y)}{\Gamma(1+y+n+1-y)} &=\frac{y!(n-y)!}{(n+1)!} \end{align}

Notice that we have \begin{align}\binom{n}{y}x^y(1-x)^{n-y}(n+1) &=(n+1) \binom{n}{y}x^{1+y-1}(1-x)^{n+1-y-1} \\ &=\frac{x^{1+y-1}(1-x)^{n+1-y-1}}{\frac1{n+1\binom{n}{y}}}\\ &=\frac{x^{1+y-1}(1-x)^{n+1-y-1}}{B(1+y, n+1-y)}\end{align}

The distribition is Beta distribution, Beta($1+y, n+1-y$).