\subsection{Probability}
\shortdefinition[Sum rule] $\P(X) = \sum \P(X, Y) = \sum \P(X \cap Y)$

\shortdefinition[Prod] $\P(X \cap Y) = \P(X | Y) \P(Y) = \P(Y | X) P(X)$

\shorttheorem[Bayes] $\displaystyle \P(Y_i | X) = \frac{\P(X | Y_i) \P(Y_i)}{\sum_{j = 1}^n \P(X | Y_j) \P(Y_j)}$

\shortdefinition[Cont. Var] Sums become integrals\\
e.g. $\sum_{X} \P(X) = 1$ becomes $\int \P(x) \dx = 1$

\shortdefinition[Indep.] $x, y$ indep. iff $\P(\cX \cap \cY) = \P(\cX) \P(\cY)$

\shortdefinition[Cond. Indep.] iff $\P(\cX \cap \cY | \cZ) = \P(\cX | \cY) \P(\cY | \cZ)$

\shortdefinition $\E[\vec{x}] = \int_{-\8}^{\8} \vec{x} \P(\vec{x}) \dx \vec{x}$, also for $\vec{x} = \vec{f(x)}$

\shortdefinition $\text{Cov}[x] = \E[\vec{x} \vec{x}^\top] - \E[\vec{x}]\E[\vec{x}]^\top = \mat{\Sigma}$

\shortdefinition[Gauss. Dist.] $\vec{x} \sim \cN(\vec{\mu}, \mat{\Sigma})$ ($\vec{\mu}$ mean, $\mat{\Sigma}$ cov.),\\
PDF: $f(\vec{x}) = \frac{1}{\sqrt{(2\pi)^k \det(\mat{\Sigma})}} \text{exp}\left( -\frac{1}{2}(\vec{x} - \vec{\mu})^\top \mat{\Sigma}^{-1} (\vec{x} - \vec{\mu}) \right)$

$\Sigma^{-1}$ for $\Sigma$ diagonal, inverse of diag els (e.g. $\sigma^{-1}$)
