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

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

\setlength\parindent{0pt}

\begin{document}

  \title{\large Year 12 Methods \\ \huge Unit 3 Revision Lecture \\ \large Monash University \\ presented by Kevin McMenamin}
  \author{Andrew Lorimer}
  \date{5 July 2019}
  \renewcommand{\abstractname}{}
  \maketitle

  \section{Graphs}

  \textbf{16 types of graph}---put in reference book:
  \begin{multicols}{2}
  \begin{enumerate}
    \item truncus
    \item hyperbola
    \item sqrt
    \item parabola
    \item cubic
    \item quartic
    \item linear
    \item circle
    \item semicircle
    \item tan
    \item sin
    \item cos
    \item log
    \item exp
    \item $x^{a \over b}$
    \item $x^{-a \over b}$
  \end{enumerate}
  \end{multicols}

  \subsection{Power functions}
  
  \begin{itemize}
    \item In first quadrant, shape of graph for $x>0 \cap y>0$ is either $\sqrt{x}$ or $x^2$
  \end{itemize}

  \subsection{Features of graphs}
  
  \begin{itemize}
    \item Asymptotes
    \item Intercepts
    \item Stationary points
    \item Endpoints
    \item Other critical points
    \item Continuous or discontinuous
  \end{itemize}

  \begin{tcolorbox}[title=Key points]
  \begin{itemize}
    \item All transformations can be described by matrices
    \item Inverse is a transformation
    \item Memorise approximate values of $e,\>\pi,\>\sqrt{2},\>\sqrt{3}$
    \item Put 16 base graphs in reference book
  \end{itemize}
  \end{tcolorbox}

  \section{Transformations}

  Order: \qquad \textbf{Reflect $\longrightarrow$ Dilate $\longrightarrow$ Translate}

  \subsection{Two forms}
  
  \begin{itemize}
    \item note $a$ and $b$ can be positive or negative
    \item check validity of solutions for logarithms
    \item results in transformed equation $y^\prime = f^\prime(x)$
  \end{itemize}

  \[ y^\prime = a \cdot f(\dfrac{1}{b} (x^\prime - c)) + d \]
  \[
    \begin{bmatrix}
      x^\prime \\ y^\prime
    \end{bmatrix}
    =
    \begin{bmatrix}
      b & 0 \\
      0 & a
    \end{bmatrix}
    \begin{bmatrix}
      x \\ y
    \end{bmatrix}
    +
    \begin{bmatrix}
      c \\d
    \end{bmatrix}
  \]

  \begin{tcolorbox}[title=Key points]
  \begin{itemize}
    \item All transformations can be described by matrices
    \item Inverse is a transformation
    \item Check validity of $\log_a x$ solutions/transformations
  \end{itemize}
  \end{tcolorbox}

  \section{Calculus}

  Possible questions:
  \begin{itemize}
    \item Average rate of change
    \item Instantaneous rate of change
    \item Tangent line
    \item Normal line
    \item Features of gradient function
      \begin{itemize}
        \item Degree
        \item Orientation
        \item Format
        \item Turning points
        \item Inflection points
        \item Asymptotes
      \end{itemize}
    \item Find original function from derivative\\
      $\longrightarrow$ \textit{Use information to find unknowns}
    \item Application questions - e.g. Pythagoras, trig. functions, measurement, given eqn
  \end{itemize}

  \subsection{Integration}

  \subsubsection{Polynomials}

  \[ f(x) = \int ax^n \> dx = \dfrac{ax^{n+1}}{n+1}+c \>, \quad n \ne -1 \]
  \[f(x) = \int (ax+b)^n \> dx = \dfrac{(ax+b)^{n+1}}{a(n+1)}+c \>, \quad n \ne -1 \]

  \subsubsection{Exponentials}

  \[ f(x) = \int e^{ax+b} \> dx = \dfrac{e^{ax+b}}{a}+c \]

  \subsubsection{Logarithms}

  \textit{ignore modulus for methods}
  \[ f(x) = \int \dfrac{1}{x} \> dx = \ln|x| + c \]
  \[ f(x) = \int \dfrac{1}{ax+b} \> dx = \dfrac{1}{a} \ln|ax+b| + c \]
  \[ f(x) - \int \dfrac{h^\prime (x)}{h(x)} \> dx = \ln|h(x)|+c \tag{general form}\]

  \subsubsection{Trigonometric functions}

  \[ f(x) = \int \cos(ax+b) \> dx = \dfrac{1}{a} \sin (ax+b) + c \]
  \[ f(x) = \int \sin(ax+b) \> dx = -\dfrac{1}{a}\sin(ax+b) + c \]
  \[ f(x) = \int \sec^2(ax+b) \> dx = \dfrac{1}{a}\tan(ax+b) + c \]

  \subsection{Area under curves}

  \begin{itemize}
    \item \textbf{Upper rectangles} (overestimate) vs. \textbf{lower rectangles} (underestimate)
    \item Rotate (invert) graph to make it easier, e.g. $y=\sqrt{x} \longrightarrow x=y^2$
  \end{itemize}

  \begin{tcolorbox}[title=Key points]
  \begin{itemize}
    \item For \textit{an} antiderivative, \qquad $+c \quad \forall \> c \in \mathbb{R}$ \qquad is also acceptable
    \item Practice multi-part problems e.g:
      \begin{enumerate}[label={\alph*)}]
        \item Let $f:\mathbb{R}\rightarrow\mathbb{R},\quad f(x)=x\sin x$. Find $f^\prime(x)$.
        \item Use the result of (a) to find the value of $\int^{\frac{\pi}{2}}_{\frac{\pi}{6}} x \cos x \> dx$ in the form $a\pi + b$.
      \end{enumerate}
  \end{itemize}
  \end{tcolorbox}

  \section{Probability}

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

  \subsection{Conditional probability}

  \[ \Pr(A|B)=\dfrac{\Pr(A \cap B)}{\Pr(B)} \]
  \[ \Pr(A \cap B) = \Pr(A|B) \times \Pr(B) \tag{multiplication theorem} \]
  \[ \Pr(A \cap B) = \Pr(A) \times \Pr(B) \tag{independent events} \]

  \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}

  \subsection{Binomial distribution (Bernoulli trials)}
  
  A type of discrete probability distribution. This distribution has the following characteristics:
  
  \begin{enumerate}
    \item Samples are taken from a population size that remains constant (\textit{sampling with replacement})
    \item Every result or trial can be classed as either a \textit{success} or \textit{failure}
    \item The probability of a succcess is the same from one trial to the next, notated by $p$
    \item The probability of a failure is the complement of the probability of a success, notated by $1-p$
    \item There are a finite number of trials that define the sample size, notated by $n$
  \end{enumerate}
  
  \subsubsection{Bernoulli trials}
  
  Same properties as above. Number of successes in a finite number of Bernoulli trials is defined as the \textbf{binomial distribution}. The distribution can take the form:
  \[X \sim \operatorname{Bi}(n,p) \]
  
  Then, the probability values for each value of $X$ follow the rule:
  \[ p(x) = \begin{bmatrix}n\\x\end{bmatrix}(p)^x(1-p)^{n-x} \]

  \subsection{Continuous random distributions}

  If the outcomes of an activity have a reference to \textit{continuous numeric} values (outcomes that can be measured), then the activity is associated with a \textbf{continuous probability distribution}. The probabilities are calculuated by finding the area under the graph between the required $x$ values (integrate).

  The probability of a single \textit{outcome value} does not exist for continuous probability distributions.

  \subsection{Continuous probability distributions}

  If an experiment or activity has a \textbf{function} whose values are all positive ($\implies f(x) \ge 0 \forall x$), and for which the area under the graph between the lowest outcome value and the greatest outcome value is unity ($\implies \int^{\text{upper}}_{\text{lower}} f(x) \ dx = 1$), then it is called a \textbf{probability density function}.

  Example probability density function: $f(x)=\begin{cases}k(9-x^2), & 0\le x \le 3\\0, &\text{elsewhere}\end{cases}$

  \subsection{Normal distributions}
  
  A very specific and special continuous probability distribution. Characteristics:
  \begin{itemize}
    \item Many sets of data occurring naturally and taken randomly will have a normal distribution
    \item No single outcome value can be calculated
    \item Probabilities are found between certain outcome values of the distribution
    \item The values of the distribution are symmetrical around the mean ($\mu$) and form a bell-shaped curve
    \item The distribution is best described using its central or mean value, $\mu$, and its measure of spread, $\sigma$
    \item The distribution can take the form $X\sim N(\mu, \sigma^2)$
  \end{itemize}

  \pgfmathdeclarefunction{gauss}{2}{%
    \pgfmathparse{1/(#2*sqrt(2*pi))*exp(-((x-#1)^2)/(2*#2^2))}%
  }
  \pgfmathdeclarefunction{sndist}{0}{%
    \pgfmathparse{(1/sqrt(2*pi))*exp((-x^2)/2)}%
  }

  \begin{figure}
    \begin{center}
      \begin{tikzpicture}
        \begin{axis}[every axis plot post/.append style={
          mark=none,domain=-2:3,samples=50,smooth}, % All plots: from -2:2, 50 samples, smooth, no marks
          axis x line=bottom, % no box around the plot, only x and y axis
          axis y line=left, % the * suppresses the arrow tips
          enlargelimits=upper] % extend the axes a bit to the right and top
          \addplot {gauss(0,0.5)};
          \addplot [mark=*, blue] coordinates {(-1,0.4)} node[text width=1cm, font=\footnotesize]{$\mu=0$ \\ $\sigma=0.5$};
          \addplot [mark=*, red] coordinates {(2.5,0.4)} node[text width=2cm, font=\footnotesize]{$\mu=1$ \\ $\sigma=0.75$};
          \addplot {gauss(1,0.75)};
        \end{axis}
      \end{tikzpicture}
    \end{center}
    \caption{Two \textit{general} normal distributions}
  \end{figure}

  \begin{tabularx}{\textwidth}{X|X}
    \hline
    \begin{center}General normal distribution\end{center} & \begin{center}Standard normal distribution\end{center} \\ \hline
    \[ f(x) = \dfrac{1}{\sigma \sqrt{2\pi}}e^{-\frac{1}{2}\left(\dfrac{x-\mu}{\sigma}\right)^2} \] & \[ f(x) = \dfrac{1}{\sqrt{2\pi}}e^{-\frac{1}{2}x^2} \] \\ \hline
    \begin{tikzpicture}
      \begin{axis}[xtick={-2,0,2}, xticklabels={$\mu-3\sigma$,$\mu$,$\mu+3\sigma$}, every axis plot post/.append style={mark=none,domain=-3:3,samples=50,smooth}, % All plots: from -2:2, 50 samples, smooth, no marks
        axis x line=bottom, % no box around the plot, only x and y axis
        axis y line=none, % the * suppresses the arrow tips
        enlargelimits=upper] % extend the axes a bit to the right and top
        \addplot [orange] {gauss(0,0.75)};
      \end{axis}
    \end{tikzpicture}
    &
    \begin{tikzpicture}
      \begin{axis}[every axis plot post/.append style={mark=none,domain=-4:4,samples=50,smooth}, % All plots: from -2:2, 50 samples, smooth, no marks
        axis x line=bottom, % no box around the plot, only x and y axis
        axis y line=none, % the * suppresses the arrow tips
        enlargelimits=upper] % extend the axes a bit to the right and top
        \addplot [purple] {sndist};
      \end{axis}
    \end{tikzpicture}
    \\ \hline
  \end{tabularx}

\end{document}
