\newenvironment{summary}{\begin{quote} \begin{center}
\large{\textbf{SUMMARY}}  \end{center}}{\end{quote}}

\newenvironment{aim}{\begin{quote} \begin{center}
\large{\textbf{AIM}}  \end{center}}{\end{quote}}
 
\newcommand{\heap}[2]  {\genfrac{}{}{0pt}{}{#1}{#2}}
\newcommand{\sfrac}[2] {\mbox{$\frac{#1}{#2}$}}
\newcommand{\prob}{{\mathbb P}}
\newcommand{\one}{{\mathbb I}}
\newcommand{\nCr}[2]{\left(\begin{array}{c} #1 \\ #2\end{array}\right)}
  
\newtheorem{Prop}{Proposition}
\newtheorem{Stat}{Statement}
\newtheorem{Theo}{Theorem}
\newtheorem{Lem}{Lemma}
\newtheorem{Cor}{Corollary}
\newtheorem{Def}{Definition}
\newtheorem{Ex}{Example}
\newtheorem{Claim}{Claim}
\newtheorem{Assum}{Assumption}

\newcommand{\N}{\mathbb{N}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\A}{\mathbb{A}}
\newcommand{\Hbb}{\mathbb{Hbb}}
\newcommand{\FB}{\mathcal{F}}
\newcommand{\tendsto}{\longrightarrow}
\newcommand{\pn}{\par\noindent}
\newcommand{\ul}{\underline}
\newcommand{\vs}[1]{\vspace{#1}}
\newcommand{\pf}{Pf$_{\sslash}$}
\newcommand{\moninc}{\parbox{3cm}{\begin{center}monotone\\increasing \end{center}}}
\newcommand{\stopper}{\begin{flushright}\par$\boxempty$\end{flushright}}
\newcommand{\framethis}[2]{\fbox{\hspace{0.25cm}\parbox{#1}{\vspace{0.25cm}{#2}\vspace{0.25cm}}\hspace{0.25cm}}}
\newcommand{\frameit}[1]{\begin{center}\fbox{\hspace{0.25cm}\parbox{\the\linewidth-0.55cm-2\fboxsep}{\vspace{0.25cm}{#1}\vspace{0.25cm}}\hspace{0.25cm}}\end{center}}
\newcommand{\ds}{\displaystyle}
\newcommand{\Prob}{\mathbb{P}}
\DeclareMathOperator*{\marker}{}
\newcommand{\perm}[2]{\marker^{#1}\mathrm{P}_{#2}}
\newcommand{\choosesp}[2]{\marker^{#1}\mathrm{C}_{#2}}
\newcommand{\choosesb}[2]{\marker_{#1}\mathrm{C}_{#2}}
\DeclareMathOperator{\geom}{Geom}
\DeclareMathOperator{\po}{Po}
\DeclareMathOperator{\Bi}{B}
\newcommand{\E}{\mathbb{E}}
\DeclareMathOperator{\var}{Var}
\DeclareMathOperator{\cov}{Cov}


%\newcommand{\R}{\textsf{R}}
\newcommand{\code}[1]{\texttt{#1}}
\newcommand{\ex}[1]{\ensuremath{E(#1)}}
%\newcommand{\var}[1]{\ensuremath{Var(#1)}}
%\newcommand{\cov}[2]{\ensuremath{Cov(#1,#2)}}
%\newcommand{\corr}[2]{\ensuremath{Corr(#1,#2)}}
\newcommand{\mean}[1]{\ensuremath{\mathcal{M}(X_{#1})}}
\newcommand{\meann}[2]{\ensuremath{\mathcal{M}({#1}^{#2})}}
\newcommand{\meancoll}{\ensuremath{\mathcal{M}(\mathcal{C})}}
\newcommand{\meancol}[2]{\ensuremath{\mathcal{M}^{#2}(\mathcal{C}_{#1})}}
\newcommand{\meany}[1]{\ensuremath{\tilde{\mathcal{M}}(X_{#1})}}
\newcommand{\meannny}[2]{\ensuremath{\tilde{\mathcal{M}}^{[#2]}(X_{#1})}}
\newcommand{\meanny}[1]{\ensuremath{\tilde{\mathcal{M}}(#1)}}
\newcommand{\meanycoll}{\ensuremath{\tilde{\mathcal{M}}(\mathcal{C})}}
\newcommand{\meanycol}[2]{\ensuremath{\tilde{\mathcal{M}}^{[#2]}(\mathcal{C}_{#1})}}
\newcommand{\meannycol}[1]{\ensuremath{\tilde{\mathcal{M}}(\mathcal{C}_{#1})}}

\newcommand{\ave}{\ensuremath{\mathcal{S}_{N}(\mathcal{C})}}
\newcommand{\avecol}[2]{\ensuremath{\mathcal{S}^{#2}(\mathcal{C}_{#1})}}

\newcommand{\sampres}[2]{\ensuremath{\mathcal{T}_{#2}(X_{#1})}}
\newcommand{\samprescol}[3]{\ensuremath{\mathcal{T}_{#2}(\mathcal{C}_{#1}({#3}))}}
\newcommand{\samp}[2]{\ensuremath{\mathcal{S}_{#2}(X_{#1})}}
\newcommand{\sampcol}[2]{\ensuremath{\mathcal{S}_{#2}(\mathcal{C}_{#1})}}

\newcommand{\sampy}[2]{\ensuremath{\tilde{\mathcal{S}}_{#2}(X_{#1})}}
\newcommand{\sampycol}[2]{\ensuremath{\tilde{\mathcal{S}}_{#2}(\mathcal{C}_{#1})}}
\newcommand{\sampyrescol}[3]{\ensuremath{\tilde{\mathcal{T}}_{#2}(\mathcal{C}_{#1}(#3))}}



\newcommand{\res}[2]{\ensuremath{\mathcal{R}_{#2}(X_{#1})}}
\newcommand{\ress}[2]{\ensuremath{\mathcal{R}_{#2}(#1)}}
\newcommand{\rescoll}[1]{\ensuremath{\mathcal{R}_{#1}(\mathcal{C})}}
\newcommand{\rescol}[3]{\ensuremath{\mathcal{R}_{#2}(\mathcal{C}_{#1}^{#3})}}
\newcommand{\resy}[2]{\ensuremath{\tilde{\mathcal{R}}_{#2}(X_{#1})}}
\newcommand{\resssy}[3]{\ensuremath{\tilde{\mathcal{R}}_{#2}^{[#3]}(X_{#1})}}
\newcommand{\ressy}[2]{\ensuremath{\tilde{\mathcal{R}}_{#2}(#1)}}
\newcommand{\resycoll}[1]{\ensuremath{\tilde{\mathcal{R}}_{#1}(\mathcal{C})}}
\newcommand{\resycol}[3]{\ensuremath{\tilde{\mathcal{R}}_{#2}^{[#3]}(\mathcal{C}_{#1})}}
\newcommand{\ressycol}[2]{\ensuremath{\tilde{\mathcal{R}}_{#2}(\mathcal{C}_{#1})}}
\newcommand{\resI}[2]{\ensuremath{\mathcal{S}_{#2}(X_{#1})}}
\newcommand{\resII}[2]{\mathcal{T}_{#2}(\mathcal{M}(X_{#1}))}
\newcommand{\resyI}[2]{\ensuremath{\tilde{\mathcal{S}}_{#2}(X_{#1})}}
\newcommand{\ressyI}[3]{\ensuremath{\tilde{\mathcal{S}}_{#3}^{#1}(X_{#2})}}
\newcommand{\ResI}[2]{\mathcal{S}^{#2}_{#1_{#2}}(X_{#1_{1} \ldots #1_{#2 - 1}})}

\newcommand{\averes}[3]{\ensuremath{\tilde{\mathcal{S}}^{#1}_{#3}(\overline{X}_{#2})}}
\newcommand{\averescol}[3]{\ensuremath{\overline{\mathcal{S}}^{#1}_{#3}(\mathcal{C}_{#2})}}



\newcommand{\lincom}[1]{\ensuremath{\langle #1 \rangle}}

\newcommand{\col}[4]{\ensuremath{[#1_{#2}, #1_{#3}, \ldots, #1_{#4}]^{T}}}
\newcommand{\adjexp}[2]{\ensuremath{E_{#2}(#1)}}
\newcommand{\adjvar}[2]{\ensuremath{Var_{#2}(#1)}}
\newcommand{\matric}[2]{ \left( \begin{array}{cc}
   #1 & #2 \\
   #2 & #1 
\end{array}  \right) }

%these ones still to be edited
\newcommand{\meanI}[1]{\mathcal{M}(\overline{X}_{#1})}
\newcommand{\meanyI}[1]{\tilde{\mathcal{M}}(\overline{X}_{#1})}
\newcommand{\resyII}[2]{\tilde{\mathcal{R}}_{#2}(\overline{X}_{#1})}
\newcommand{\matris}[4]{ \left( \begin{array}{cccc}
              #1 & #4 & \ldots & #4 \\
              #4 & #2 & \ldots & #4 \\
          \vdots & \vdots & \ddots & \vdots \\
              #4 & #4 & \ldots & #3 
              \end{array}  \right) }
\newcommand{\matricI}[3]{ \left( \begin{array}{ccc}
              #1 & \ldots & #3 \\
          \vdots & \ddots & \vdots \\
              #3 & \ldots & #2 
              \end{array}  \right) }
\newcommand{\matricII}[2]{ \left( \begin{array}{cccc}
              #1_{11}  & #1_{21}  & \ldots & #1_{#2 1}  \\
              #1_{12}  & #1_{22}  & \ldots & #1_{#2 2}  \\
              \vdots     & \vdots     & \ddots & \vdots \\
              #1_{1 #2}  & #1_{2 #2}  & \ldots & #1_{#2 #2}   
              \end{array}  \right) }
\newcommand{\matricIII}[4]{ \left( \begin{array}{ccc}
              #1     &  \ldots  & #2  \\
              \vdots &          & \vdots \\
              #3     &  \ldots  & #4 
              \end{array}  \right) }
\newcommand{\meanvec}[1]{\mathcal{M}(X_{#1})}
\newcommand{\resvec}[2]{\mathcal{R}_{#2}(X_{#1})}

