\documentclass[12pt]{standalone}

\usepackage{ucs}
\usepackage[utf8x]{inputenc}

\usepackage[T1]{fontenc}
\usepackage{textcomp}
\renewcommand{\rmdefault}{ugm}
\renewcommand{\sfdefault}{phv}
\usepackage[garamond]{mathdesign}
\usepackage{tikz}
\usetikzlibrary{positioning, shapes, arrows, shadows}

\begin{document}

\tikzset{>=latex}
\begin{tikzpicture}[
  observed/.style={circle, draw},
  partly observed/.style 2 args={draw, fill=#2, path picture={
      \fill[#1, sharp corners] (path picture bounding box.south west) -|
      (path picture bounding box.north east) -- cycle;},
     circle},
    unobserved/.style={draw, circle, fill=gray!40}
  ]

  \node[observed] (y) {Y};
%  \node[observed,above=of y, xshift=1cm] (r) {R};
  \node[partly observed={white}{gray!40}, above = of y] (x) {X};
  \node[observed, left=of x] (w) {W};
  \node[unobserved, above=of w, xshift=1cm] (k) {K};
  \node[unobserved, right=of k] (u) {U};

%  \draw[->] (r) -- (y);
%  \draw[->] (r) -- (x);
  \draw[->] (x) -- (y);
  \draw[->] (x) -- (w);
  \draw[->] (x) -- (k);
  \draw[->] (k) -- (w);
  \draw[->] (u) to [out=270,in=30] (y);
  \draw[->] (u) -- (k);

  
  \matrix [draw, below, yshift=-0.2cm, inner sep=0.6em, outer sep=0em, nodes={align=center, anchor=center}] at (current bounding box.south){
    \node[observed,label=right:observed] {}; \\
    \node[unobserved,label=right:unobserved]{}; \\
  };


\end{tikzpicture}
\end{document}

