\usepackage{array, amssymb, amsthm, linguex, enumerate, amsmath, physics, enumitem, xcolor, graphicx, xparse} \usepackage[english]{babel} \usepackage[letterpaper,top=2cm,bottom=2cm,left=3cm,right=3cm,marginparwidth=1.75cm]{geometry} \usepackage[colorlinks=true, allcolors=blue]{hyperref} \usepackage[group-separator={,}]{siunitx} %\num{12345} -> "12,345" \newcommand{\R}{\mathbb{R}} \newcommand{\C}{\mathbb{C}} \newcommand{\N}{\mathbb{N}} \newcommand{\F}{\mathbb{F}} \renewcommand{\Re}{\operatorname{Re}} \renewcommand{\Im}{\operatorname{Im}} \newcommand{\pmp}{\,\pm\,} %add small extra space to \pm \NewDocumentCommand{\ceil}{ s m }{% expectation with parenthesis \IfBooleanTF{#1}% {\lceil #2 \rceil}% starred: dfrac {\left\lceil #2 \right\rceil}% unstarred: normal frac } \NewDocumentCommand{\ceiling}{ s m }{% expectation with parenthesis \IfBooleanTF{#1}% {\lceil #2 \rceil}% starred: dfrac {\left\lceil #2 \right\rceil}% unstarred: normal frac } \NewDocumentCommand{\floor}{ s m }{% expectation with parenthesis \IfBooleanTF{#1}% {\lfloor #2 \rfloor}% starred: dfrac {\left\lfloor #2 \right\rfloor}% unstarred: normal frac } \NewDocumentCommand{\pars}{ s m }{% expectation with parenthesis \IfBooleanTF{#1}% {( #2 ) }% starred: dfrac {\left( #2 \right) }% unstarred: normal frac } \NewDocumentCommand{\inner}{ s m }{% expectation with parenthesis \IfBooleanTF{#1}% {\langle #2 \rangle}% starred: dfrac {\left\langle #2 \right\rangle}% unstarred: normal frac } \NewDocumentCommand{\brac}{ s m }{% expectation with parenthesis \IfBooleanTF{#1}% {[#2] }% starred: dfrac {\left[ #2 \right] }% unstarred: normal frac } \newcommand{\biggbrac}[1]{\bigg[ {#1} \bigg] } \newcommand{\bigbrac}[1]{\big[ {#1} \big] } \newcommand{\Bigbrac}[1]{\Big[ {#1} \Big] } \RenewDocumentCommand{\over}{ s m }{% expectation with parenthesis \IfBooleanTF{#1}% {\dfrac{1}{#2}}% starred: dfrac {\frac{1}{#2}}% unstarred: normal frac } \NewDocumentCommand{\pover}{ s m }{% expectation with parenthesis \IfBooleanTF{#1}% {\left(\dfrac{1}{#2}\right)}% starred: dfrac {\left(\frac{1}{#2}\right)}% unstarred: normal frac } \NewDocumentCommand{\pfrac}{ s m m}{% expectation with parenthesis \IfBooleanTF{#1}% {\left( \dfrac{{#2}}{{#3}} \right)}% starred: dfrac {\left( \frac{{#2}}{{#3}} \right)}% unstarred: normal frac } \newcommand{\Xbar}{\bar{X}} \newcommand{\Ybar}{\bar{Y}} \newcommand{\xbar}{\bar{x}} \newcommand{\ybar}{\bar{y}} \newcommand{\limn}{\lim_{n\to\infty}} \newcommand{\gammaDist}[2]{\operatorname{Gamma} \left( {#1},{#2} \right)} \NewDocumentCommand{\normalDist}{s g g}{% \IfBooleanTF{#1} { % starred, no autosizing \IfNoValueTF{#2}{ N (\mu,\, \sigma^2 ) %\normalDist* } { \IfNoValueTF{#3}{N (#2)}{} %only 1 real parameter } \IfNoValueTF{#3}{}{N ( #2, #3 )} %\normalDist*{a}{b} } % else (unstarred) autosize { \IfNoValueTF{#2}{ N \left(\mu,\, \sigma^2 \right) %\normalDist } { \IfNoValueTF{#3}{N \left(#2\right)}{} %only 1 real parameter } \IfNoValueTF{#3}{}{N \left( #2, #3 \right)} %\normalDist{a}{b} } } %colors \definecolor{ggreen}{RGB}{0, 127, 0} \definecolor{dgray}{RGB}{63,63,63} \definecolor{neonorange}{RGB}{255,47,0} \definecolor{mygray}{rgb}{0.5,0.5,0.5} \definecolor{eblue}{RGB}{0,74,127} \newcommand{\red}[1]{\color{red}{#1}\color{black}} \newcommand{\green}[1]{\color{ggreen}{#1}\color{black}} \newcommand{\blue}[1]{\color{blue}{#1}\color{black}} \newcommand{\setRed}{\color{red}} \newcommand{\setBlack}{\color{black}} \newcommand{\setBlue}{\color{blue}} \newcommand{\setGreen}{\color{ggreen}} \newcommand{\thru}[1]{{#1}_1, \dots, {#1}_n} \newcommand{\sumThru}[1]{{#1}_1 + \cdots + {#1}_n} \newcommand{\yn}{Y_1, \dots, Y_n} % Y_1, ..., Y_n \newcommand{\xn}{X_1, \dots, X_n} % Y_1, ..., Y_n \newcommand{\that}{\widehat{\theta}} % theta hat \newcommand{\phat}{\widehat{p}} % p hat \newcommand{\qhat}{\widehat{q}} % p hat \newcommand{\psihat}{\widehat{\psi}} % psi hat \newcommand{\Psihat}{\widehat{\Psi}} % Psi hat \newcommand{\ptilde}{\widetilde{p}} % psi tilde \newcommand{\Psitil}{\widetilde{\Psi}} % Psi tilde \newcommand{\betah}{\widehat{\beta}} % beta hat \newcommand{\detx}[4]{\begin{vmatrix}{#1} & {#2}\\{#3}&{#4}\end{vmatrix}} % 2x2 determinant \newcommand{\bmat}[4]{\begin{bmatrix}{#1} & {#2}\\{#3}&{#4}\end{bmatrix}} % 2x2 matrix brackets \renewcommand{\pmat}[4]{\begin{pmatrix}{#1} & {#2}\\{#3}&{#4}\end{pmatrix}} % 2x2 matrix parenthesis %remove any enumerate/itemize indent temporarily \makeatletter %% <- make @ usable in macro names \newcommand*\notab[1]{% \begingroup %% <- limit scope of the following changes \par %% <- start a new paragraph \@totalleftmargin=0pt \linewidth=\columnwidth %% ^^ let other commands know that the margins have been reset \parshape 0 %% ^^ reset the margins #1\par %% <- insert #1 and end this paragraph \endgroup } \makeatother %% <- revert @ \renewcommand{\L}[1]{\mathcal{L}\left({#1}\right)} %Linear Map \newcommand{\dimrange}[1]{\operatorname{dim}\operatorname{range}{#1}} % dimrange \newcommand{\dimnull}[1]{\operatorname{dim}\operatorname{null}{#1}} % dimnull \newcommand{\range}[1]{\operatorname{range}{#1}} %range \newcommand{\nullspace}{\operatorname{null}} %null % polynomial notation \NewDocumentCommand{\poly}{ s g g }{% \IfBooleanTF{#1} { \IfNoValueTF{#2} { \mathcal{P}(\mathbb{R}) } { \mathcal{P}_{#2}(\mathbb{R}) } } { \IfNoValueTF{#3} { {\mathcal{P}(#2)} } { %else {\mathcal{P}_{#2}(#3)} } } } \NewDocumentCommand{\bias}{ s m }{% \IfBooleanTF{#1}% {\operatorname{bias}(#2)}% starred {\operatorname{bias}\left(#2\right)}% unstarred } \NewDocumentCommand{\MSE}{ s m }{% \IfBooleanTF{#1}% {\operatorname{MSE}(#2)}% starred {\operatorname{MSE}\left(#2\right)}% unstarred } \NewDocumentCommand{\Var}{ s m }{% variance with parenthesis \IfBooleanTF{#1}% {\operatorname{Var}(#2)}% starred: no autosizing {\operatorname{Var}\left(#2\right)}% unstarred: has autosizing } \NewDocumentCommand{\Varb}{ s m }{% variance with brackets \IfBooleanTF{#1}% {\operatorname{Var}[\,#2\,]}% starred: no autosizing {\operatorname{Var}\left[\,#2\,\right]}% unstarred: has autosizing } \NewDocumentCommand{\Vb}{ s m }{% variance with brackets \IfBooleanTF{#1}% {\operatorname{Var}[\,#2\,]}% starred: no autosizing {\operatorname{Var}\left[\,#2\,\right]}% unstarred: has autosizing } \NewDocumentCommand{\E}{ s m }{% expectation with parenthesis \IfBooleanTF{#1}% {\operatorname{E}(#2)}% starred: no autosizing {\operatorname{E}\left(#2\right)}% unstarred: has autosizing } \NewDocumentCommand{\Eb}{ s m }{% expectation with brackets \IfBooleanTF{#1}% {\operatorname{E}[#2]}% starred: no autosizing {\operatorname{E}\left[#2\right]}% unstarred: has autosizing } \RenewDocumentCommand{\P}{ s m }{% expectation with parenthesis \IfBooleanTF{#1}% {\Pr (#2) }% starred: no autosizing {\Pr \left( #2 \right) }% unstarred: has autosizing } \NewDocumentCommand{\prob}{ s m }{% expectation with parenthesis \IfBooleanTF{#1}% {\Pr (#2) }% starred: no autosizing {\Pr \left( #2 \right) }% unstarred: has autosizing } \NewDocumentCommand{\eff}{ s m }{% efficiency with parenthesis \IfBooleanTF{#1}% {\operatorname{eff}(#2)}% starred: no autosizing {\operatorname{eff}\left(#2\right)}% unstarred: has autosizing } %vertical vector of up to 8 elements \NewDocumentCommand\vvec{s m g g g g g g g}{% \IfBooleanTF{#1} { \begin{bmatrix}% if starred use brackets \IfNoValueTF{#2}{}{#2} \IfNoValueTF{#3}{}{\\#3} \IfNoValueTF{#4}{}{\\#4} \IfNoValueTF{#5}{}{\\#5} \IfNoValueTF{#6}{}{\\#6} \IfNoValueTF{#7}{}{\\#7} \IfNoValueTF{#8}{}{\\#8} \end{bmatrix} } % else (unstarred) use parethesis { \begin{pmatrix}% \IfNoValueTF{#2}{}{#2} \IfNoValueTF{#3}{}{\\#3} \IfNoValueTF{#4}{}{\\#4} \IfNoValueTF{#5}{}{\\#5} \IfNoValueTF{#6}{}{\\#6} \IfNoValueTF{#7}{}{\\#7} \IfNoValueTF{#8}{}{\\#8} \end{pmatrix} } } \def\df{\text{df}} \NewDocumentCommand{\example}{ s g }{% Example header \IfBooleanTF{#1}% {\vspace{0.1in}}% starred: 0.1in {\vspace{0.2in}}% unstarred: 0.2in \IfNoValueTF{#2} {\noindent\textbf{\color{eblue} Example: }}{\noindent\textbf{\color{eblue} Example (#2): }} } \NewDocumentCommand{\disc}{ s }{% Discussion header \IfBooleanTF{#1}% {\vspace{0.1in}\noindent\textbf{Discussion: } }% starred: 0.1in {\vspace{0.2in}\noindent\textbf{Discussion: } }% unstarred: 0.2in } \NewDocumentCommand{\defn}{ s }{% Definition header \IfBooleanTF{#1}% {\vspace{0.1in}\noindent\textbf{\color{neonorange} Definition: } }% starred: 0.1in {\vspace{0.2in}\noindent\textbf{\color{neonorange} Definition: } }% unstarred: 0.2in } \NewDocumentCommand{\reason}{ s }{% Reason header \IfBooleanTF{#1}% {\vspace{0.1in}\noindent\textbf{Reason:} }% starred: 0.1in {\vspace{0.2in}\noindent\textbf{Reason:} }% unstarred: 0.2in } \NewDocumentCommand{\recall}{ s }{% Recall header \IfBooleanTF{#1}% {\vspace{0.1in}\noindent\textit{Recall:} }% starred: 0.1in {\vspace{0.2in}\noindent\textit{Recall:} }% unstarred: 0.2in } \NewDocumentCommand{\remark}{ s }{% Remark header \IfBooleanTF{#1}% {\vspace{0.1in}\noindent\textit{Remark:} }% starred: 0.1in {\vspace{0.2in}\noindent\textit{Remark:} }% unstarred: 0.2in } \newcommand{\proj}[2]{\operatorname{proj}_{{#1}}{#2}} \def\Cov{\operatorname{Cov}} \newcommand{\wideand}{\qquad \text{and} \qquad} \newcommand{\bu}[1]{\textbf{\underline{{#1}}} } %bold underline \newcommand{\boldit}[1]{\textbf{\textit{{#1}}} } %bold italix % put actual quotation marks "around something" \newcommand{\say}[1]{\textquotedblleft{#1}\textquotedblright} \renewcommand{\max}[1]{\operatorname{max}\left\{ #1 \right\}} \renewcommand{\min}[1]{\operatorname{min}\left\{ #1 \right\}} \newcommand{\cir}[1]{\textcircled{\raisebox{-1pt}{#1}}} %Create a new vspace line no indent \newcommand{\nl}{\vspace{0.1in}\noindent} \newcommand{\nnl}{\vspace{0.2in}\noindent} \newcommand{\nnnl}{\vspace{0.3in}\noindent}