+\documentclass[methods-collated.tex]{subfiles}
+
+\begin{document}
+
\section{Calculus}
\subsection*{Average rate of change}
\subsection*{Limit theorems}
\begin{enumerate}
-\def\labelenumi{\arabic{enumi}.}
-\tightlist
-\item
- For constant function \(f(x)=k\), \(\lim_{x \rightarrow a} f(x) = k\)
-\item
- \(\lim_{x \rightarrow a} (f(x) \pm g(x)) = F \pm G\)
-\item
- \(\lim_{x \rightarrow a} (f(x) \times g(x)) = F \times G\)
-\item
- \({\lim_{x \rightarrow a} {f(x) \over g(x)}} = {F \over G}, G \ne 0\)
+ \def\labelenumi{\arabic{enumi}.}
+ \tightlist
+ \item For constant function \(f(x)=k\), \(\lim_{x \rightarrow a} f(x) = k\)
+ \item \(\lim_{x \rightarrow a} (f(x) \pm g(x)) = F \pm G\)
+ \item \(\lim_{x \rightarrow a} (f(x) \times g(x)) = F \times G\)
+ \item \({\lim_{x \rightarrow a} {f(x) \over g(x)}} = {F \over G}, G \ne 0\)
\end{enumerate}
A function is continuous if \(L^-=L^+=f(x)\) for all values of \(x\).
Not differentiable at:
\begin{itemize}
-\tightlist
-\item
- discontinuous points
-\item
- sharp point/cusp
-\item
- vertical tangents (\(\infty\) gradient)
+ \tightlist
+ \item discontinuous points
+ \item sharp point/cusp
+ \item vertical tangents (\(\infty\) gradient)
\end{itemize}
\subsection*{Tangents \& gradients}
For \(x_2\) and \(x_1\) where \(x_2 > x_1\):
\begin{itemize}
-\tightlist
-\item
- \textbf{strictly increasing}\\ where \(f(x_2) > f(x_1)\) or \(f^\prime(x)>0\)
-\item
- \textbf{strictly decreasing}\\ where \(f(x_2) < f(x_1)\) or \(f^\prime(x)<0\)
-\item
- Endpoints are included, even where gradient \(=0\)
+ \tightlist
+ \item \textbf{strictly increasing}\\ where \(f(x_2) > f(x_1)\) or \(f^\prime(x)>0\)
+ \item \textbf{strictly decreasing}\\ where \(f(x_2) < f(x_1)\) or \(f^\prime(x)<0\)
+ \item Endpoints are included, even where gradient \(=0\)
\end{itemize}
-\columnbreak
-
-\subsubsection*{Solving on CAS}
-
-\colorbox{cas}{\textbf{In main}}: type function. Interactive
-\(\rightarrow\) Calculation \(\rightarrow\) Line \(\rightarrow\) (Normal
-\textbar{} Tan line)\\
-\colorbox{cas}{\textbf{In graph}}: define function. Analysis
-\(\rightarrow\) Sketch \(\rightarrow\) (Normal \textbar{} Tan line).
-Type \(x\) value to solve for a point. Return to show equation for line.
+\begin{cas}
+ \colorbox{cas}{\textbf{In main}}: type function. Interactive
+ \(\rightarrow\) Calculation \(\rightarrow\) Line \(\rightarrow\) (Normal
+ \textbar{} Tan line)\\
+ \colorbox{cas}{\textbf{In graph}}: define function. Analysis
+ \(\rightarrow\) Sketch \(\rightarrow\) (Normal \textbar{} Tan line).
+ Type \(x\) value to solve for a point. Return to show equation for line.
+\end{cas}
\subsection*{Stationary points}
\textbf{Point of inflection:} && f^{\prime\prime} &= 0
\end{align*}
- \begin{tikzpicture}
- \begin{axis}[xmin=-21, xmax=21, ymax=1400, ymin=-1000, ticks=none, axis lines=middle]
- \addplot[color=red, smooth, thick] gnuplot [domain=-15:15,unbounded coords=jump,samples=500] {x^3-3*x^2-144*x+432} node [black, pos=1, right] {\(f(x)\)};
- \addplot[color=darkgray, dashed, smooth, thick] gnuplot [domain=-15:15,unbounded coords=jump,samples=500] {3*x^2-6*x-144} node [black, pos=1, right] {\(f^\prime(x)\)};
- \addplot[mark=*, blue] coordinates {(1,286)} node[above right, align=left, font=\footnotesize]{inflection \\ (falling)} ;
- \addplot[mark=*, orange] coordinates {(-6,972)} node[above left, align=right, font=\footnotesize]{stationary \\ (local max)} ;
- \addplot[mark=*, orange] coordinates {(8,-400)} node[below, align=left, font=\footnotesize]{stationary \\ (local min)} ;
- \end{axis}
- \end{tikzpicture}\\
- \begin{tikzpicture}
- \begin{axis}[enlargelimits=true, xmax=3.5, ticks=none, axis lines=middle]
- \addplot[color=blue, smooth, thick] gnuplot [domain=0.74:3,unbounded coords=jump,samples=500] {(x-2)^3+2} node [black, pos=0.9, left] {\(f(x)\)};
- \addplot[color=darkgray, dashed, smooth, thick] gnuplot [domain=1:3,unbounded coords=jump,samples=500] {3*(x-2)^2} node [black, pos=0.9, right] {\(f^\prime(x)\)};
- \addplot[mark=*, purple] coordinates {(2,2)} node[below right, align=left, font=\footnotesize]{stationary \\ inflection} ;
- \end{axis}
- \end{tikzpicture}\\
-\pagebreak
+\begin{tikzpicture}
+ \begin{axis}[xmin=-21, xmax=21, ymax=1400, ymin=-1000, ticks=none, axis lines=middle]
+ \addplot[color=red, smooth, thick] gnuplot [domain=-15:15,unbounded coords=jump,samples=500] {x^3-3*x^2-144*x+432} node [black, pos=1, right] {\(f(x)\)};
+ \addplot[color=darkgray, dashed, smooth, thick] gnuplot [domain=-15:15,unbounded coords=jump,samples=500] {3*x^2-6*x-144} node [black, pos=1, right] {\(f^\prime(x)\)};
+ \addplot[mark=*, blue] coordinates {(1,286)} node[above right, align=left, font=\footnotesize]{inflection \\ (falling)} ;
+ \addplot[mark=*, orange] coordinates {(-6,972)} node[above left, align=right, font=\footnotesize]{stationary \\ (local max)} ;
+ \addplot[mark=*, orange] coordinates {(8,-400)} node[below, align=left, font=\footnotesize]{stationary \\ (local min)} ;
+ \end{axis}
+\end{tikzpicture}\\
+\begin{tikzpicture}
+ \begin{axis}[enlargelimits=true, xmax=3.5, ticks=none, axis lines=middle]
+ \addplot[color=blue, smooth, thick] gnuplot [domain=0.74:3,unbounded coords=jump,samples=500] {(x-2)^3+2} node [black, pos=0.9, left] {\(f(x)\)};
+ \addplot[color=darkgray, dashed, smooth, thick] gnuplot [domain=1:3,unbounded coords=jump,samples=500] {3*(x-2)^2} node [black, pos=0.9, right] {\(f^\prime(x)\)};
+ \addplot[mark=*, purple] coordinates {(2,2)} node[below right, align=left, font=\footnotesize]{stationary \\ inflection} ;
+ \end{axis}
+\end{tikzpicture}
+
\subsection*{Derivatives}
-\definecolor{shade1}{HTML}{ffffff}
-\definecolor{shade2}{HTML}{F0F9E4}
-\rowcolors{1}{shade1}{shade2}
- \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}
- \vspace*{\fill}
- \columnbreak
+\rowcolors{1}{white}{orange}
+\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}
+
\subsection*{Antiderivatives}
-\rowcolors{1}{shade1}{cas}
- \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*{\fill}
- \columnbreak
+
+\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}
+
+\end{document}
\documentclass[methods-collated.tex]{subfiles}
+
\begin{document}
- \section{Statistics}
- \subsection*{Probability}
+\section{Statistics}
- \begin{align*}
- \Pr(A \cup B) &= \Pr(A) + \Pr(B) - \Pr(A \cap B) \\
- \Pr(A \cap B) &= \Pr(A|B) \times \Pr(B) \\
- \Pr(A|B) &= \frac{\Pr(A \cap B)}{\Pr(B)} \\
- \Pr(A) &= \Pr(A|B) \cdot \Pr(B) + \Pr(A|B^{\prime}) \cdot \Pr(B^{\prime})
- \end{align*}
+\subsection*{Probability}
- Mutually exclusive \(\implies \Pr(A \cup B) = 0\) \\
+\begin{align*}
+ \Pr(A \cup B) &= \Pr(A) + \Pr(B) - \Pr(A \cap B) \\
+ \Pr(A \cap B) &= \Pr(A|B) \times \Pr(B) \\
+ \Pr(A|B) &= \frac{\Pr(A \cap B)}{\Pr(B)} \\
+ \Pr(A) &= \Pr(A|B) \cdot \Pr(B) + \Pr(A|B^{\prime}) \cdot \Pr(B^{\prime})
+\end{align*}
- Independent events:
- \begin{flalign*}
- \quad \Pr(A \cap B) &= \Pr(A) \times \Pr(B)& \\
- \Pr(A|B) &= \Pr(A) \\
- \Pr(B|A) &= \Pr(B)
- \end{flalign*}
+Mutually exclusive \(\implies \Pr(A \cup B) = 0\) \\
- \subsection*{Combinatorics}
+Independent events:
+\begin{flalign*}
+ \quad \Pr(A \cap B) &= \Pr(A) \times \Pr(B)& \\
+ \Pr(A|B) &= \Pr(A) \\
+ \Pr(B|A) &= \Pr(B)
+\end{flalign*}
- \begin{itemize}
- \item Arrangements \({n \choose k} = \frac{n!}{(n-k)}\)
- \item \colorbox{important}{Combinations} \({n \choose k} = \frac{n!}{k!(n-k)!}\)
- \item Note \({n \choose k} = {n \choose k-1}\)
- \end{itemize}
+\subsection*{Combinatorics}
- \subsection*{Distributions}
+\begin{itemize}
+ \item Arrangements \({n \choose k} = \frac{n!}{(n-k)}\)
+ \item \colorbox{important}{Combinations} \({n \choose k} = \frac{n!}{k!(n-k)!}\)
+ \item Note \({n \choose k} = {n \choose k-1}\)
+\end{itemize}
- \subsubsection*{Mean \(\mu\)}
+\subsection*{Distributions}
- \textbf{Mean} \(\mu\) or \textbf{expected value} \(E(X)\)
+\subsubsection*{Mean \(\mu\)}
- \begin{align*}
- E(X) &= \frac{\Sigma \left[ x \cdot f(x) \right]}{\Sigma f} \tag{\(f =\) absolute frequency} \\
- &= \sum_{i=1}^n \left[ x_i \cdot \Pr(X=x_i) \right] \tag{discrete}\\
- &= \int_\textbf{X} (x \cdot f(x)) \> dx
- \end{align*}
+\textbf{Mean} \(\mu\) or \textbf{expected value} \(E(X)\)
- \subsubsection*{Mode}
+\begin{align*}
+ E(X) &= \frac{\Sigma \left[ x \cdot f(x) \right]}{\Sigma f} \tag{\(f =\) absolute frequency} \\
+ &= \sum_{i=1}^n \left[ x_i \cdot \Pr(X=x_i) \right] \tag{discrete}\\
+ &= \int_\textbf{X} (x \cdot f(x)) \> dx
+\end{align*}
- Most popular value (has highest probability of all \(X\) values). Multiple modes can exist if \(>1 \> X\) value have equal-highest probability. Number must exist in distribution.
+\subsubsection*{Mode}
- \subsubsection*{Median}
+Most popular value (has highest probability of all \(X\) values). Multiple modes can exist if \(>1 \> X\) value have equal-highest probability. Number must exist in distribution.
- 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. To find \(m\), add values of \(X\) from smallest to alrgest until the sum reaches 0.5.
+\subsubsection*{Median}
- \[ m = X \> \text{such that} \> \int_{-\infty}^{m} f(x) dx = 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. To find \(m\), add values of \(X\) from smallest to alrgest until the sum reaches 0.5.
- \subsubsection*{Variance \(\sigma^2\)}
+\[ m = X \> \text{such that} \> \int_{-\infty}^{m} f(x) dx = 0.5 \]
- \begin{align*}
- \operatorname{Var}(x) &= \sum_{i=1}^n p_i (x_i-\mu)^2 \\
- &= \sum (x-\mu)^2 \times \Pr(X=x) \\
- &= \sum x^2 \times p(x) - \mu^2 \\
- &= \operatorname{E}(X^2) - [\operatorname{E}(X)]^2
- &= E\left[(X-\mu)^2\right]
- \end{align*}
+\subsubsection*{Variance \(\sigma^2\)}
- \subsubsection*{Standard deviation \(\sigma\)}
+\begin{align*}
+ \operatorname{Var}(x) &= \sum_{i=1}^n p_i (x_i-\mu)^2 \\
+ &= \sum (x-\mu)^2 \times \Pr(X=x) \\
+ &= \sum x^2 \times p(x) - \mu^2 \\
+ &= \operatorname{E}(X^2) - [\operatorname{E}(X)]^2 \\
+ &= E\left[(X-\mu)^2\right]
+\end{align*}
- \begin{align*}
- \sigma &= \operatorname{sd}(X) \\
- &= \sqrt{\operatorname{Var}(X)}
- \end{align*}
+\subsubsection*{Standard deviation \(\sigma\)}
- \subsection*{Binomial distributions}
+\begin{align*}
+ \sigma &= \operatorname{sd}(X) \\
+ &= \sqrt{\operatorname{Var}(X)}
+\end{align*}
- Conditions for a \textit{binomial distribution}:
- \begin{enumerate}
- \item Two possible outcomes: \textbf{success} or \textbf{failure}
- \item \(\Pr(\text{success})\) is constant across trials (also denoted \(p\))
- \item Finite number \(n\) of independent trials
- \end{enumerate}
+\subsection*{Binomial distributions}
+Conditions for a \textit{binomial distribution}:
+\begin{enumerate}
+ \item Two possible outcomes: \textbf{success} or \textbf{failure}
+ \item \(\Pr(\text{success})\) (=\(p\)) is constant across trials
+ \item Finite number \(n\) of independent trials
+\end{enumerate}
- \subsubsection*{Properties of \(X \sim \operatorname{Bi}(n,p)\)}
- \begin{align*}
- \mu(X) &= np \\
- \operatorname{Var}(X) &= np(1-p) \\
- \sigma(X) &= \sqrt{np(1-p)} \\
- \Pr(X=x) &= {n \choose x} \cdot p^x \cdot (1-p)^{n-x}
- \end{align*}
+\subsubsection*{Properties of \(X \sim \operatorname{Bi}(n,p)\)}
- \begin{cas}
- Interactive \(\rightarrow\) Distribution \(\rightarrow\) \verb;binomialPdf; then input
- \begin{description}[nosep, style=multiline, labelindent=0.5cm, leftmargin=3cm, font=\normalfont]
- \item [x:] no. of successes
- \item [numtrial:] no. of trials
- \item [pos:] probability of success
- \end{description}
- \end{cas}
+\begin{align*}
+ \mu(X) &= np \\
+ \operatorname{Var}(X) &= np(1-p) \\
+ \sigma(X) &= \sqrt{np(1-p)} \\
+ \Pr(X=x) &= {n \choose x} \cdot p^x \cdot (1-p)^{n-x}
+\end{align*}
- \subsection*{Continuous random variables}
+\begin{cas}
+ Interactive \(\rightarrow\) Distribution \(\rightarrow\) \verb;binomialPdf;
+ \begin{description}[nosep, style=multiline, labelindent=0.5cm, leftmargin=3cm, font=\normalfont]
+ \item [x:] no. of successes
+ \item [numtrial:] no. of trials
+ \item [pos:] probability of success
+ \end{description}
+\end{cas}
- A continuous random variable \(X\) has a pdf \(f\) such that:
+\subsection*{Continuous random variables}
- \begin{enumerate}
- \item \(f(x) \ge 0 \forall x \)
- \item \(\int^\infty_{-\infty} f(x) \> dx = 1\)
- \end{enumerate}
+A continuous random variable \(X\) has a pdf \(f\) such that:
- \begin{align*}
- E(X) &= \int_\textbf{X} (x \cdot f(x)) \> dx \\
- \operatorname{Var}(X) &= E\left[(X-\mu)^2\right]
- \end{align*}
+\begin{enumerate}
+ \item \(f(x) \ge 0 \forall x \)
+ \item \(\int^\infty_{-\infty} f(x) \> dx = 1\)
+\end{enumerate}
- \[ \Pr(X \le c) = \int^c_{-\infty} f(x) \> dx \]
+\begin{align*}
+ E(X) &= \int_\textbf{X} (x \cdot f(x)) \> dx \\
+ \operatorname{Var}(X) &= E\left[(X-\mu)^2\right]
+\end{align*}
+\[ \Pr(X \le c) = \int^c_{-\infty} f(x) \> dx \]
- \subsection*{Two random variables \(X, Y\)}
- If \(X\) and \(Y\) are independent:
- \begin{align*}
- \operatorname{E}(aX+bY) & = a\operatorname{E}(X)+b\operatorname{E}(Y) \\
- \operatorname{Var}(aX \pm bY \pm c) &= a^2 \operatorname{Var}(X) + b^2 \operatorname{Var}(Y)
- \end{align*}
+\subsection*{Two random variables \(X, Y\)}
- \subsection*{Linear functions \(X \rightarrow aX+b\)}
+If \(X\) and \(Y\) are independent:
+\begin{align*}
+ \operatorname{E}(aX+bY) & = a\operatorname{E}(X)+b\operatorname{E}(Y) \\
+ \operatorname{Var}(aX \pm bY \pm c) &= a^2 \operatorname{Var}(X) + b^2 \operatorname{Var}(Y)
+\end{align*}
- \begin{align*}
- \Pr(Y \le y) &= \Pr(aX+b \le y) \\
- &= \Pr\left(X \le \dfrac{y-b}{a}\right) \\
- &= \int^{\frac{y-b}{a}}_{-\infty} f(x) \> dx
- \end{align*}
+\subsection*{Linear functions \(X \rightarrow aX+b\)}
- \begin{align*}
- \textbf{Mean:} && \operatorname{E}(aX+b) & = a\operatorname{E}(X)+b \\
- \textbf{Variance:} && \operatorname{Var}(aX+b) &= a^2 \operatorname{Var}(X) \\
- \end{align*}
+\begin{align*}
+ \Pr(Y \le y) &= \Pr(aX+b \le y) \\
+ &= \Pr\left(X \le \dfrac{y-b}{a}\right) \\
+ &= \int^{\frac{y-b}{a}}_{-\infty} f(x) \> dx
+\end{align*}
- \subsection*{Expectation theorems}
+\begin{align*}
+ \textbf{Mean:} && \operatorname{E}(aX+b) & = a\operatorname{E}(X)+b \\
+ \textbf{Variance:} && \operatorname{Var}(aX+b) &= a^2 \operatorname{Var}(X) \\
+\end{align*}
- For some non-linear function \(g\), the expected value \(E(g(X))\) is not equal to \(g(E(X))\).
+\subsection*{Expectation theorems}
- \begin{align*}
- E(X^2) &= \operatorname{Var}(X) - \left[E(X)\right]^2 \\
- E(X^n) &= \Sigma x^n \cdot p(x) \tag{non-linear} \\
- &\ne [E(X)]^n \\
- E(aX \pm b) &= aE(X) \pm b \tag{linear} \\
- E(b) &= b \tag{\(\forall b \in \mathbb{R}\)}\\
- E(X+Y) &= E(X) + E(Y) \tag{two variables}
- \end{align*}
+For some non-linear function \(g\), the expected value \(E(g(X))\) is not equal to \(g(E(X))\).
- \subsection*{Sample mean}
+\begin{align*}
+ E(X^2) &= \operatorname{Var}(X) - \left[E(X)\right]^2 \\
+ E(X^n) &= \Sigma x^n \cdot p(x) \tag{non-linear} \\
+ &\ne [E(X)]^n \\
+ E(aX \pm b) &= aE(X) \pm b \tag{linear} \\
+ E(b) &= b \tag{\(\forall b \in \mathbb{R}\)}\\
+ E(X+Y) &= E(X) + E(Y) \tag{two variables}
+\end{align*}
- Approximation of the \textbf{population mean} determined experimentally.
+\begin{figure*}[hb]
+ \centering
+ \include{../spec/normal-dist-graph}
+\end{figure*}
- \[ \overline{x} = \dfrac{\Sigma x}{n} \]
+\subsection*{Sample mean}
- where
- \begin{description}[nosep, labelindent=0.5cm]
- \item \(n\) is the size of the sample (number of sample points)
- \item \(x\) is the value of a sample point
- \end{description}
+Approximation of the \textbf{population mean} determined experimentally.
+
+\[ \overline{x} = \dfrac{\Sigma x}{n} \]
+
+where
+\begin{description}[nosep, labelindent=0.5cm]
+ \item \(n\) is the size of the sample (number of sample points)
+ \item \(x\) is the value of a sample point
+\end{description}
+
+\begin{cas}
+ \begin{enumerate}[leftmargin=3mm]
+ \item Spreadsheet
+ \item In cell A1:\\ \path{mean(randNorm(sd, mean, sample size))}
+ \item Edit \(\rightarrow\) Fill \(\rightarrow\) Fill Range
+ \item Input range as A1:An where \(n\) is the number of samples
+ \item Graph \(\rightarrow\) Histogram
+ \end{enumerate}
+\end{cas}
+
+\subsubsection*{Sample size of \(n\)}
- \begin{cas}
- \begin{enumerate}[leftmargin=3mm]
- \item Spreadsheet
- \item In cell A1:\\ \path{mean(randNorm(sd, mean, sample size))}
- \item Edit \(\rightarrow\) Fill \(\rightarrow\) Fill Range
- \item Input range as A1:An where \(n\) is the number of samples
- \item Graph \(\rightarrow\) Histogram
- \end{enumerate}
- \end{cas}
-
- \subsubsection*{Sample size of \(n\)}
-
- \[ \overline{X} = \sum_{i=1}^n \frac{x_i}{n} = \dfrac{\sum x}{n} \]
-
- Sample mean is distributed with mean \(\mu\) and sd \(\frac{\sigma}{\sqrt{n}}\) (approaches these values for increasing sample size \(n\)).
-
- For a new distribution with mean of \(n\) trials, \(\operatorname{E}(X^\prime) = \operatorname{E}(X), \quad \operatorname{sd}(X^\prime) = \dfrac{\operatorname{sd}(X)}{\sqrt{n}}\)
-
- \begin{cas}
-
- \begin{itemize}
- \item Spreadsheet \(\rightarrow\) Catalog \(\rightarrow\) \verb;randNorm(sd, mean, n); where \verb;n; is the number of samples. Show histogram with Histogram key in top left
- \item To calculate parameters of a dataset: Calc \(\rightarrow\) One-variable
- \end{itemize}
-
- \end{cas}
-
- \subsection*{Normal distributions}
-
-
- \[ Z = \frac{X - \mu}{\sigma} \]
-
- Normal distributions must have area (total prob.) of 1 \(\implies \int^\infty_{-\infty} f(x) \> dx = 1\) \\
- \(\text{mean} = \text{mode} = \text{median}\)
-
- \begin{warning}
- Always express \(z\) as +ve. Express confidence \textit{interval} as ordered pair.
- \end{warning}
-
- \pgfmathdeclarefunction{gauss}{2}{%
- \pgfmathparse{1/(#2*sqrt(2*pi))*exp(-((x-#1)^2)/(2*#2^2))}%
- }
- \pgfkeys{/pgf/decoration/.cd,
- distance/.initial=10pt
- }
- \pgfdeclaredecoration{add dim}{final}{
- \state{final}{%
- \pgfmathsetmacro{\dist}{5pt*\pgfkeysvalueof{/pgf/decoration/distance}/abs(\pgfkeysvalueof{/pgf/decoration/distance})}
- \pgfpathmoveto{\pgfpoint{0pt}{0pt}}
- \pgfpathlineto{\pgfpoint{0pt}{2*\dist}}
- \pgfpathmoveto{\pgfpoint{\pgfdecoratedpathlength}{0pt}}
- \pgfpathlineto{\pgfpoint{(\pgfdecoratedpathlength}{2*\dist}}
- \pgfsetarrowsstart{latex}
- \pgfsetarrowsend{latex}
- \pgfpathmoveto{\pgfpoint{0pt}{\dist}}
- \pgfpathlineto{\pgfpoint{\pgfdecoratedpathlength}{\dist}}
- \pgfusepath{stroke}
- \pgfpathmoveto{\pgfpoint{0pt}{0pt}}
- \pgfpathlineto{\pgfpoint{\pgfdecoratedpathlength}{0pt}}
- }}
- \tikzset{dim/.style args={#1,#2}{decoration={add dim,distance=#2},
- decorate,
- postaction={decorate,decoration={text along path,
- raise=#2,
- text align={align=center},
- text={#1}}}}
- }
- \begin{figure*}[hb]
- \centering
- \begin{tikzpicture}
- \begin{axis}[every axis plot post/.style={
- mark=none,domain=-3:3,samples=50,smooth},
- axis x line=bottom,
- axis y line=left,
- enlargelimits=upper,
- x=\textwidth/10,
- ytick={0.55},
- yticklabels={\(\frac{1}{\sigma \sqrt{2\pi}}\)},
- xtick={-2,-1,0,1,2},
- x tick label style = {font=\footnotesize},
- xticklabels={\((\mu-2\sigma)\), \((\mu-\sigma)\), \(\mu\), \((\mu+\sigma)\), \((\mu+2\sigma)\)},
- xlabel={\(x\)},
- every axis x label/.style={at={(current axis.right of origin)},anchor=north west},
- every axis y label/.style={at={(axis description cs:-0.02,0.2)}, anchor=south west, rotate=90},
- ylabel={\(\Pr(X=x)\)}]
- \addplot {gauss(0,0.75)};
- \fill[red!30] (-3,0) -- plot[id=f3,domain=-3:3,samples=50] function {1/(0.75*sqrt(2*pi))*exp(-((x)^2)/(2*0.75^2))} -- (3,0) -- cycle;
- \fill[darkgray!30] (3,0) -- plot[id=f3,domain=-3:3,samples=50] function {1/(0.75*sqrt(2*pi))*exp(-x*x*0.5/(0.75*0.75))} -- (3,0) -- cycle;
- \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\%};
- \end{scope}
- \begin{scope}[-, dashed, gray]
- \draw (-1,0) -- (-1, 0.35);
- \draw (1,0) -- (1, 0.35);
- \draw (-2,0) -- (-2, 0.25);
- \draw (2,0) -- (2, 0.25);
- \draw (-3,0) -- (-3, 0.15);
- \draw (3,0) -- (3, 0.15);
- \end{scope}
- \end{axis}
- \begin{axis}[every axis plot post/.append style={
- mark=none,domain=-3:3,samples=50,smooth},
- axis x line=bottom,
- enlargelimits=upper,
- x=\textwidth/10,
- xtick={-2,-1,0,1,2},
- axis x line shift=30pt,
- hide y axis,
- x tick label style = {font=\footnotesize},
- xlabel={\(Z\)},
- every axis x label/.style={at={(axis description cs:1,-0.25)},anchor=south west}]
- \addplot {gauss(0,0.75)};
- \end{axis}
- \end{tikzpicture}
- \end{figure*}
-
- \subsection*{Confidence intervals}
+\[ \overline{X} = \sum_{i=1}^n \frac{x_i}{n} = \dfrac{\sum x}{n} \]
+
+Sample mean is distributed with mean \(\mu\) and sd \(\frac{\sigma}{\sqrt{n}}\) (approaches these values for increasing sample size \(n\)).
+
+For a new distribution with mean of \(n\) trials, \(\operatorname{E}(X^\prime) = \operatorname{E}(X), \quad \operatorname{sd}(X^\prime) = \dfrac{\operatorname{sd}(X)}{\sqrt{n}}\)
+
+\begin{cas}
\begin{itemize}
- \item \textbf{Point estimate:} single-valued estimate of the population mean from the value of the sample mean \(\overline{x}\)
- \item \textbf{Interval estimate:} confidence interval for population mean \(\mu\)
- \item \(C\)\% confidence interval \(\implies\) \(C\)\% of samples will contain population mean \(\mu\)
+ \item Spreadsheet \(\rightarrow\) Catalog \(\rightarrow\) \verb;randNorm(sd, mean, n); where \verb;n; is the number of samples. Show histogram with Histogram key in top left
+ \item To calculate parameters of a dataset: Calc \(\rightarrow\) One-variable
\end{itemize}
- \subsubsection*{95\% confidence interval}
+\end{cas}
- For 95\% c.i. of population mean \(\mu\):
+\subsection*{Normal distributions}
- \[ x \in \left(\overline{x} \pm 1.96 \dfrac{\sigma}{\sqrt{n}} \right)\]
- where:
- \begin{description}[nosep, labelindent=0.5cm]
- \item \(\overline{x}\) is the sample mean
- \item \(\sigma\) is the population sd
- \item \(n\) is the sample size from which \(\overline{x}\) was calculated
- \end{description}
+\[ Z = \frac{X - \mu}{\sigma} \]
+
+Normal distributions must have area (total prob.) of 1 \(\implies \int^\infty_{-\infty} f(x) \> dx = 1\) \\
+\(\text{mean} = \text{mode} = \text{median}\)
+
+\begin{warning}
+ Always express \(z\) as +ve. Express confidence \textit{interval} as ordered pair.
+\end{warning}
+
+\subsection*{Confidence intervals}
+
+\begin{itemize}
+ \item \textbf{Point estimate:} single-valued estimate of the population mean from the value of the sample mean \(\overline{x}\)
+ \item \textbf{Interval estimate:} confidence interval for population mean \(\mu\)
+ \item \(C\)\% confidence interval \(\implies\) \(C\)\% of samples will contain population mean \(\mu\)
+\end{itemize}
+
+\subsubsection*{95\% confidence interval}
+
+For 95\% c.i. of population mean \(\mu\):
+
+\[ x \in \left(\overline{x} \pm 1.96 \dfrac{\sigma}{\sqrt{n}} \right)\]
+
+where:
+\begin{description}[nosep, labelindent=0.5cm]
+ \item \(\overline{x}\) is the sample mean
+ \item \(\sigma\) is the population sd
+ \item \(n\) is the sample size from which \(\overline{x}\) was calculated
+\end{description}
- \begin{cas}
- Menu \(\rightarrow\) Stats \(\rightarrow\) Calc \(\rightarrow\) Interval \\
- Set \textit{Type = One-Sample Z Int} \\ \-\hspace{1em} and select \textit{Variable}
- \end{cas}
+\begin{cas}
+ Menu \(\rightarrow\) Stats \(\rightarrow\) Calc \(\rightarrow\) Interval \\
+ Set \textit{Type = One-Sample Z Int} \\ \-\hspace{1em} and select \textit{Variable}
+\end{cas}
- \subsection*{Margin of error}
+\subsection*{Margin of error}
- For 95\% confidence interval of \(\mu\):
- \begin{align*}
- M &= 1.96 \times \dfrac{\sigma}{\sqrt{n}} \\
- &= \dfrac{1}{2} \times \text{width of c.i.} \\
- \implies n &= \left( \dfrac{1.96 \sigma}{M} \right)^2
- \end{align*}
+For 95\% confidence interval of \(\mu\):
+\begin{align*}
+ M &= 1.96 \times \dfrac{\sigma}{\sqrt{n}} \\
+ &= \dfrac{1}{2} \times \text{width of c.i.} \\
+ \implies n &= \left( \dfrac{1.96 \sigma}{M} \right)^2
+\end{align*}
- Always round \(n\) up to a whole number of samples.
+Always round \(n\) up to a whole number of samples.
- \subsection*{General case}
+\subsection*{General case}
- For \(C\)\% c.i. of population mean \(\mu\):
+For \(C\)\% c.i. of population mean \(\mu\):
- \[ x \in \left( \overline{x} \pm k \dfrac{\sigma}{\sqrt{n}} \right) \]
- \hfill where \(k\) is such that \(\Pr(-k < Z < k) = \frac{C}{100}\)
+\[ x \in \left( \overline{x} \pm k \dfrac{\sigma}{\sqrt{n}} \right) \]
+\hfill where \(k\) is such that \(\Pr(-k < Z < k) = \frac{C}{100}\)
- \begin{cas}
- Menu \(\rightarrow\) Stats \(\rightarrow\) Calc \(\rightarrow\) Interval \\
- Set \textit{Type = One-\colorbox{important}{Prop} Z Int} \\
- Input x \(= \hat{p} * n\)
- \end{cas}
+\begin{cas}
+ Menu \(\rightarrow\) Stats \(\rightarrow\) Calc \(\rightarrow\) Interval \\
+ Set \textit{Type = One-\colorbox{important}{Prop} Z Int} \\
+ Input x \(= \hat{p} * n\)
+\end{cas}
- \subsection*{Confidence interval for multiple trials}
+\subsection*{Confidence interval for multiple trials}
- For a set of \(n\) confidence intervals (samples), there is \(0.95^n\) chance that all \(n\) intervals contain the population mean \(\mu\).
+For a set of \(n\) confidence intervals (samples), there is \(0.95^n\) chance that all \(n\) intervals contain the population mean \(\mu\).
- \end{document}
+\end{document}