I had learned probability long ago and am trying to re-learn it.
I came across an exercise while reading about forward probabilities: An urn contains K balls: B black balls and K - B white balls. A ball is randomly drawn and replaced from the urn, N times. What is the probability distribution of the number of times a black ball is drawn, $n_{B}$?
I already have the answer to this question, I just don't understand how it is calculated. The answer is: let $f_{B} \equiv \frac{B}{K}$ then $P(n_{B}|f_{B}, N) = \left( \begin{array}{c} N \\ n_{B} \end{array} \right) f^{n_{B}}_{B}(1 - f_{B})^{N - n_{B}}$
I tried to search in this website and couldn't find the answer, that's the reason I'm creating a new question for it. If you know there's an answer somewhere, just point me to it. Thank you very much.
L
PS: if you're curious about where I saw this exercise, it's in Information Theory, Inference and Learning Algorithms, exercise 2.4 page 27, its answer in page 40.