Suppose $X_1$ and $X_2$ are random variables that can only take on the values 0 and 1. Their joint distribution is described by the probabilities $p_{00}, p_{01}, p_{10}$, and $p_{11}$. You first make some observations on $X_1$ alone, resulting in $n_0$ 0's and $n_1$ 1's. You then make some observations on $X_2$ alone, resulting in $m_0$ 0's and $m_1$ 1's. Then you observe both of them simultaneously, and get frequencies $k_{00}, k_{01}, k_{10}$ and $k_{11}$. My question is, what is the maximum likelihood estimate for $p_{00}, p_{01}, p_{10}$, and $p_{11}$ given these observations?
The log likelihood function in this case is (up to an additive constant): $$ m_0 \log(p_{00}+p_{01}) + m_1 \log(p_{10}+p_{11}) + n_0 \log(p_{00}+p_{10}) + n_1\log(p_{01}+p_{11}) \\ \hspace{7mm}+ k_{00}\log(p_{00})+ k_{01}\log(p_{01})+ k_{10}\log(p_{10})+ k_{11}\log(p_{11}) $$
and we're looking for its maximum on the set $\{(p_{00},p_{01},p_{10},p_{11}) \in [0,1]^4 : \sum_{ij}p_{ij}=1 \}$. Is there a closed-form solution to this problem? And is this problem described in the statistics literature anywhere?
Edit: With Lagrange multipliers one can show that the solutions to the maximum-likelihood problem are the solutions to $$ \frac{m_0}{p_{00} + p_{01}} + \frac{n_0}{p_{00}+p_{10}} + \frac{k_{00}}{p_{00}} + \lambda = 0, $$ $$ \frac{m_0}{p_{00} + p_{01}} + \frac{n_1}{p_{01}+p_{11}} + \frac{k_{01}}{p_{01}} + \lambda = 0, $$ $$ \frac{m_1}{p_{10} + p_{11}} + \frac{n_0}{p_{00}+p_{10}} + \frac{k_{10}}{p_{10}} + \lambda = 0, $$ $$ \frac{m_1}{p_{10} + p_{11}} + \frac{n_1}{p_{01}+p_{11}} + \frac{k_{11}}{p_{11}} + \lambda = 0, $$ $$ p_{00}+p_{01}+p_{10}+p_{11} = 1, $$ but I wasn't able to solve this system of equations with Mathematica.