Find the posterior distribution of $\pi$

An observation $x$ is taken from a negative binomial distribution $X \sim \text{Negative-Binomial}(k,\pi)$. The parameter, $\pi$, is allocated a beta prior $\pi \sim (\alpha,\beta)$.

My attempt:

\begin{align} P(\pi \mid x) &\propto p(\pi)L(\pi) \\ P(\pi \mid x) &\propto \pi^{\alpha-1}(1-\pi)^{\beta-1} \pi^k (1-\pi)^x \\ P(\pi \mid x) &\propto \pi^{\alpha+k-1}(1-\pi)^{\beta+x-1} \end{align}

So the posterior is ${\rm Beta}(\alpha+k,\beta+x)$

Am I correct?

• Welcome to our site! Please add the [self-study] tag & read its wiki. – Silverfish Apr 27 '16 at 0:01
• @user164945 Why do you think you are not correct? What step are you doubtful about? – Greenparker Apr 27 '16 at 0:59
• @Greenparker It's just I am not certain about my answer. – user164945 Apr 27 '16 at 1:03