I have an interesting problem which I am trying to mathematically formulate and solve.
Consider the following "single population" problem statement.
You throw n blue marbles randomly (i.e. uniform) onto m wells. Subsequently, you are allowed to observe whether each of the wells have at least 1 marble in it. Therefore, using the known quantities: (1) number of wells, m and (2) number of empty wells; estimate the total number of blue marbles.
The above problem can be solved using binomial and poisson statistics like so:

I am trying to extend this solution to multiple populations. For example when there are blue and red marbles.
Intuitively, I believe statistics should be able to help with this generalization. For example, if m=100 and we observe n_blue=10, n_red=50 and n_purple=5, then I would expect more red marbles within the purple observations.
Nevertheless, I am struggling to formulate the problem and estimate any parameters because I am running into too many unknowns (and non-linear equations). Any help would be much appreciated!
Update:
Thanks joriki for the answer. Moreover, I am trying to tackle another version which is similar the one above with a caveat. Please see below.


You’re overthinking this. You have two independent colours and you want to estimate how many marbles there are of each. Just apply the single-colour method to each of them. The estimator for the blue marbles is $\hat n_1=-m\ln(E+R)$, with $E+R$ the number of wells that are empty of blue marbles, and the estimator for the red marbles is $\hat n_2=-m\ln(E+B)$, with $E+B$ the number of wells that are empty of red marbles.