\documentclass[a4paper]{article}
\usepackage[a4paper,margin=2cm]{geometry}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{tcolorbox}
\usepackage{fancyhdr}
\usepackage{pgfplots}
\usepackage{tabularx}

\pagestyle{fancy}
\fancyhead[LO,LE]{Unit 3 Methods Statistics}
\fancyhead[CO,CE]{Andrew Lorimer}

\setlength\parindent{0pt}

\begin{document}

  \title{Statistics}
  \author{}
  \date{}
  \maketitle

  \section{Probability}

  \[ \Pr(A \cup B) = \Pr(A) + \Pr(B) - \Pr(A \cap B) \]
  \[ \Pr(A \cup B) = 0 \tag{mutually exclusive} \]

  \section{Conditional probability}

  \[ \Pr(A|B) = \frac{\Pr(A \cap B)}{\Pr(B)} \quad \text{where } \Pr(B) \ne 0 \]
  
  \[ \Pr(A) = \Pr(A|B) \cdot \Pr(B) + \Pr(A|B^{\prime}) \cdot \Pr(B^{\prime}) \tag{law of total probability} \]
  
  \[ \Pr(A \cap B) = \Pr(A|B) \times \Pr(B) \tag{multiplication theorem} \]

  For independent events:
  
  \begin{itemize}
    \item \(\Pr(A \cap B) = \Pr(A) \times \Pr(B)\)
    \item \(\Pr(A|B) = \Pr(A)\)
    \item \(\Pr(B|A) = \Pr(B)\)
  \end{itemize}

  \subsection{Discrete random distributions}

  Any experiment or activity involving chance will have a probability associated with each result or \textit{outcome}. If the outcomes have a reference to \textbf{discrete numeric values} (outcomes that can be counted), and the result is unknown, then the activity is a \textit{discrete random probability distribution}.

  \subsubsection{Discrete probability distributions}
  
  If an activity has outcomes whose probability values are all positive and less than one ($\implies 0 \le p(x) \le 1$), and for which the sum of all outcome probabilities is unity ($\implies \sum p(x) = 1$), then it is called a \textit{probability distribution} or \textit{probability mass} function.

  \begin{itemize}
    \item \textbf{Probability distribution graph} - a series of points on a cartesian axis representing results of outcomes. $\Pr(X=x)$ is on $y$-axis, $x$ is on $x$ axis.
    \item \textbf{Mean $\mu$} - measure of central tendency. \textit{Balance point} or \textit{expected value} of a distribution. Centre of a symmetrical distribution.
    \item \textbf{Variance $\sigma^2$} - measure of spread of data around the mean. Not the same magnitude as the original data. Represented by $\sigma^2=\operatorname{Var}(x) = \sum (x=\mu)^2 \times p(x) = \sum (x-\mu)^2 \times \Pr(X=x)$. Alternatively: $\sigma^2 = \operatorname{Var}(X) = \sum x^2 \times p(x) - \mu^2$
    \item \textbf{Standard deviation $\sigma$} - measure of spread in the original magnitude of the data. Found by taking square root of the variance: $\sigma =\operatorname{sd}(X)=\sqrt{\operatorname{Var}(X)}$
  \end{itemize}

\end{document}
