I am struggling with the following problem and I hope I can get some hints.
I would like to model the result of sampling balls from 2 urns, each one with a somehow infinite number of black and white balls present at a known rate. Let $p_a, p_b$ determine the fraction of black balls in urn $A, B$ respectively. $p_a$ and $p_b$ are known.
Now let's imagine that a certain number of balls ($n$, known) is drawn from the two urns. This is done many times and constitutes the data ($y$, known).
I would like to estimate the fraction of balls coming from $A$ and $B$, ($\theta$ and $(1-\theta)$), assuming that this fraction stays the same across sampling and given that $p_a, p_b$ are very different.
For instance, if $A$ has 5% of black balls and $B$ has 95% of black balls, I would expect that observing many times something around 10 black balls over 100 drawn would lead to a low $\theta$ estimation.
I think I can write:
$$ y = Bin(n, p) \\ y = Bin(n_a, p_a) + Bin(n_b,p_b) $$ With: $$ n_a + n_b = n \\ n_a = Bin(n, \theta)\\ n_b = n - n_a \\ \theta\in [0,1] $$
So, I can try to write the likelihood, but I am not sure this is correct:
$$ P(y|\theta) = (Bin_a(n_a) + Bin_b(n-n_a)) \times Bin(n,\theta) $$
And I am stuck here. I am familiar with MLE estimation of common distributions, but this goes beyond my formal education and I don't understand whether the problem is ill-posed, or how it should be tackled. Maybe $n_a$ should be marginalized through a summation? Would that be feasible in practice? I hope I stated the problem clearly.
Thank you for your time