I am working on a problem like this: Suppose that there are $N$ students in the class. $n_1$ students take course A, $n_2$ take course B and $n_{12}$ take courses both A and B. What is the MLE of $N$?
I did in the following way: assume that $p_1$ is the probability that a student take Course A, and $p_2$ is the probability that a student take Course B, then $n_1\sim Bin(N,p_1)$ and $n_2\sim Bin(N,p_2)$ so that in case $N$ is known we will get $\hat p_1=n_1/N$ and $\hat p_2=n_2/N$.
Similarly for $\hat p_{12}=n_{12}/N$.
Notice that $\hat p_{12}=\hat p_1 \hat p_2$, we will have the following equation $(n_1/N)(n_2/N)=n_{12}/N$, from which we get $\hat N=n_1 n_2/n_{12}$.
But I am wondering whether this reasoning is correct as I assumed $N$ is known first.