# drawing ball from an urn with replacement

Suppose we have an urn with $N$ white balls and $M$ black balls. Suppose we draw $n$ balls and each time a ball is drawn, then we put it back. Let $X =$ number of white ball we get. Let $U = \{1,2,...,N+M\}$. For our probability space, we take $\Omega = U^n$. We want to find

$$P(X = x) \; \; \; \text{where} \; 0 \leq x \leq n$$

I am stuck trying to solve this problem. I know the cardinality of $\Omega$ is $(N+M)^n$.

We have $X\sim Bin(n,p)$, where $p=\frac{N}{N+M}$ is the probability that you draw a white ball. For a binomial distribution $$P(X=x)=\binom{n}{x} p^x (1-p)^{n-x}$$
You can think of it this way: There are $\binom{n}{x}$ ways you can draw $x$ white balls and each of these ways has a probability of $p^x (1-p)^{n-x}$.