\begin{tikzpicture}[>=stealth',shorten >=1pt,auto,node distance=2cm]
  \node[state] (k1) {$k_1$};
  \node[state] (k2) [right of=k1] {$k_2$};

  \path[->] (k1) edge [loop left] node {$p$} (k1)
  edge [bend left=60]  node  {$1-p$} (k2)
  (k2)  edge [loop right] node {$q$} (k2)
  edge [bend left=60] node  {$1-q$} (k1);
\end{tikzpicture}
