I want to draw a Flowchart in latex the main idea is in this image
and I try to do it as this
by use this code
\documentclass[12pt]{report}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric, arrows,positioning}
\tikzstyle{startstop} = [rectangle, text width=3cm, minimum height=1cm,text centered, draw=black, fill=red!30]
\tikzstyle{io} = [trapezium, trapezium left angle=70, trapezium right
angle=110, text width=3cm, minimum height=1cm, text centered, draw=black, fill=blue!30]
\tikzstyle{process} = [rectangle, text width=3cm, minimum height=1cm, text centered, draw=black, fill=orange!30]
\tikzstyle{decision} = [diamond, text width=3cm, minimum height=1cm, text centered, draw=black, fill=green!30]
\tikzstyle{arrow} = [thick,->,>=stealth]
\begin{document}
\begin{tikzpicture}[node distance=0.8cm,font=\sf]
\node (in1) [startstop] {\textbf{Input}: Original sample $X$};
\node (pro1) [process, below=of in1] {pre-test for normality};
\node (dec1) [decision, below=of pro1,xshift=5cm] {$H_0^{(1)}$ is not rejected (Normal)};
\node (dec2) [decision, below=of pro1,xshift=-5cm] {$H_0^{(1)}$ is rejected (Not normal)};
\node (pro2) [process, below=of dec1] {Apply t-test};
\node (pro3) [process, below=of dec2] {Apply Wilcoxon test};
\node (dec3) [decision, below=of pro2,xshift=2.25cm] {$H_0^{(2t)}$ is not rejected};
\node (dec4) [decision, below=of pro2,xshift=-2.25cm] {$H_0^{(2t)}$ is rejected };
\node (dec5) [decision, below=of pro3,xshift=2.25cm] {$H_0^{(2W)}$ is not rejected};
\node (dec6) [decision, below=of pro3,xshift=-2.25cm] {$H_0^{(2W)}$ is rejected };
\node (in2) [startstop, right=of in1]{ Bootstrap sample };
\draw [arrow] (in1) -- (pro1);
\draw [arrow] (pro1) -- (dec1);
\draw [arrow] (pro1) -- (dec2);
\draw [arrow] (dec1) -- (pro2);
\draw [arrow] (dec2) -- (pro3);
\draw [arrow] (pro2) -- (dec3);
\draw [arrow] (pro2) -- (dec4);
\draw [arrow] (pro3) -- (dec5);
\draw [arrow] (pro3) -- (dec6);
\draw [arrow,dashed] (in1)-- node[anchor=south] {Draw} (in2) ;
\draw [arrow,dashed] (in2) |- (pro1);
\end{tikzpicture}
\end{document}
Is this way correct and how can I improve this code?


