TikZ-Arrows – Stacking Markov Chain Arrows and Labels Together in TikZ-Pic

tikz-arrowstikz-pgftikz-pic

I am having challenges with the following:

  1. My bottom chain arrows and labels (1-\theta) are stacked
    together/overlapping which is something I dont like, and
  2. I want to add an extra broken line that goes to the left labeled
    \theta on top as shown in the picture below:
    Desired Output
    Below is my MWE:
\documentclass{book}

\usepackage{tikz}
\usetikzlibrary{automata,arrows,positioning,calc}

\begin{document}
Markov chain:   
\begin{center}
            \begin{tikzpicture}[->, >=stealth', auto, semithick, node distance=3cm]
                \tikzstyle{every state}=[fill=white,draw=black,thick,text=black,scale=1]
                \node[state]    (A)                     {$0$};
                \node[state]    (B)[right of=A]   {$1$};
                \node[state]    (C)[right of=B]   {$2$};
                \node[state]    (D)[right of=C]   {$3$};
                \path
                (A) edge[loop left]         node{$1-\theta$}    (A)
                (B) edge[bend left,below]   node{$1-\theta$}    (A)
                edge[bend left,above]       node{$\theta$}  (C)
                (C) edge[bend left,below]   node{$1-\theta$}    (A)
                edge[bend left,above]       node{$\theta$}  (D)
                (D) edge[bend left,below]   node{$1-\theta$}    (A);
                %\node[above=0.5cm] (A){Patch G};
                %\draw[red] ($(D)+(-1.5,0)$) ellipse (2cm and 3.5cm)node[yshift=3cm]{Patch H};
            \end{tikzpicture}
        \end{center}

\end{document}

Best Answer

One possible way is like this:

enter image description here

%\documentclass{book}
\documentclass[border=3.141592]{standalone}

\usepackage{tikz}
\usetikzlibrary{arrows.meta, automata,
                bbox,
                chains, 
                positioning,
                quotes}

\begin{document}
%Markov chain:
%\begin{center}
    \begin{tikzpicture}[auto=right, 
                        bezier bounding box,
     node distance = 22mm,
       start chain = going right, 
 every edge/.style = {draw, -Stealth, semithick},
every state/.style = {draw, thick, on chain}
                        ]
    \begin{scope}[nodes=state]
\node (A)   {$0$};
\node (B)   {$1$};
\node (C)   {$2$};
\node (D)   {$3$};
\coordinate (E);
    \end{scope}
%
\path   (A) edge[loop left, looseness=12,  "$1-\theta$" '] (A);
\path[bend left, swap] 
        (A) edge["$\theta$"]    (B)
        (B) edge["$\theta$"]    (C)
        (C) edge["$\theta$"]    (D)
        (C) edge["$\theta$"]    (D)
        (D) edge[dashed, "$\theta$"]  (E);
\path[out=210]
        (B) edge[in=-30, "$1-\theta$"]  (A)
        (C) edge[in=-45, "$1-\theta$"]  (A)      
        (D) edge[in=-60, "$1-\theta$"]  (A);
            \end{tikzpicture}
%\end{center}
\end{document}