# How to generate the binomial formula in probability?

I'm trying to find the distribution formula for a binomial experiment consisting of an urn with $B$ white balls and $N$ black balls, $n$ the number of balls drawn and, $X$ the number of white balls extracted. I tried to solve an easy problem taking $n=4$, $N=5$ and $B=3$, $X=1$ , but I can't reach the formula for this case and the general problem.

• The binomial distribution formula says that the probability of exactly $k$ successes in $n$ trials if each has probability $p$ of success is $\Pr(X = k) = \binom{n}{k}p^k(1 - p)^{n - k}$. It would only apply here if the balls are drawn with replacement. If the balls are drawn without replacement, you would instead use the hypergeometric distribution. – N. F. Taussig Sep 18 '18 at 8:10