# 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?