There are $9$ marbles in the urn, so there are $\binom93$ different sets of $3$ marbles that you could draw without replacement. How many contain one marble of each color? To build such a set, you could pick either of the $2$ red marbles, any one of the $3$ white marbles, and any one of the $4$ blue marbles, so there are $2\cdot3\cdot4$ such sets. Each of the $\binom93$ sets is equally likely to be drawn, and $2\cdot3\cdot4$ of them are ‘successes’, so the probability of success is
$$\frac{2\cdot3\cdot4}{\binom93}=\frac{24}{84}=\frac27\;.$$
If you draw with replacement, however, you can potentially draw the same marble twice, and you also have to take into account the order of the draws. On each of your $3$ draws you can get any of the $9$ marbles, so there are $9^3$ possible sequences of $3$ marbles that you can draw, and they’re all equally likely. How many of them contain one marble of each color? As in the first problem, there are $2\cdot3\cdot4=24$ different sets of $3$ marbles that will work, but each of them can be drawn in several different orders to give several different successful sequences of draws. In fact $3$ different objects can be arranged in $3!=6$ different orders, so each of those $24$ sets of $3$ marbles of $3$ different colors can be drawn in $6$ different orders. Thus, there are actually $6\cdot24$ successful sequences of $3$ draws. The final probability of success when you draw with replacement is therefore ... ?
For this post, I will use $n\frac{r}{~}$ to denote the falling factorial: $$n\cdot(n-1)\cdot(n-2)\cdots(n-r+1)=\frac{n!}{(n-r)!}$$
I will make a few changes to notation. It should be clear why I did so in a moment. Let us instead talk about the total number of red balls as $I$ and the total number of blue balls as $J$. Further, let us talk about the total number of balls as $I+J = N$. We will then be wanting to draw $n$ balls total, and let $i$ instead represent the total number of red balls that happened to have been drawn (rather than the total number available) and similarly $j$ be the number of blue balls that were drawn.
Imagine that the balls are all uniquely labeled. Recognize then that each of the $N\frac{n}{~}$ ways of selecting $n$ balls in sequence from the $N$ available balls are equally likely to have occurred.
Let us consider a specific sequence of colors of balls that contains $i$ red balls and $j$ blue balls. Let us count how many ordered sequences of labeled balls result in this sequence of colors.
From left to right, decide which specific red ball occupies a space intended for a red ball to go. The first time there will be $I$ options for the specific red ball, then $I-1$ for the next, and so on... resulting in $I\frac{i}{~}$ ways in which we may select which red ball happened to go in which spot.
Similarly, from left to right, decide which specific blue ball occupied a space intended for a blue ball to go. As before, this will result in $J\frac{j}{~}$ ways in which this can be done.
We get then a probability of:
$$\dfrac{I\frac{i}{~}\cdot J\frac{j}{~}}{N\frac{n}{~}}$$
Notice, this does not change based on the order in which the colors of the balls occurred. It is exactly as probable to have gotten a sequence RBBBBB
as it is to have gotten a sequence BBBBBR
. While yes the probability that the first ball is red is less than the probability that the $n$'th ball is red given that the first n-1 balls were blue, that is irrelevant and what we should have been asking is what the probability is that the first ball was red compared to the probability the $n$'th ball was red where this second probability is not conditioned on anything. This is similar to how it is equally likely to have drawn a queen on the first draw of a deck as it is to have drawn a queen on the second draw from a deck or indeed the $n$'th draw from a deck for any $n$.
From the above observations and derived formula, we can then further derive the formula for the hypergeometric distribution by accounting for all of the $\binom{n}{i}$ orders in which we could have seen red vs blue balls.
Best Answer
Yes, I believe it's called the negative hypergeometric distribution.
Here is a pdf on the matter. I quote the following: