[methods] general notes additions
authorAndrew Lorimer <andrew@lorimer.id.au>
Sat, 28 Sep 2019 12:22:52 +0000 (22:22 +1000)
committerAndrew Lorimer <andrew@lorimer.id.au>
Sat, 28 Sep 2019 12:22:52 +0000 (22:22 +1000)
methods/longdiv.tex [new file with mode: 0644]
methods/methods-collated.pdf
methods/methods-collated.tex
spec/calculus-rules.tex [new file with mode: 0644]
spec/normal-dist-graph.tex
spec/spec-collated.pdf
spec/spec-collated.tex
spec/statistics.pdf
spec/statistics.tex
diff --git a/methods/longdiv.tex b/methods/longdiv.tex
new file mode 100644 (file)
index 0000000..4c9a1d4
--- /dev/null
@@ -0,0 +1,53 @@
+%  longdiv.tex  v.1  (1994)  Donald Arseneau  
+%
+%  Work out and print integer long division problems.  Use:
+%       \longdiv{numerator}{denominator}
+%  The numerator and denominator (divisor and dividend) must be integers, and
+%  the quotient is an integer too.  \longdiv leaves a remainder.
+%  Use this in any type of TeX.
+
+\newcount\gpten % (global) power-of-ten -- tells which digit we are doing
+\countdef\rtot2 % running total -- remainder so far
+\countdef\LDscratch4 % scratch
+
+\def\longdiv#1#2{%
+ \vtop{\normalbaselines \offinterlineskip
+   \setbox\strutbox\hbox{\vrule height 2.1ex depth .5ex width0ex}%
+   \def\showdig{$\underline{\the\LDscratch\strut}$\cr\the\rtot\strut\cr
+       \noalign{\kern-.2ex}}%
+   \global\rtot=#1\relax
+   \count0=\rtot\divide\count0by#2\edef\quotient{\the\count0}%\show\quotient
+   % make list macro out of digits in quotient:
+   \def\temp##1{\ifx##1\temp\else \noexpand\dodig ##1\expandafter\temp\fi}%
+   \edef\routine{\expandafter\temp\quotient\temp}%
+   % process list to give power-of-ten:
+   \def\dodig##1{\global\multiply\gpten by10 }\global\gpten=1 \routine
+   % to display effect of one digit in quotient (zero ignored):
+   \def\dodig##1{\global\divide\gpten by10
+      \LDscratch =\gpten
+      \multiply\LDscratch  by##1%
+      \multiply\LDscratch  by#2%
+      \global\advance\rtot-\LDscratch \relax
+      \ifnum\LDscratch>0 \showdig \fi % must hide \cr in a macro to skip it
+   }%
+   \tabskip=0pt
+   \halign{\hfil##\cr % \halign for entire division problem
+     $\quotient$\strut\cr
+     #2$\,\overline{\vphantom{\big)}%
+     \hbox{\smash{\raise3.5\fontdimen8\textfont3\hbox{$\big)$}}}%
+     \mkern2mu \the\rtot}$\cr\noalign{\kern-.2ex}
+     \routine \cr % do each digit in quotient
+}}}
+
+\endinput % Demonstration below:
+
+\noindent Here are some long division problems
+
+\indent
+\longdiv{12345}{13} \quad
+\longdiv{123}{1234} \quad
+\longdiv{31415926}{2} \quad
+\longdiv{81}{3} \quad
+\longdiv{1132}{99} \quad
+\longdiv{86491}{94}
+\bye
index 776aa119c23ac4e55c0d1a609e1dbf9f6805e2f3..35e900eddb3c27d47ecc19c8f006267cf35a6eb8 100644 (file)
Binary files a/methods/methods-collated.pdf and b/methods/methods-collated.pdf differ
index a3a1e796dc6cd2ae5b1aa0b637147ffbc0a1a394..4a0403a6248f93e03ae0378cc2e6c106cda9b30e 100644 (file)
@@ -18,6 +18,7 @@
 \usepackage{multirow}
 \usepackage{newclude}
 \usepackage{pgfplots}
 \usepackage{multirow}
 \usepackage{newclude}
 \usepackage{pgfplots}
+\usepackage{polynom}
 \usepackage{pst-plot}
 \usepackage{standalone}
 \usepackage{subfiles}
 \usepackage{pst-plot}
 \usepackage{standalone}
 \usepackage{subfiles}
@@ -97,6 +98,7 @@
 
 \newtcolorbox{cas}{colframe=cas!75!black, title=On CAS, left*=3mm}
 \newtcolorbox{warning}{colback=white!90!black, leftrule=3mm, colframe=important, coltext=important, fontupper=\sffamily\bfseries}
 
 \newtcolorbox{cas}{colframe=cas!75!black, title=On CAS, left*=3mm}
 \newtcolorbox{warning}{colback=white!90!black, leftrule=3mm, colframe=important, coltext=important, fontupper=\sffamily\bfseries}
+\newtcolorbox{theorembox}[1]{colback=green!10!white, colframe=blue!20!white, coltitle=black, fontupper=\sffamily, fonttitle=\sffamily, #1}
 
 
 \begin{document}
 
 
 \begin{document}
@@ -184,18 +186,22 @@ For \(x^n\), parity of \(n \equiv\) parity of function
 
   \begin{enumerate} \tightlist
     \item Write as matrices: \(\begin{bmatrix}p & q \\ r & s \end{bmatrix}  \begin{bmatrix} x \\ y \end{bmatrix}  =  \begin{bmatrix} a \\ b \end{bmatrix}\)
 
   \begin{enumerate} \tightlist
     \item Write as matrices: \(\begin{bmatrix}p & q \\ r & s \end{bmatrix}  \begin{bmatrix} x \\ y \end{bmatrix}  =  \begin{bmatrix} a \\ b \end{bmatrix}\)
-      \item Find determinant of first matrix: \(\Delta = ps-qr\)
-      \item Let \(\Delta = 0\) for number of solutions \(\ne 1\)\\
-        or let \(\Delta \ne 0\) for one unique solution.
-      \item Solve determinant equation to find variable \\
+      \item Find \(\det(\text{first matrix}) = ps-qr\)
+      \item Let \(\det = 0\) for \(\{0,\infty\}\) solutions
+        or \(\det \ne 0\) for 1 solution
+      \item Solve to find variable \\ \\
         \textbf{For infinite/no solutions:}
       \item Substitute variable into both original equations
         \textbf{For infinite/no solutions:}
       \item Substitute variable into both original equations
-      \item Rearrange equations so that LHS of each is the same
-      \item \(\text{RHS}(1) = \text{RHS}(2) \implies (1)=(2) \> \forall x\) (\(\infty\) solns)\\
-        \(\text{RHS}(1) \ne \text{RHS}(2) \implies (1)\ne(2) \> \forall x\) (0 solns)
+      \item Rearrange so that LHS of each is the same
+      \item \(\begin{aligned}[t]
+          \infty \text{ solns: } & \text{RHS}(1) = \text{RHS}(2) \implies (1)=(2) \> \forall x \\
+          0 \text{ solns: } & \text{RHS}(1) \ne \text{RHS}(2) \implies (1)\ne(2) \> \forall x
+      \end{aligned}\)
   \end{enumerate}
 
   \end{enumerate}
 
-  \colorbox{cas}{On CAS:} Matrix \(\rightarrow\) \texttt{det}
+  \begin{cas}
+    Action \(\rightarrow\) Matrix \(\rightarrow\) Calculation \(\rightarrow\) \texttt{det}
+  \end{cas}
 
   \subsubsection*{Solving \(\protect\begin{cases}a_1 x + b_1 y + c_1 z = d_1 \\ a_2 x + b_2 y + c_2 z = d_2 \\ a_3 x + b_3 y + c_3 z = d_3\protect\end{cases}\)}
 
 
   \subsubsection*{Solving \(\protect\begin{cases}a_1 x + b_1 y + c_1 z = d_1 \\ a_2 x + b_2 y + c_2 z = d_2 \\ a_3 x + b_3 y + c_3 z = d_3\protect\end{cases}\)}
 
@@ -304,6 +310,47 @@ For \(x^n\), parity of \(n \equiv\) parity of function
 
       \section{Polynomials}
 
 
       \section{Polynomials}
 
+      \subsection*{Factor theorem}
+
+      \begin{theorembox}{title=General form \(\beta x + \alpha\)}
+        If \(\beta x + \alpha\) is a factor of \(P(x)\), \\
+        \-\hspace{1em}then \(P(-\dfrac{\alpha}{\beta})=0\).
+      \end{theorembox}
+
+      \begin{theorembox}{title=Simple form \(x-a\)}
+        If \((x-a)\) is a factor of \(P(x)\), remainder \(R=0\). \\
+        \-\hspace{1em}\(\implies P(a)=0\)
+      \end{theorembox}
+
+      \subsection*{Remainder theorem}
+
+      \begin{theorembox}{}
+        When \(P(x)\) is divided by \(\beta x + \alpha\), the remainder is \(-\dfrac{\alpha}{\beta}\).
+      \end{theorembox}
+
+      \subsection*{Rational root theorem}
+      Let \(P(x) = a_n x^n + a_{n-1} x^{n-1} + \dots + a_1 x + a_0\) be a polynomial of degree \(n\) with \(a_i \in \mathbb{Z} \forall a\). Let \(\alpha, \beta \in \mathbb{Z}\) such that their highest common factor is 1 (i.e. relatively prime).
+
+      If \(\beta x + \alpha\) is a factor of \(P(x)\), then \(\beta\) divides \(a_n\) and \(\alpha\) divides \(a_0\) .
+
+      \subsubsection*{Discriminant}
+      \[\begin{cases}
+        b^2-4ac > 0 & \text{two solutions} \\
+        b^2-4ac = 0 & \text{one solution} \\
+        b^2-4ac < 0 & \text{no solutions}
+      \end{cases}\]
+      \begin{warning}
+        Flip inequality sign when multiplying by -1
+      \end{warning}
+
+      \subsection*{Long division}
+
+      \[ \polylongdiv{x^2+2x+4}{x-1} \]
+
+      \begin{cas}
+        Action \(\rightarrow\) Transformation \(\rightarrow\) \texttt{propFrac}
+      \end{cas}
+
       \subsection*{Linear equations}
 
       \subsubsection*{Forms}
       \subsection*{Linear equations}
 
       \subsubsection*{Forms}
@@ -322,8 +369,11 @@ For \(x^n\), parity of \(n \equiv\) parity of function
       Distance: \(|\vec{AB}| = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\)
 
       \subsection*{Quadratics}
       Distance: \(|\vec{AB}| = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\)
 
       \subsection*{Quadratics}
+
       \setlength{\abovedisplayskip}{1pt}
       \setlength{\belowdisplayskip}{1pt}
       \setlength{\abovedisplayskip}{1pt}
       \setlength{\belowdisplayskip}{1pt}
+
+      \textbf{Linear factorisation}
       \[ x^2 + bx + c = (x+m)(x+n) \]
       \hfill where \(mn=c, \> m+n=b\)
 
       \[ x^2 + bx + c = (x+m)(x+n) \]
       \hfill where \(mn=c, \> m+n=b\)
 
diff --git a/spec/calculus-rules.tex b/spec/calculus-rules.tex
new file mode 100644 (file)
index 0000000..5371aaf
--- /dev/null
@@ -0,0 +1,64 @@
+\subsection*{Derivatives}
+
+\rowcolors{1}{white}{peach}
+\renewcommand{\arraystretch}{1.4}
+
+\begin{tabularx}{\columnwidth}{rX}
+  \hline
+  \hspace{6em}\(f(x)\) & \(f^\prime(x)\)\\
+  \hline
+  \(\sin x\) & \(\cos x\)\\
+  \(\sin ax\) & \(a\cos ax\)\\
+  \(\cos x\) & \(-\sin x\)\\
+  \(\cos ax\) & \(-a \sin ax\)\\
+  \(\tan f(x)\) & \(f^2(x) \sec^2f(x)\)\\
+  \(e^x\) & \(e^x\)\\
+  \(e^{ax}\) & \(ae^{ax}\)\\
+  \(ax^{nx}\) & \(an \cdot e^{nx}\)\\
+  \(\log_e x\) & \(\dfrac{1}{x}\)\\
+  \(\log_e {ax}\) & \(\dfrac{1}{x}\)\\
+  \(\log_e f(x)\) & \(\dfrac{f^\prime (x)}{f(x)}\)\\
+  \(\sin(f(x))\) & \(f^\prime(x) \cdot \cos(f(x))\)\\
+  \(\sin^{-1} x\) & \(\dfrac{1}{\sqrt{1-x^2}}\)\\
+  \(\cos^{-1} x\) & \(\dfrac{-1}{\sqrt{1-x^2}}\)\\
+  \(\tan^{-1} x\) & \(\dfrac{1}{1 + x^2}\)\\
+  \(\frac{d}{dy}f(y)\) & \(\dfrac{1}{\frac{dx}{dy}}\) \hfill(reciprocal)\\
+  \(uv\) & \(u \frac{dv}{dx}+v\frac{du}{dx}\) \hfill(product rule)\\
+  \(\dfrac{u}{v}\) & \(\dfrac{v\frac{du}{dx}-u\frac{dv}{dx}}{v^2}\) \hfill(quotient rule)\\
+  \(f(g(x))\) & \(f^\prime(g(x))\cdot g^\prime(x)\)\\
+  \hline
+\end{tabularx}
+
+\vfill
+
+\subsection*{Antiderivatives}
+
+\rowcolors{1}{white}{lblue}
+\renewcommand{\arraystretch}{1.4}
+
+\begin{tabularx}{\columnwidth}{rX}
+  \hline
+  \(f(x)\) & \(\int f(x) \cdot dx\) \\
+  \hline
+  \(k\) (constant) & \(kx + c\)\\
+  \(x^n\) & \(\dfrac{1}{n+1} x^{n+1}\) \\
+  \(a x^{-n}\) &\(a \cdot \log_e |x| + c\)\\
+  \(\dfrac{1}{ax+b}\) &\(\dfrac{1}{a} \log_e (ax+b) + c\)\\
+  \((ax+b)^n\) & \(\dfrac{1}{a(n+1)}(ax+b)^{n-1} + c\>|\>n\ne 1\)\\
+  \((ax+b)^{-1}\) & \(\dfrac{1}{a}\log_e |ax+b|+c\)\\
+  \(e^{kx}\) & \(\dfrac{1}{k} e^{kx} + c\)\\
+  \(e^k\) & \(e^kx + c\)\\
+  \(\sin kx\) & \(\dfrac{-1}{k} \cos (kx) + c\)\\
+  \(\cos kx\) & \(\dfrac{1}{k} \sin (kx) + c\)\\
+  \(\sec^2 kx\) & \(\dfrac{1}{k} \tan(kx) + c\)\\
+  \(\dfrac{1}{\sqrt{a^2-x^2}}\) & \(\sin^{-1} \dfrac{x}{a} + c \>\vert\> a>0\)\\
+  \(\dfrac{-1}{\sqrt{a^2-x^2}}\) & \(\cos^{-1} \dfrac{x}{a} + c \>\vert\> a>0\)\\
+  \(\frac{a}{a^2-x^2}\) & \(\tan^{-1} \frac{x}{a} + c\)\\
+  \(\frac{f^\prime (x)}{f(x)}\) & \(\log_e f(x) + c\)\\
+  \(\int f(u) \cdot \frac{du}{dx} \cdot dx\) & \(\int f(u) \cdot du\) \hfill(substitution)\\
+  \(f(x) \cdot g(x)\) & \(\int [f^\prime(x) \cdot g(x)] dx + \int [g^\prime(x) f(x)] dx\)\\
+  \hline
+\end{tabularx}
+
+\vspace{1em}
+Note \(\sin^{-1} \left(\dfrac{x}{a}\right) + \cos^{-1} \left(\dfrac{x}{a}\right)\) is constant \(\forall \> x \in (-a, a)\)
index b0b558ab5b5914f09917fa254b3e2bc158a1cd62..073bee8ecd99be126ea759e3353f9fbaa3c6337d 100644 (file)
@@ -52,9 +52,9 @@
     \fill[lightgray!30] (-2,0)  -- plot[id=f3,domain=-2:2,samples=50] function {1/(0.75*sqrt(2*pi))*exp(-x*x*0.5/(0.75*0.75))} -- (2,0) -- cycle;
     \fill[white!30] (-1,0)  -- plot[id=f3,domain=-1:1,samples=50] function {1/(0.75*sqrt(2*pi))*exp(-x*x*0.5/(0.75*0.75))} -- (1,0) -- cycle;
     \begin{scope}[<->]
     \fill[lightgray!30] (-2,0)  -- plot[id=f3,domain=-2:2,samples=50] function {1/(0.75*sqrt(2*pi))*exp(-x*x*0.5/(0.75*0.75))} -- (2,0) -- cycle;
     \fill[white!30] (-1,0)  -- plot[id=f3,domain=-1:1,samples=50] function {1/(0.75*sqrt(2*pi))*exp(-x*x*0.5/(0.75*0.75))} -- (1,0) -- cycle;
     \begin{scope}[<->]
-      \draw (-1,0.35) -- (1,0.35) node [midway, fill=white] {68.3\%};
-      \draw (-2,0.25) -- (2,0.25) node [midway, fill=white] {95.5\%};
-      \draw (-3,0.15) -- (3,0.15) node [midway, fill=white] {99.7\%};
+      \draw (-1,0.35) -- (1,0.35) node [midway, fill=white] {68.27\%};
+      \draw (-2,0.25) -- (2,0.25) node [midway, fill=white] {95.35\%};
+      \draw (-3,0.15) -- (3,0.15) node [midway, fill=white] {99.73\%};
     \end{scope}
     \begin{scope}[-, dashed, gray]
       \draw (-1,0) -- (-1, 0.35);
     \end{scope}
     \begin{scope}[-, dashed, gray]
       \draw (-1,0) -- (-1, 0.35);
index 705bf5d3a644d3e2067a96414ca760834bd1e307..7b998a92be779cb72a149b61be13c27b80ef4a20 100644 (file)
Binary files a/spec/spec-collated.pdf and b/spec/spec-collated.pdf differ
index 4adcd53d464c205ead2d43104ef40974dc4c6f51..94d61876d683d0dd35373e447df8d2f1ff0f4207 100644 (file)
@@ -2,6 +2,7 @@
 \usepackage[dvipsnames, table]{xcolor}
 \usepackage{amsmath}
 \usepackage{amssymb}
 \usepackage[dvipsnames, table]{xcolor}
 \usepackage{amsmath}
 \usepackage{amssymb}
+\usepackage{array}
 \usepackage{blindtext}
 \usepackage{dblfloatfix}
 \usepackage{enumitem}
 \usepackage{blindtext}
 \usepackage{dblfloatfix}
 \usepackage{enumitem}
@@ -9,6 +10,7 @@
 \usepackage[a4paper,margin=2cm]{geometry}
 \usepackage{graphicx}
 \usepackage{harpoon}
 \usepackage[a4paper,margin=2cm]{geometry}
 \usepackage{graphicx}
 \usepackage{harpoon}
+\usepackage{hhline}
 \usepackage{import}
 \usepackage{keystroke}
 \usepackage{listings}
 \usepackage{import}
 \usepackage{keystroke}
 \usepackage{listings}
@@ -19,6 +21,7 @@
 \usepackage{multirow}
 \usepackage{pgfplots}
 \usepackage{pst-plot}
 \usepackage{multirow}
 \usepackage{pgfplots}
 \usepackage{pst-plot}
+\usepackage{rotating}
 \usepackage{subfiles}
 \usepackage{tabularx}
 \usepackage{tcolorbox}
 \usepackage{subfiles}
 \usepackage{tabularx}
 \usepackage{tcolorbox}
@@ -43,6 +46,7 @@
   scopes
 }
 
   scopes
 }
 
+\newcommand\given[1][]{\:#1\vert\:}
 \newcommand{\midarrow}{\tikz \draw[-triangle 90] (0,0) -- +(.1,0);}
 
 \usepgflibrary{arrows.meta}
 \newcommand{\midarrow}{\tikz \draw[-triangle 90] (0,0) -- +(.1,0);}
 
 \usepgflibrary{arrows.meta}
 \definecolor{cas}{HTML}{e6f0fe}
 \definecolor{important}{HTML}{fc9871}
 \definecolor{dark-gray}{gray}{0.2}
 \definecolor{cas}{HTML}{e6f0fe}
 \definecolor{important}{HTML}{fc9871}
 \definecolor{dark-gray}{gray}{0.2}
+\definecolor{light-gray}{HTML}{cccccc}
+\definecolor{peach}{HTML}{e6beb2}
+\definecolor{lblue}{HTML}{e5e9f0}
 
 \newcommand{\tg}{\mathop{\mathrm{tg}}}
 \newcommand{\cotg}{\mathop{\mathrm{cotg}}}
 \newcommand{\arctg}{\mathop{\mathrm{arctg}}}
 \newcommand{\arccotg}{\mathop{\mathrm{arccotg}}}
 
 
 \newcommand{\tg}{\mathop{\mathrm{tg}}}
 \newcommand{\cotg}{\mathop{\mathrm{cotg}}}
 \newcommand{\arctg}{\mathop{\mathrm{arctg}}}
 \newcommand{\arccotg}{\mathop{\mathrm{arccotg}}}
 
-\newtcolorbox{warning}{colback=white!90!black, leftrule=3mm, colframe=important, coltext=important, fontupper=\sffamily\bfseries}
-\newtcolorbox{cas}{colframe=cas!75!black, title=On CAS, left*=3mm}
+\newtcolorbox{warning}{colback=white!90!black, leftrule=3mm, colframe=important, coltext=darkgray, fontupper=\sffamily\bfseries}
+\newtcolorbox{cas}{colframe=cas!75!black, fonttitle=\sffamily\bfseries, title=On CAS, left*=3mm}
 
 \begin{document}
 
 
 \begin{document}
 
                   \((b \cdot c)^n = b^n \cdot c^n\)\\
                   \({a^m \div a^n} = {a^{m-n}}\)
 
                   \((b \cdot c)^n = b^n \cdot c^n\)\\
                   \({a^m \div a^n} = {a^{m-n}}\)
 
-                  \subsection*{Derivative rules}
-
-                  \renewcommand{\arraystretch}{1.4}
-                  \begin{tabularx}{\columnwidth}{rX}
-                    \hline
-                    \(f(x)\) & \(f^\prime(x)\)\\
-                    \hline
-                    \(\sin x\) & \(\cos x\)\\
-                    \(\sin ax\) & \(a\cos ax\)\\
-                    \(\cos x\) & \(-\sin x\)\\
-                    \(\cos ax\) & \(-a \sin ax\)\\
-                    \(\tan f(x)\) & \(f^2(x) \sec^2f(x)\)\\
-                    \(e^x\) & \(e^x\)\\
-                    \(e^{ax}\) & \(ae^{ax}\)\\
-                    \(ax^{nx}\) & \(an \cdot e^{nx}\)\\
-                    \(\log_e x\) & \(\dfrac{1}{x}\)\\
-                    \(\log_e {ax}\) & \(\dfrac{1}{x}\)\\
-                    \(\log_e f(x)\) & \(\dfrac{f^\prime (x)}{f(x)}\)\\
-                    \(\sin(f(x))\) & \(f^\prime(x) \cdot \cos(f(x))\)\\
-                    \(\sin^{-1} x\) & \(\dfrac{1}{\sqrt{1-x^2}}\)\\
-                    \(\cos^{-1} x\) & \(\dfrac{-1}{sqrt{1-x^2}}\)\\
-                    \(\tan^{-1} x\) & \(\dfrac{1}{1 + x^2}\)\\
-                    \(\frac{d}{dy}f(y)\) & \(\dfrac{1}{\frac{dx}{dy}}\) (reciprocal)\\
-                    \(uv\) & \(u \frac{dv}{dx}+v\frac{du}{dx} (product rule)\)\\
-                    \(\dfrac{u}{v}\) & \(\dfrac{v\frac{du}{dx}-u\frac{dv}{dx}}{v^2}\) (quotient rule)\\
-                    \(f(g(x))\) & \(f^\prime(g(x))\cdot g^\prime(x)\)\\
-                    \hline
-                  \end{tabularx}
-
                   \subsection*{Reciprocal derivatives}
 
                   \[\frac{1}{\frac{dy}{dx}} = \frac{dx}{dy}\]
 
                   \subsection*{Differentiating \(x=f(y)\)}
                   \subsection*{Reciprocal derivatives}
 
                   \[\frac{1}{\frac{dy}{dx}} = \frac{dx}{dy}\]
 
                   \subsection*{Differentiating \(x=f(y)\)}
-                  \begin{align*}
-                    \text{Find }& \frac{dx}{dy}\\
-                    \text{Then, }\frac{dx}{dy} &= \frac{1}{\frac{dy}{dx}} \\
-                    \implies {\frac{dy}{dx}} &= \frac{1}{\frac{dx}{dy}}\\
-                    \therefore {\frac{dy}{dx}} &= \frac{1}{\frac{dx}{dy}}
-                  \end{align*}
+                  Find \(\dfrac{dx}{dy}\), then \(\dfrac{dy}{dx} = \dfrac{1}{\left(\dfrac{dx}{dy}\right)}\)
 
                   \subsection*{Second derivative}
                   \begin{align*}f(x) \longrightarrow &f^\prime (x) \longrightarrow f^{\prime\prime}(x)\\
 
                   \subsection*{Second derivative}
                   \begin{align*}f(x) \longrightarrow &f^\prime (x) \longrightarrow f^{\prime\prime}(x)\\
                     \begin{tabularx}{\textwidth}{rXXX}
                       \hline
                       \rowcolor{shade2}
                     \begin{tabularx}{\textwidth}{rXXX}
                       \hline
                       \rowcolor{shade2}
-                      & \centering\(\dfrac{d^2 y}{dx^2} > 0\)  & \centering \(\dfrac{d^2y}{dx^2}<0\) & \(\dfrac{d^2y}{dx^2}=0\) (inflection) \\
+                      & \centering\(\dfrac{d^2 y}{dx^2} > 0\)  & \centering \(\dfrac{d^2y}{dx^2}<0\) & \(\dfrac{d^2y}{dx^2}=0\) (inflection) \\[1.5em]
                       \hline
                       \(\dfrac{dy}{dx}>0\) &
                       \hline
                       \(\dfrac{dy}{dx}>0\) &
-                      \makecell{\\\begin{tikzpicture}\begin{axis}[axis x line=none, axis y line=none, xmin=-3,  xmax=0.8, scale=0.2, samples=50, unbounded coords=jump] \addplot[blue] {(e^(x))};  \addplot[red] {x/2.5+0.75}; \end{axis}\end{tikzpicture} \\Rising (concave up)}&
+                      \makecell{\\\begin{tikzpicture}\begin{axis}[axis x line=none, axis y line=none, xmin=-3,  xmax=0.8, scale=0.2, samples=50, unbounded coords=jump] \addplot[blue] {(e^(x)};  \addplot[red] {x/2.5+0.75}; \end{axis}\end{tikzpicture} \\Rising (concave up)}&
                         \makecell{\\\begin{tikzpicture}\begin{axis}[axis x line=none, axis y line=none, xmin=0.1, xmax=4,   scale=0.2, samples=50, unbounded coords=jump] \addplot[blue] {(ln(x))};  \addplot[red] {x/1.5-0.56}; \end{axis}\end{tikzpicture} \\Rising (concave down)}&
                           \makecell{\\\begin{tikzpicture}\begin{axis}[axis x line=none, axis y line=none, xmin=-1.5,  xmax=1.5,   scale=0.2, samples=100] \addplot[blue] {(sin((deg x)))}; \addplot[red] {x}; \end{axis}\end{tikzpicture} \\Rising inflection point}\\
                             \hline
                             \(\dfrac{dy}{dx}<0\) &
                         \makecell{\\\begin{tikzpicture}\begin{axis}[axis x line=none, axis y line=none, xmin=0.1, xmax=4,   scale=0.2, samples=50, unbounded coords=jump] \addplot[blue] {(ln(x))};  \addplot[red] {x/1.5-0.56}; \end{axis}\end{tikzpicture} \\Rising (concave down)}&
                           \makecell{\\\begin{tikzpicture}\begin{axis}[axis x line=none, axis y line=none, xmin=-1.5,  xmax=1.5,   scale=0.2, samples=100] \addplot[blue] {(sin((deg x)))}; \addplot[red] {x}; \end{axis}\end{tikzpicture} \\Rising inflection point}\\
                             \hline
                             \(\dfrac{dy}{dx}<0\) &
-                            \makecell{\\\begin{tikzpicture}\begin{axis}[axis x line=none, axis y line=none, xmin=-.5, xmax=1, ymin=-.5, ymax=.5, scale=0.2, samples=100] \addplot[blue] {(1/(x+1)-1}; \addplot[red] {-x}; \end{axis}\end{tikzpicture} \\Falling (concave up)}&
+                            \makecell{\\\begin{tikzpicture}\begin{axis}[axis x line=none, axis y line=none, xmin=-.5, xmax=1, ymin=-.5, ymax=.5, scale=0.2, samples=100] \addplot[blue] {1/(x+1)-1}; \addplot[red] {-x}; \end{axis}\end{tikzpicture} \\Falling (concave up)}&
                               \makecell{\\\begin{tikzpicture}\begin{axis}[axis x line=none, axis y line=none, xmin=0,  xmax=1.5, scale=0.2, samples=50, unbounded coords=jump] \addplot[blue] {(2-x*x)^(1/2)};  \addplot[red] {-x+2}; \end{axis}\end{tikzpicture} \\Falling (concave down)}&
                                 \makecell{\\\begin{tikzpicture}\begin{axis}[axis x line=none, axis y line=none, xmin=1.5,  xmax=4.5,   scale=0.2, samples=100] \addplot[blue] {(sin((deg x)))}; \addplot[red] {-x+3.1415}; \end{axis}\end{tikzpicture} \\Falling inflection point}\\
                                   \hline
                                   \(\dfrac{dy}{dx}=0\)&
                               \makecell{\\\begin{tikzpicture}\begin{axis}[axis x line=none, axis y line=none, xmin=0,  xmax=1.5, scale=0.2, samples=50, unbounded coords=jump] \addplot[blue] {(2-x*x)^(1/2)};  \addplot[red] {-x+2}; \end{axis}\end{tikzpicture} \\Falling (concave down)}&
                                 \makecell{\\\begin{tikzpicture}\begin{axis}[axis x line=none, axis y line=none, xmin=1.5,  xmax=4.5,   scale=0.2, samples=100] \addplot[blue] {(sin((deg x)))}; \addplot[red] {-x+3.1415}; \end{axis}\end{tikzpicture} \\Falling inflection point}\\
                                   \hline
                                   \(\dfrac{dy}{dx}=0\)&
-                                  \makecell{\\\begin{tikzpicture}\begin{axis}[axis x line=none, axis y line=none, xmin=-1,  xmax=1,   scale=0.2, samples=50, unbounded coords=jump] \addplot[blue] {(x*x))}; \addplot[red, thick] {0}; \end{axis}\end{tikzpicture} \\Local minimum}&                       \makecell{\\\begin{tikzpicture}\begin{axis}[axis x line=none, axis y line=none, xmin=-1,  xmax=1,   scale=0.2, samples=50, unbounded coords=jump] \addplot[blue] {(-x*x))}; \addplot[red, very thick] {0}; \end{axis}\end{tikzpicture} \\Local maximum}&
-                                    \makecell{\\\begin{tikzpicture}\begin{axis}[axis x line=none, axis y line=none, xmin=-1,  xmax=1,   scale=0.2, samples=50, unbounded coords=jump] \addplot[blue] {(x*x*x))}; \addplot[red, thick] {0}; \end{axis}\end{tikzpicture} \(\>\) \begin{tikzpicture}\begin{axis}[axis x line=none, axis y line=none, xmin=-1,  xmax=1,   scale=0.2, samples=50, unbounded coords=jump] \addplot[blue] {(-x*x*x))}; \addplot[red, thick] {0}; \end{axis}\end{tikzpicture}  \\Stationary inflection point}\\
+                                  \makecell{\\\begin{tikzpicture}\begin{axis}[axis x line=none, axis y line=none, xmin=-1,  xmax=1,   scale=0.2, samples=50, unbounded coords=jump] \addplot[blue] {(x*x)}; \addplot[red, thick] {0}; \end{axis}\end{tikzpicture} \\Local minimum}&                       \makecell{\\\begin{tikzpicture}\begin{axis}[axis x line=none, axis y line=none, xmin=-1,  xmax=1,   scale=0.2, samples=50, unbounded coords=jump] \addplot[blue] {(-x*x)}; \addplot[red, very thick] {0}; \end{axis}\end{tikzpicture} \\Local maximum}&
+                                    \makecell{\\\begin{tikzpicture}\begin{axis}[axis x line=none, axis y line=none, xmin=-1,  xmax=1,   scale=0.2, samples=50, unbounded coords=jump] \addplot[blue] {(x*x*x)}; \addplot[red, thick] {0}; \end{axis}\end{tikzpicture} \(\>\) \begin{tikzpicture}\begin{axis}[axis x line=none, axis y line=none, xmin=-1,  xmax=1,   scale=0.2, samples=50, unbounded coords=jump] \addplot[blue] {(-x*x*x)}; \addplot[red, thick] {0}; \end{axis}\end{tikzpicture}  \\Stationary inflection point}\\
                                       \hline
                     \end{tabularx}
                   \end{table*}
                                       \hline
                     \end{tabularx}
                   \end{table*}
 
                   \[{\frac{dp}{dx}} = {\frac{dq}{dx}} \quad \text{and} \quad {\frac{dp}{dy}} = {\frac{dq}{dy}}\]
 
 
                   \[{\frac{dp}{dx}} = {\frac{dq}{dx}} \quad \text{and} \quad {\frac{dp}{dy}} = {\frac{dq}{dy}}\]
 
-                  \noindent \colorbox{cas}{\textbf{On CAS:}}\\
-                  Action \(\rightarrow\) Calculation \(\rightarrow\) \texttt{impDiff(y\^{}2+ax=5,\ x,\ y)}\\
-                  Returns \(y^\prime= \dots\).
-
-                  \subsection*{Integration}
-
-                  \[\int f(x) \cdot dx = F(x) + c \quad \text{where } F^\prime(x) = f(x)\]
-
-                  \subsection*{Integral laws}
-
-                  \renewcommand{\arraystretch}{1.4}
-                  \begin{tabularx}{\columnwidth}{rX}
-                    \hline
-                    \(f(x)\) & \(\int f(x) \cdot dx\) \\
-                    \hline
-                    \(k\) (constant) & \(kx + c\)\\
-                    \(x^n\) & \(\dfrac{1}{n+1} x^{n+1}\) \\
-                    \(a x^{-n}\) &\(a \cdot \log_e |x| + c\)\\
-                    \(\dfrac{1}{ax+b}\) &\(\dfrac{1}{a} \log_e (ax+b) + c\)\\
-                    \((ax+b)^n\) & \(\dfrac{1}{a(n+1)}(ax+b)^{n-1} + c\>|\>n\ne 1\)\\
-                    \((ax+b)^{-1}\) & \(\dfrac{1}{a}\log_e |ax+b|+c\)\\
-                    \(e^{kx}\) & \(\dfrac{1}{k} e^{kx} + c\)\\
-                    \(e^k\) & \(e^kx + c\)\\
-                    \(\sin kx\) & \(\dfrac{-1}{k} \cos (kx) + c\)\\
-                    \(\cos kx\) & \(\dfrac{1}{k} \sin (kx) + c\)\\
-                    \(\sec^2 kx\) & \(\dfrac{1}{k} \tan(kx) + c\)\\
-                    \(\dfrac{1}{\sqrt{a^2-x^2}}\) & \(\sin^{-1} \dfrac{x}{a} + c \>\vert\> a>0\)\\
-                    \(\dfrac{-1}{\sqrt{a^2-x^2}}\) & \(\cos^{-1} \dfrac{x}{a} + c \>\vert\> a>0\)\\
-                    \(\frac{a}{a^2-x^2}\) & \(\tan^{-1} \frac{x}{a} + c\)\\
-                    \(\frac{f^\prime (x)}{f(x)}\) & \(\log_e f(x) + c\)\\
-                    \(\int f(u) \cdot \frac{du}{dx} \cdot dx\) & \(\int f(u) \cdot du\) (substitution)\\
-                    \(f(x) \cdot g(x)\) & \(\int [f^\prime(x) \cdot g(x)] dx + \int [g^\prime(x) f(x)] dx\)\\
-                    \hline
-                  \end{tabularx}
-
-                  Note \(\sin^{-1} {x \over a} + \cos^{-1} {x \over a}\) is constant \(\forall x \in (-a, a)\)
-
-                  \subsection*{Definite integrals}
+                  \begin{cas}
+                    Action \(\rightarrow\) Calculation \\
+                      \hspace{1em}\texttt{impDiff(y\^{}2+ax=5,\ x,\ y)} \hfill(returns \(y^\prime= \dots\))
+                  \end{cas}
+
+                  \subsection*{Slope fields}
+
+                  \begin{tikzpicture}[declare function={diff(\x,\y) = \x+\y;}]
+                    \begin{axis}[axis equal, ymin=-4, ymax=4, xmin=-4, xmax=4, ticks=none, enlargelimits=true, ]
+                      \addplot[thick, orange, domain=-4:2] {e^(x)-x-1};
+                      \pgfplotsinvokeforeach{-4,...,4}{%
+                        \draw[gray] ( {#1 -0.1}, {4 - diff(#1, 4) *0.1}) --  ( {#1 +0.1}, {4  + diff(#1, 4) *0.1});
+                        \draw[gray] ( {#1 -0.1}, {3 - diff(#1, 3) *0.1}) --  ( {#1 +0.1}, {3  + diff(#1, 3) *0.1});
+                        \draw[gray] ( {#1 -0.1}, {2 - diff(#1, 2) *0.1}) --  ( {#1 +0.1}, {2  + diff(#1, 2) *0.1});
+                        \draw[gray] ( {#1 -0.1}, {1 - diff(#1, 1) *0.1}) --  ( {#1 +0.1}, {1  + diff(#1, 1) *0.1});
+                        \draw[gray] ( {#1 -0.1}, {0 - diff(#1, 0) *0.1}) --  ( {#1 +0.1}, {0  + diff(#1, 0) *0.1});
+                        \draw[gray] ( {#1 -0.1}, {-1 - diff(#1, -1) *0.1}) --  ( {#1 +0.1}, {-1  + diff(#1, -1) *0.1});
+                        \draw[gray] ( {#1 -0.1}, {-2 - diff(#1, -2) *0.1}) --  ( {#1 +0.1}, {-2  + diff(#1, -2) *0.1});
+                        \draw[gray] ( {#1 -0.1}, {-3 - diff(#1, -3) *0.1}) --  ( {#1 +0.1}, {-3  + diff(#1, -3) *0.1});
+                        \draw[gray] ( {#1 -0.1}, {-4 - diff(#1, -4) *0.1}) --  ( {#1 +0.1}, {-4  + diff(#1, -4) *0.1});
+                      }
+                    \end{axis}
+                  \end{tikzpicture}
+
+                  \subsection*{Parametric equations}
+
+                  For each point on \(\left( f(t), g(t) \right)\):
+
+                  \begin{align*}
+                    \dfrac{dy}{dt} &= \dfrac{dy}{dx} \cdot \dfrac{dx}{dt} \\
+                    \therefore \dfrac{dy}{dx} &= \dfrac{\left(\dfrac{dy}{dt}\right)}{\left(\dfrac{dx}{dt}\right)} \text{ provided } \dfrac{dx}{dt} \ne 0 \\
+                    \text{Also...} \\
+                    \dfrac{d^2y}{dx^2} &= \dfrac{\left(\dfrac{dy^\prime}{dt}\right)}{\left(\dfrac{dx}{dt}\right)} \text{ where } y^\prime = \dfrac{dy}{dx}
+                  \end{align*}
+
+                \subsection*{Integration}
+
+                \[\int f(x) \cdot dx = F(x) + c \quad \text{where } F^\prime(x) = f(x)\]
+
+                  \subsubsection*{Definite integrals}
 
                   \[\int_a^b f(x) \cdot dx = [F(x)]_a^b=F(b)-F(a)\]
 
 
                   \[\int_a^b f(x) \cdot dx = [F(x)]_a^b=F(b)-F(a)\]
 
 
                   \subsubsection*{Properties}
 
 
                   \subsubsection*{Properties}
 
-                  \[\int^b_a f(x) \> dx = \int^c_a f(x) \> dx + \int^b_c f(x) \> dx\]
-
-                  \[\int^a_a f(x) \> dx = 0\]
-
-                  \[\int^b_a k \cdot f(x) \> dx = k \int^b_a f(x) \> dx\]
-
-                  \[\int^b_a f(x) \pm g(x) \> dx = \int^b_a f(x) \> dx \pm \int^b_a g(x) \> dx\]
-
-                  \[\int^b_a f(x) \> dx = - \int^a_b f(x) \> dx\]
+                  \begin{align*}
+                    \int^b_a f(x) \> dx &= \int^c_a f(x) \> dx + \int^b_c f(x) \> dx \\
+                    \int^a_a f(x) \> dx &= 0 \\
+                    \int^b_a k \cdot f(x) \> dx &= k \int^b_a f(x) \> dx \\
+                    \int^b_a f(x) \pm g(x) \> dx &= \int^b_a f(x) \> dx \pm \int^b_a g(x) \> dx \\
+                    \int^b_a f(x) \> dx &= - \int^a_b f(x) \> dx \\
+                  \end{align*}
 
                   \subsection*{Integration by substitution}
 
                   \[\int f(u) {\frac{du}{dx}} \cdot dx = \int f(u) \cdot du\]
 
 
                   \subsection*{Integration by substitution}
 
                   \[\int f(u) {\frac{du}{dx}} \cdot dx = \int f(u) \cdot du\]
 
-                  \noindent Note \(f(u)\) must be 1:1 \(\implies\) one \(x\) for each \(y\)
+                  \begin{warning}
+                    \(\boldsymbol{f(u)}\) must be 1:1 \(\boldsymbol{\implies}\) one \(\boldsymbol{x}\) for each \(\boldsymbol{y}\)
+                  \end{warning}
                   \begin{align*}\text{e.g. for } y&=\int(2x+1)\sqrt{x+4} \cdot dx\\
                     \text{let } u&=x+4\\
                     \implies& {\frac{du}{dx}} = 1\\
                   \begin{align*}\text{e.g. for } y&=\int(2x+1)\sqrt{x+4} \cdot dx\\
                     \text{let } u&=x+4\\
                     \implies& {\frac{du}{dx}} = 1\\
 
                   \subsection*{Partial fractions}
 
 
                   \subsection*{Partial fractions}
 
-                  \colorbox{cas}{On CAS:}\\
-                  \indent Action \(\rightarrow\) Transformation \(\rightarrow\)
-                  \texttt{expand/combine}\\
-                  \indent Interactive \(\rightarrow\) Transformation \(\rightarrow\)
-                  Expand \(\rightarrow\) Partial
+                  To factorise \(f(x) = \frac{\delta}{\alpha \cdot \beta}\):
+                  \begin{align*}
+                    \dfrac{\delta}{\alpha \cdot \beta \cdot \gamma} &= \dfrac{A}{\alpha} + \dfrac{B}{\beta} + \dfrac{C}{\gamma} \tag{1} \\
+                    \text{Multiply by } & (\alpha \cdot \beta \cdot \gamma) \text{:} \\
+                    \delta &= \beta\gamma A + \alpha\gamma B +\alpha\beta C \tag{2} \\
+                    \text{Substitute } x &= \{\alpha, \beta, \gamma\} \text{ into (2) to find denominators}
+                  \end{align*}
+
+                  \subsubsection*{Repeated linear factors}
+
+                  \[ \dfrac{p(x)}{(x-a)^n} = \dfrac{A_1}{(x-a)} + \dfrac{A_2}{(x-a)^2} + \dots + \dfrac{A_n}{(x-a)^n} \]
+
+                  \subsubsection*{Irreducible quadratic factors}
+
+                  \[ \text{e.g. } \dfrac{3x-4}{(2x-3)(x^2+5)} = \dfrac{A}{2x-3} + \dfrac{Bx+C}{x^2+5} \]
+
+                  \begin{cas}
+                    Action \(\rightarrow\) Transformation:\\
+                    \hspace{1em} \texttt{expand(..., x)}
+
+                    To reverse, use \texttt{combine(...)}
+                  \end{cas}
 
                   \subsection*{Graphing integrals on CAS}
 
 
                   \subsection*{Graphing integrals on CAS}
 
-                  \colorbox{cas}{In main:} Interactive \(\rightarrow\) Calculation \(\rightarrow\)
-                  \(\int\) (\(\rightarrow\) Definite)\\
-                  Restrictions: \texttt{Define\ f(x)=..} then \texttt{f(x)\textbar{}x\textgreater{}..}
+                  \begin{cas}
+                    \textbf{In main:} Interactive \(\rightarrow\) Calculation \(\rightarrow\) \(\int\)\\
+                    Restrictions: \texttt{Define\ f(x)=..} then \texttt{f(x)\textbar{}x\textgreater{}..}
+                  \end{cas}
 
                   \subsection*{Applications of antidifferentiation}
 
 
                   \subsection*{Applications of antidifferentiation}
 
 
                   Approximate as sum of infinitesimally-thick cylinders
 
 
                   Approximate as sum of infinitesimally-thick cylinders
 
-                  \subsubsection*{Rotation about \(x\)-axis}
+                  \subsubsection*{Rotation about \(\boldsymbol{x}\)-axis}
 
 
-                  \begin{align*}
-                    V &= \int^{x=b}_{x-a} \pi y^2 \> dx \\
-                    &= \pi \int^b_a (f(x))^2 \> dx
-                  \end{align*}
+                  \[ V = \pi\int^{x=b}_{x=a} f(x)^2 \> dx \]
 
 
-                  \subsubsection*{Rotation about \(y\)-axis}
+                  \subsubsection*{Rotation about \(\boldsymbol{y}\)-axis}
 
                   \begin{align*}
 
                   \begin{align*}
-                    V &= \int^{y=b}_{y=a} \pi x^2 \> dy \\
-                    &= \pi \int^b_a (f(y))^2 \> dy
+                    V &= \pi \int^{y=b}_{y=a} x^2 \> dy \\
+                    &= \pi \int^{y=b}_{y=a} (f(y))^2 \> dy
                   \end{align*}
 
                   \end{align*}
 
-                  \subsubsection*{Regions not bound by \(y=0\)}
+                  \subsubsection*{Regions not bound by \(\boldsymbol{y=0}\)}
 
                   \[V = \pi \int^b_a f(x)^2 - g(x)^2 \> dx\]
                   \hfill where \(f(x) > g(x)\)
 
                   \[V = \pi \int^b_a f(x)^2 - g(x)^2 \> dx\]
                   \hfill where \(f(x) > g(x)\)
 
                   \[L = \int^b_a \sqrt{{\frac{dx}{dt}} + ({\frac{dy}{dt}})^2} \> dt \quad \text{(parametric)}\]
 
 
                   \[L = \int^b_a \sqrt{{\frac{dx}{dt}} + ({\frac{dy}{dt}})^2} \> dt \quad \text{(parametric)}\]
 
-                  \noindent \colorbox{cas}{On CAS:}\\
-                  \indent Evaluate formula,\\
-                  \indent or Interactive \(\rightarrow\) Calculation
-                  \(\rightarrow\) Line \(\rightarrow\) \texttt{arcLen}
+                  \begin{cas}
+                    \begin{enumerate}[label=\alph*), leftmargin=5mm]
+                      \item Evaluate formula
+                      \item Interactive \(\rightarrow\) Calculation \(\rightarrow\) Line \(\rightarrow\) \texttt{arcLen}
+                    \end{enumerate}
+                  \end{cas}
 
                   \subsection*{Rates}
 
 
                   \subsection*{Rates}
 
 
                   \[\implies f(x+h) \approx f(x) + hf^\prime(x)\]
 
 
                   \[\implies f(x+h) \approx f(x) + hf^\prime(x)\]
 
-              
+                  \include{calculus-rules}
+
     \section{Kinematics \& Mechanics}
 
       \subsection*{Constant acceleration}
     \section{Kinematics \& Mechanics}
 
       \subsection*{Constant acceleration}
index 5408f9ead6b38066451bad55ab97ad94bf715d32..d756a7f0e70696978718c8e8165cce8f12571084 100644 (file)
Binary files a/spec/statistics.pdf and b/spec/statistics.pdf differ
index 323ec2ac410e6e775239a53452756cc08d8f8a8d..fc4165c7a8631ca23a7d4db8382643e3fde52b0b 100644 (file)
     Note hypotheses are always expressed in terms of population parameters
   \end{warning}
 
     Note hypotheses are always expressed in terms of population parameters
   \end{warning}
 
-  \subsection*{Null hypothesis \(H_0\)}
+  \subsection*{Null hypothesis \(\textbf{H}_0\)}
 
   Sample drawn from population has same mean as control population, and any difference can be explained by sample variations.
 
 
   Sample drawn from population has same mean as control population, and any difference can be explained by sample variations.
 
-  \subsection*{Alternative hypothesis \(H_1\)}
+  \subsection*{Alternative hypothesis \(\textbf{H}_1\)}
 
   Amount of variation from control is significant, despite standard sample variations.
 
   \subsection*{\(p\)-value}
 
 
   Amount of variation from control is significant, despite standard sample variations.
 
   \subsection*{\(p\)-value}
 
+  Probability of observing a value of the sample statistic as significant as the one observed, assuming null hypothesis is true.
 
 
+  For one-tail tests:
   \begin{align*}
   \begin{align*}
-    p &= \Pr(\overline{X} \lessgtr \mu(H_1)) \\
-    &= 2 \cdot \Pr(\overline{X} <> \mu(H_1) | \mu = 8)
+    p\text{-value} &= \Pr\left( \> \overline{X} \lessgtr \mu(\textbf{H}_1) \> \given \> \mu = \mu(\textbf{H}_0)\> \right) \\
+    &= \Pr\left( Z \lessgtr \dfrac{\left( \mu(\textbf{H}_1) - \mu(\textbf{H}_0) \right) \cdot \sqrt{n} }{\operatorname{sd}(X)} \right) \\
+    &\text{then use \texttt{normCdf} with std. norm.}
   \end{align*}
 
   \end{align*}
 
-  Probability of observing a value of the sample statistic as significant as the one observed, assuming null hypothesis is true.
-
   \vspace{0.5em}
   \begin{tabularx}{23em}{|l|X|}
     \hline
     \rowcolor{cas}
     \(\boldsymbol{p}\) & \textbf{Conclusion} \\
     \hline
   \vspace{0.5em}
   \begin{tabularx}{23em}{|l|X|}
     \hline
     \rowcolor{cas}
     \(\boldsymbol{p}\) & \textbf{Conclusion} \\
     \hline
-    \(> 0.05\) & insufficient evidence against \(H_0\) \\
-    \(< 0.05\) (5\%) & good evidence against \(H_0\) \\
-    \(< 0.01\) (1\%) & strong evidence against \(H_0\) \\
-    \(< 0.001\) (0.1\%) & very strong evidence against \(H_0\) \\
+    \(> 0.05\) & insufficient evidence against \(\textbf{H}_0\) \\
+    \(< 0.05\) (5\%) & good evidence against \(\textbf{H}_0\) \\
+    \(< 0.01\) (1\%) & strong evidence against \(\textbf{H}_0\) \\
+    \(< 0.001\) (0.1\%) & very strong evidence against \(\textbf{H}_0\) \\
     \hline
   \end{tabularx}
 
     \hline
   \end{tabularx}
 
-  \subsection*{Statistical significance}
+  \subsection*{Significance level \(\alpha\)}
 
 
-  Significance level is denoted by \(\alpha\).
+  The condition for rejecting the null hypothesis.
 
   \-\hspace{1em} If \(p<\alpha\), null hypothesis is \textbf{rejected} \\
   \-\hspace{1em} If \(p>\alpha\), null hypothesis is \textbf{accepted}
 
   \-\hspace{1em} If \(p<\alpha\), null hypothesis is \textbf{rejected} \\
   \-\hspace{1em} If \(p>\alpha\), null hypothesis is \textbf{accepted}
   Menu \(\rightarrow\) Statistics \(\rightarrow\) Calc \(\rightarrow\) Test. \\
   Select \textit{One-Sample Z-Test} and \textit{Variable}, then input:
     \begin{description}[nosep, style=multiline, labelindent=0.5cm, leftmargin=2cm, font=\normalfont]
   Menu \(\rightarrow\) Statistics \(\rightarrow\) Calc \(\rightarrow\) Test. \\
   Select \textit{One-Sample Z-Test} and \textit{Variable}, then input:
     \begin{description}[nosep, style=multiline, labelindent=0.5cm, leftmargin=2cm, font=\normalfont]
-    \item[\(\mu\) cond:] same operator as \(H_1\)
+    \item[\(\mu\) cond:] same operator as \(\textbf{H}_1\)
     \item[\(\mu_0\):] expected sample mean (null hypothesis)
     \item[\(\sigma\):] standard deviation (null hypothesis)
     \item[\(\overline{x}\):] sample mean
     \item[\(\mu_0\):] expected sample mean (null hypothesis)
     \item[\(\sigma\):] standard deviation (null hypothesis)
     \item[\(\overline{x}\):] sample mean
   \end{cas}
 
   \subsection*{One-tail and two-tail tests}
   \end{cas}
 
   \subsection*{One-tail and two-tail tests}
+  
+  \[ p\text{-value (two-tail)} = 2 \times p\text{-value (one-tail)} \]
 
   \subsubsection*{One tail}
 
   \begin{itemize}
     \item \(\mu\) has changed in one direction
 
   \subsubsection*{One tail}
 
   \begin{itemize}
     \item \(\mu\) has changed in one direction
-    \item State ``\(H_1: \mu \lessgtr \) known population mean''
+    \item State ``\(\textbf{H}_1: \mu \lessgtr \) known population mean''
   \end{itemize}
 
   \subsubsection*{Two tail}
 
   \begin{itemize}
     \item Direction of \(\Delta \mu\) is ambiguous
   \end{itemize}
 
   \subsubsection*{Two tail}
 
   \begin{itemize}
     \item Direction of \(\Delta \mu\) is ambiguous
-    \item State ``\(H_1: \mu \ne\) known population mean''
+    \item State ``\(\textbf{H}_1: \mu \ne\) known population mean''
   \end{itemize}
 
   \end{itemize}
 
-  For two tail tests:
   \begin{align*}
     p\text{-value} &= \Pr(|\overline{X} - \mu| \ge |\overline{x}_0 - \mu|) \\
   \begin{align*}
     p\text{-value} &= \Pr(|\overline{X} - \mu| \ge |\overline{x}_0 - \mu|) \\
-    &= \left( |Z| \ge \left|\dfrac{\overline{x}_0 - \mu}{\sigma \div \sqrt{n}} \right| \right)
+    &= \left( |Z| \ge \left|\dfrac{\overline{x}_0 - \mu}{\sigma \div \sqrt{n}} \right| \right) \\
   \end{align*}
 
   \end{align*}
 
+  where
+  \begin{description}[nosep, labelindent=0.5cm]
+    \item [\(\mu\)] is the population mean under \(\textbf{H}_0\)
+    \item [\(\overline{x}_0\)] is the observed sample mean
+    \item [\(\sigma\)] is the population s.d.
+    \item [\(n\)] is the sample size
+  \end{description}
+
   \subsection*{Modulus notation for two tail}
 
   \(\Pr(|\overline{X} - \mu| \ge a) \implies\) ``the probability that the distance between \(\overline{\mu}\) and \(\mu\) is \(\ge a\)''
   \subsection*{Modulus notation for two tail}
 
   \(\Pr(|\overline{X} - \mu| \ge a) \implies\) ``the probability that the distance between \(\overline{\mu}\) and \(\mu\) is \(\ge a\)''
   \subsection*{Errors}
 
   \begin{description}[labelwidth=2.5cm, labelindent=0.5cm]
   \subsection*{Errors}
 
   \begin{description}[labelwidth=2.5cm, labelindent=0.5cm]
-    \item [Type I error] \(H_0\) is rejected when it is \textbf{true}
-    \item [Type II error] \(H_0\) is \textbf{not} rejected when it is \textbf{false}
+    \item [Type I error] \(\textbf{H}_0\) is rejected when it is \textbf{true}
+    \item [Type II error] \(\textbf{H}_0\) is \textbf{not} rejected when it is \textbf{false}
   \end{description}
 
   \end{description}
 
+  \begin{tabularx}{\columnwidth}{|X|l|l|}
+    \rowcolor{cas}\hline
+    \cellcolor{white}&\multicolumn{2}{c|}{\textbf{Actual result}} \\
+    \hline
+    \cellcolor{cas}\(\boldsymbol{z}\)\textbf{-test} & \cellcolor{light-gray}\(\textbf{H}_0\) true & \cellcolor{light-gray}\(\textbf{H}_0\) false \\
+    \hline
+    \cellcolor{light-gray}Reject \(\textbf{H}_0\) & Type I error & Correct \\
+    \hline
+    \cellcolor{light-gray}Do not reject \(\textbf{H}_0\) & Correct& Type II error \\
+    \hline
+  \end{tabularx}
+
 % \subsection*{Using c.i. to find \(p\)}
 % need more here
 
 % \subsection*{Using c.i. to find \(p\)}
 % need more here