\begin{tikzpicture}[
    box/.style={draw,inner sep=3pt},
    font=\small
]
    % Define layers
    \pgfdeclarelayer{background}
    \pgfsetlayers{background,main}

    \node[box, fill=green!20] (admissible) at (0,0) {$\phantom{Y_1}$};
    \node (text1) [right=0.1cm of admissible] {Admissible};
    
    \node[box, fill=red!20] (not_admissible) at (2.5,0) {$\phantom{Y_1}$};
    \node (text2) [right=0.1cm of not_admissible] {Not Admissible};
    
    % Put the white box in the background layer
    \begin{pgfonlayer}{background}
        \node[draw,dotted,fill=white,fit=(admissible) (not_admissible) (text1) (text2),inner sep=0.1cm] {};
    \end{pgfonlayer}
\end{tikzpicture}