Solution (source code)

= Solution

Let $Y$ denote the full data and $R$ the pattern of indicators, with $R_j=1$ for an observed component and $R_j=0$ for a missing one. For each fixed pattern $r$, split the data as $y=(y_{\mathrm{obs}}(r),y_{\mathrm{mis}}(r))$. The <missing at random> condition is
$$
\boxed{P_\psi(R=r\mid Y=y)=P_\psi\bigl(R=r\mid Y_{\mathrm{obs}}(r)=y_{\mathrm{obs}}(r)\bigr).}
$$
Here $\psi$ parameterizes the missingness mechanism. Equivalently its <conditional probability>, with the observed data fixed, is constant over all possible completions of the missing data. The restriction is pattern-specific because the observed components depend on $r$. <Missing at random> allows missingness to depend on observed values; <missing completely at random> imposes independence from all the data.