\Pr(A) &= \Pr(A|B) \cdot \Pr(B) + \Pr(A|B^{\prime}) \cdot \Pr(B^{\prime})
\end{align*}
-Mutually exclusive \(\implies \Pr(A \cup B) = 0\) \\
+Mutually exclusive: \(\Pr(A \cap B) = 0\) \\
Independent events:
\begin{flalign*}
\subsection*{Combinatorics}
-\begin{itemize}
+\begin{itemize} \tightlist
\item Arrangements \({n \choose k} = \frac{n!}{(n-k)}\)
- \item \colorbox{important}{Combinations} \({n \choose k} = \frac{n!}{k!(n-k)!}\)
+ \item \colorbox{highlight}{Combinations} \({n \choose k} = \frac{n!}{k!(n-k)!}\)
\item Note \({n \choose k} = {n \choose k-1}\)
\end{itemize}
\subsection*{Distributions}
-\subsubsection*{Mean \(\mu\)}
+\begin{tikzpicture}
+ \begin{axis}[axis lines=left,
+ ticks=none,
+ xmin=0,
+ ymax=0.5,
+ enlargelimits=upper,
+ ylabel={\(\Pr(X=x)\)},
+ 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.5)}, anchor=south west, rotate=90},
+ ]
+ \fill[pattern=north east lines, pattern color=orange] (0,0) -- plot[domain=0:1.68, samples=50] function {abs(x)*exp(-x)} -- (1.68,0) -- cycle;
+ \fill[pattern=north west lines, pattern color=red] (1.68,0) -- plot[domain=1.68:5, samples=50] function {abs(x)*exp(-x)} -- (5,0) -- cycle;
+ \draw[dashed, blue, very thick] (axis cs:1.68,0) -- (axis cs:1.68,0.31) node [above, anchor=south west, black] {Median};
+ \draw[dashed, blue, very thick] (axis cs:2,0) -- (axis cs:2,0.27) node [above, anchor=west, black] {Mean};
+ \draw[dashed, blue, very thick] (axis cs:1,0) -- (axis cs:1,0.365) node [above, black] {Mode};
+ \node at (1,0.18) {\textbf{50\%}};
+ \node at (3.1,0.08) {\textbf{50\%}};
+ \addplot[thick, black, no markers, samples=200, domain=0:5] {abs(x)*exp(-x)};
+ \end{axis}
+\end{tikzpicture}
-\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} \\
\subsubsection*{Mode}
-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.
+Value of \(X\) which has the highest probability
+
+\begin{itemize} \tightlist
+ \item Most popular value in discrete distributions
+ \item Must exist in distribution
+ \item Represented by local max in pdf
+ \item Multiple modes exist when \(>1 \> X\) value have equal-highest probability
+\end{itemize}
\subsubsection*{Median}
-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.
+Value separating lower and upper half of distribution area
+
+\textbf{Continuous:}
+\[ m = X \> \text{such that} \> \int_{-\infty}^{m} f(x) \> dx = 0.5 \]
-\[ m = X \> \text{such that} \> \int_{-\infty}^{m} f(x) dx = 0.5 \]
+\textbf{Discrete:} (not in course)
+\begin{itemize} \tightlist
+ \item Does not have to exist in distribution
+ \item Add values of \(X\) smallest to largest until sum is \(\ge 0.5\)
+ \item If \(X_1 < 0.5 < X_2\), then median is the average of \(X_1\) and \(X_2\)
+ \begin{itemize}\tightlist
+ \item If \(m > 0.5\), then value of \(X\) that is reached is the median of \(X\)
+ \end{itemize}
+\end{itemize}
\subsubsection*{Variance \(\sigma^2\)}
\subsection*{Binomial distributions}
Conditions for a \textit{binomial distribution}:
-\begin{enumerate}
+\begin{enumerate} \tightlist
\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
\[ \Pr(X \le c) = \int^c_{-\infty} f(x) \> dx \]
+\begin{cas}
+ Define piecewise functions: \\
+ \-\hspace{1em}Math3 \(\rightarrow\)
+ \begin{tikzpicture}%
+ \draw rectangle (0.5,0.5);
+ \node at (0.08,0.25) {\(\{\)};
+ \filldraw [black] (0.15, 0.4) rectangle(0.25, 0.3);
+ \draw (0.35, 0.4) rectangle(0.45, 0.3);
+ \node [font=\footnotesize] at (0.3,0.3) {\verb;,;};
+ \draw (0.15, 0.2) rectangle(0.25, 0.1);
+ \node [font=\footnotesize] at (0.3,0.1) {\verb;,;};
+ \draw (0.35, 0.2) rectangle(0.45, 0.1);
+ \end{tikzpicture}
+ % TODO: finish this section
+\end{cas}
\subsection*{Two random variables \(X, Y\)}
\end{cas}
+\subsection*{Population sampling}
+
+\subsubsection*{Population proportion}
+
+\[ p = \dfrac{n \text{ with attribute in population}}{\text{population size}} \]
+
+Constant for a given population.
+
+\subsection*{Sample proportion}
+
+\[ \hat{p} = \dfrac{n \text{ with attribute in sample}}{\text{sample size}} \]
+
+Varies with each sample.
+
\subsection*{Normal distributions}
\item \(C\)\% confidence interval \(\implies\) \(C\)\% of samples will contain population mean \(\mu\)
\end{itemize}
+\begin{cas}
+ Menu \(\rightarrow\) Stats \(\rightarrow\) Calc \(\rightarrow\) Interval \\
+ Set \textit{Type = One-Sample Z Int} \\ \-\hspace{1em} and select \textit{Variable}
+\end{cas}
+
\subsubsection*{95\% confidence interval}
For 95\% c.i. of population mean \(\mu\):
\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}
+\subsubsection*{Confidence interval of \(p\) from \(\hat{p}\)}
+
+\[ x \in \left( \hat{p} \pm Z \sqrt{\dfrac{\hat{p}(1-\hat{p})}{n}} \right) \]
\subsection*{Margin of error}