---
title: Statistical Analysis
subtitle: Exercises solutions
author:
  - Michele Guerini Rocco
  - Giulia Marcer
date: \today

lang: en-GB
numbersections: true
fontsize: 12pt
documentclass: article
classoption:
  - twoside
geometry:
  - width=150mm
  - top=20mm
  - bottom=30mm

header-includes: |
  ```{=latex}
  % misc packages
  \usepackage{etoolbox}
  \usepackage{tikz}
  \usepackage{siunitx}

  % start new page with each section
  \pretocmd{\section}{\clearpage}{}{}

  % strict figure placement
  \usepackage{float}
  \floatplacement{figure}{H}


  %% colors
  \definecolor{cyclamen}{RGB}{146,24,43}
  \definecolor{brick}{RGB}{160,54,35}


  %% customer macros
  % "with" in formulas
  \DeclareMathOperator{\with}{%
    \hspace{30pt} \text{with} \hspace{30pt}
  }

  % "thus" in formulas
  \DeclareMathOperator{\thus}{%
    \hspace{30pt} \Longrightarrow \hspace{30pt}
  }

  % "et" in formulas
  \DeclareMathOperator{\et}{%
  \hspace{30pt} \wedge \hspace{30pt}
  }

  % "if" in formulas
  \DeclareMathOperator{\incase}{%
  \hspace{20pt} \text{if} \hspace{20pt}
  }

  % expectation and variance operators
  \DeclareMathOperator{\Exp}{\mathbb{E}}
  \DeclareMathOperator{\Var}{Var}

  % average value with angle brakets
  \newcommand{\avg}[1]{\langle#1\rangle}


  % book cover
  \makeatletter
  \renewcommand\maketitle{
    \begin{titlepage}
    \begin{center}
      {\LARGE STATISTICAL ANALYSIS \par}
      {\Huge \bfseries EXERCISES SOLUTIONS \par}
      \vspace{8mm}
      {\Large\uppercase{
        A detailed exposition on the exercises of the
        Statistical Analysis course and their solutions.
        Written in a time of great pestilence} \par}
      \vspace{8mm}
      {\Large BY \par}
      \vspace{8mm}
      {\Large\bfseries GIULIA MARCER \par}
      {\large AND \par}
      {\Large\bfseries MICHELE GUERINI ROCCO \par}
      \vfill
      \includegraphics[width=5cm]{images/cover.pdf}
      \vfill
      {\large \@date, Lombardy \par
              University of Milano Bicocca}
    \end{center}
    \end{titlepage}
  }
  \makeatother

  % configure captions
  \usepackage{caption}
  \captionsetup{font={footnotesize,it}}
  \captionsetup{width=11cm}
  \usepackage{stmaryrd}

  % configure head/footers
  \usepackage{fancyhdr}
  \pagestyle{fancy}
  \renewcommand{\sectionmark}[1]{\markboth{#1}{}} % no section number
  \renewcommand{\headrule}{\hbox to\headwidth{%
    \color{brick}\leaders\hrule height 0.8pt\hfill}}
  \renewcommand{\footrule}{\hbox to\headwidth{%
    \color{gray}\leaders\hrule height 0.8pt\hfill}}
  \fancyfoot{}
  \fancyfoot[LO,RE]{\vspace{2mm}Giulia Marcer, Michele Guerini Rocco}
  \fancyfoot[RO,LE]{\vspace{2mm}\thepage}
  ```

bibliography: docs/bibliography.bib
csl: docs/bibliography.csl
...