6bfbe484f3345e0fedfa2b7d37a5179e9e7a38cc
   1\documentclass[a4paper]{article}
   2\usepackage[a4paper,margin=2cm]{geometry}
   3\usepackage{array}
   4\usepackage{amsmath}
   5\usepackage{amssymb}
   6\usepackage{tcolorbox}
   7\usepackage{fancyhdr}
   8\usepackage{pgfplots}
   9\usepackage{tabularx}
  10
  11\pagestyle{fancy}
  12\fancyhead[LO,LE]{Unit 3 Methods Statistics}
  13\fancyhead[CO,CE]{Andrew Lorimer}
  14
  15\setlength\parindent{0pt}
  16
  17\begin{document}
  18
  19  \title{Statistics}
  20  \author{}
  21  \date{}
  22  \maketitle
  23
  24  \section{Probability}
  25
  26  \[ \Pr(A \cup B) = \Pr(A) + \Pr(B) - \Pr(A \cap B) \]
  27  \[ \Pr(A \cup B) = 0 \tag{mutually exclusive} \]
  28
  29  \section{Conditional probability}
  30
  31  \[ \Pr(A|B) = \frac{\Pr(A \cap B)}{\Pr(B)} \quad \text{where } \Pr(B) \ne 0 \]
  32  
  33  \[ \Pr(A) = \Pr(A|B) \cdot \Pr(B) + \Pr(A|B^{\prime}) \cdot \Pr(B^{\prime}) \tag{law of total probability} \]
  34  
  35  \[ \Pr(A \cap B) = \Pr(A|B) \times \Pr(B) \tag{multiplication theorem} \]
  36
  37  For independent events:
  38  
  39  \begin{itemize}
  40    \item \(\Pr(A \cap B) = \Pr(A) \times \Pr(B)\)
  41    \item \(\Pr(A|B) = \Pr(A)\)
  42    \item \(\Pr(B|A) = \Pr(B)\)
  43  \end{itemize}
  44
  45  \subsection{Discrete random distributions}
  46
  47  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}.
  48
  49  \subsubsection{Discrete probability distributions}
  50  
  51  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.
  52
  53  \begin{itemize}
  54    \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.
  55    \item \textbf{Mean $\mu$} or \textbf{expected value} \(E(X)\) - measure of central tendency. Also known as \textit{balance point}. Centre of a symmetrical distribution.
  56      \begin{align*}
  57        \overline{x} = \mu = E(X) &= \frac{\Sigma(xf)}{\Sigma(f)} \\
  58        &= \sum_{i=1}^n (x_i \cdot P(X=x_i)) \\
  59        &= \int_{-\infty}^{\infty} x\cdot f(x) \> dx \quad \text{(for pdf } f \text{)}
  60        &= \sum_{-\infty}^{\infty} 
  61      \end{align*}
  62    \item \textbf{Mode} - most popular value (has highest probability of \(X\) values). Multiple modes can exist if \(>1 \> X\) value have equal-highest probability. Number must exist in distribution.
  63    \item \textbf{Median \(m\)} - the value of \(x\) such that \(\Pr(X \le m) = \Pr(X \ge m) = 0.5\). If \(m > 0.5\), then value of \(X\) that is reached is the median of \(X\). If \(m = 0.5 = 0.5\), then \(m\) is halfway between this value and the next.
  64      \[ m = X \> \text{such that} \> \int_{-\infty}^{m} f(x) dx = 0.5 \]
  65    \item \textbf{Variance $\sigma^2$} - measure of spread of data around the mean. Not the same magnitude as the original data. For distribution \(x_1 \mapsto p_1, x_2 \mapsto p_2, \dots, x_n \mapsto p_n\):
  66      \begin{align*}
  67        \sigma^2=\operatorname{Var}(x) &= \sum_{i=1}^n p_i (x_i-\mu)^2 \\
  68        &= \sum (x-\mu)^2 \times \Pr(X=x) \\
  69        &= \sum x^2 \times p(x) - \mu^2
  70      \end{align*}
  71    \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)}$
  72  \end{itemize}
  73
  74  \subsubsection{Expectation theorems}
  75
  76  \begin{align*}
  77    E(aX \pm b) &= aE(X) \pm b \\
  78    E(z) &= z \\
  79    E(X+Y) &= E(X) + E(Y) \\
  80    E(X)^n &= \Sigma x^n \cdot p(x) \\
  81    &\ne [E(X)]^2
  82  \end{align*}
  83
  84
  85  \section{Binomial Theorem}
  86
  87  \begin{align*}
  88    (x+y)^n &= {n \choose 0} x^n y^0 + {n \choose 1} x^{n-1}y^1 + {n \choose 2} x^{n-2}y^2 + \dots + {n \choose n-1}x^1 y^{n-1} + {n \choose n} x^0 y^n \\
  89    &= \sum_{k=0}^n {n \choose k} x^{n-k} y^k \\
  90    &= \sum_{k=0}^n {n \choose k} x^k y^{n-k}
  91  \end{align*}
  92
  93  \begin{enumerate}
  94    \item powers of \(x\) decrease \(n \rightarrow 0\)
  95    \item powers of \(y\) increase \(0 \rightarrow n\)
  96    \item coefficients are given by \(n\)th row of Pascal's Triangle where \(n=0\) has one term
  97    \item Number of terms in \((x+a)^n\) expanded \& simplified is \(n+1\)
  98  \end{enumerate}
  99
 100  Combinations: \(^n\text{C}_r = {N\choose k}\) (binomial coefficient) 
 101  \begin{itemize}
 102    \item Arrangements \({n \choose k} = \frac{n!}{(n-r)}\)
 103    \item Combinations \({n \choose k} = \frac{n!}{r!(n-r)!}\)
 104    \item Note \({n \choose k} = {n \choose k-1}\)
 105  \end{itemize}
 106
 107  \subsubsection{Pascal's Triangle}
 108
 109  \begin{tabular}{>{$}l<{$\hspace{12pt}}*{13}{c}}
 110    n=\cr0&&&&&&&1&&&&&&\\
 111    1&&&&&&1&&1&&&&&\\
 112    2&&&&&1&&2&&1&&&&\\
 113    3&&&&1&&3&&3&&1&&&\\
 114    4&&&1&&4&&6&&4&&1&&\\
 115    5&&1&&5&&10&&10&&5&&1&\\
 116    6&1&&6&&15&&20&&15&&6&&1
 117  \end{tabular}
 118
 119\end{document}