formelsammlung/src/math/probability_theory.tex
2025-03-30 01:04:04 +01:00

384 lines
20 KiB
TeX

\Section{pt}
\desc{Probability theory}{}{}
\desc[german]{Wahrscheinlichkeitstheorie}{}{}
\begin{formula}{mean}
\absLabel
\desc{Mean}{Expectation value}{}
\desc[german]{Mittelwert}{Erwartungswert}{}
\eq{\braket{x} = \int w(x)\, x\, \d x}
\end{formula}
\begin{formula}{variance}
\absLabel
\desc{Variance}{Square of the \fRef{math:pt:std-deviation}}{}
\desc[german]{Varianz}{Quadrat der\fRef{math:pt:std-deviation}}{}
\eq{\sigma^2 = (\Delta \hat{x})^2 = \Braket{\hat{x}^2} - \braket{\hat{x}}^2 = \braket{(x - \braket{x})^2}}
\end{formula}
\begin{formula}{covariance}
\absLabel
\desc{Covariance}{}{}
\desc[german]{Kovarianz}{}{}
\eq{\cov(x,y) = \sigma(x,y) = \sigma_{XY} = \Braket{(x-\braket{x})\,(y-\braket{y})}}
\end{formula}
\begin{formula}{std-deviation}
\absLabel
\desc{Standard deviation}{}{}
\desc[german]{Standardabweichung}{}{}
\eq{\sigma = \sqrt{\sigma^2} = \sqrt{(\Delta x)^2}}
\end{formula}
\begin{formula}{median}
\desc{Median}{Value separating lower half from top half}{$x$ dataset with $n$ elements}
\desc[german]{Median}{Teilt die untere von der oberen Hälfte}{$x$ Reihe mit $n$ Elementen}
\eq{
\textrm{med}(x) = \left\{ \begin{array}{ll} x_{(n+1)/2} & \text{$n$ \GT{odd}} \\ \frac{x_{(n/2)}+x_{((n/2)+1)}}{2} & \text{$n$ \GT{even}} \end{array} \right.
}
\end{formula}
\begin{formula}{pdf}
\abbrLabel{PDF}
\desc{Probability density function}{Random variable has density $f$. The integral gives the probability of $X$ taking a value $x\in[a,b]$.}{$f$ normalized: $\int_{-\infty}^\infty f(x) \d x= 1$}
\desc[german]{Wahrscheinlichkeitsdichtefunktion}{Zufallsvariable hat Dichte $f$. Das Integral gibt Wahrscheinlichkeit an, dass $X$ einen Wert $x\in[a,b]$ annimmt}{$f$ normalisiert $\int_{-\infty}^\infty f(x) \d x= 1$}
\eq{P([a,b]) := \int_a^b f(x) \d x}
\end{formula}
\begin{formula}{cdf}
\abbrLabel{CDF}
\desc{Cumulative distribution function}{}{$f$ probability density function}
\desc[german]{Kumulative Verteilungsfunktion}{}{$f$ Wahrscheinlichkeitsdichtefunktion}
\eq{F(x) = \int_{-\infty}^x f(t) \d t}
\end{formula}
\begin{formula}{pmf}
\abbrLabel{PMF}
\desc{Probability mass function}{Probability $p$ that \textbf{discrete} random variable $X$ has exact value $x$}{$P$ probability measure}
\desc[german]{Wahrscheinlichkeitsfunktion / Zählfunktion}{Wahrscheinlichkeit $p$ dass eine \textbf{diskrete} Zufallsvariable $X$ einen exakten Wert $x$ annimmt}{}
\eq{p_X(x) = P(X = x)}
\end{formula}
\begin{formula}{autocorrelation} \absLabel
\desc{Autocorrelation}{Correlation of $f$ to itself at an earlier point in time, $C$ is a covariance function}{$\tau$ lag-time}
\desc[german]{Autokorrelation}{Korrelation vonn $f$ zu sich selbst zu einem früheren Zeitpunkt. $C$ ist auch die Kovarianzfunktion}{$\tau$ Zeitverschiebung}
\eq{C_A(\tau) &= \lim_{T \to \infty} \frac{1}{2T}\int_{-T}^{T} f(t+\tau) f(t) \d t) \\ &= \braket{f(t+\tau)\cdot f(t)}}
\end{formula}
\begin{formula}{binomial_coefficient}
\desc{Binomial coefficient}{Number of possibilitites of choosing $k$ objects out of $n$ objects\\}{}
\desc[german]{Binomialkoeffizient}{Anzahl der Möglichkeiten, $k$ aus $n$ zu wählen\\ "$n$ über $k$"}{}
\eq{\binom{n}{k} = \frac{n!}{k!(n-k)!}}
\end{formula}
\Subsection{distributions}
\desc{Distributions}{}{}
\desc[german]{Verteilungen}{}{}
\Subsubsection{cont}
\desc{Continuous probability distributions}{}{}
\desc[german]{Kontinuierliche Wahrscheinlichkeitsverteilungen}{}{}
\begin{bigformula}{normal}
\absLabel[normal_distribution]
\desc{Gauß/Normal distribution}{}{}
\desc[german]{Gauß/Normal-Verteilung}{}{}
\fsplit[\distleftwidth]{
\centering
\includegraphics{img/distribution_gauss.pdf}
}{
\begin{distribution}
\disteq{parameters}{\mu \in \R,\quad \sigma^2 \in \R}
\disteq{support}{x \in \R}
\disteq{pdf}{\frac{1}{\sqrt{2\pi\sigma^2}}\exp \left(-\frac{(x-\mu)^2}{2\sigma^2}\right)}
\disteq{cdf}{\frac{1}{2}\left[1 + \erf \left(\frac{x-\mu}{\sqrt{2}\sigma}\right)\right]}
\disteq{mean}{\mu}
\disteq{median}{\mu}
\disteq{variance}{\sigma^2}
\end{distribution}
}
\end{bigformula}
\begin{formula}{standard_normal}
\absLabel[standard_normal_distribution]
\desc{Density function of the standard normal distribution}{$\mu = 0$, $\sigma = 1$}{}
\desc[german]{Dichtefunktion der Standard-Normalverteilung}{$\mu = 0$, $\sigma = 1$}{}
\eq{\varphi(x) = \frac{1}{\sqrt{2\pi}} \e^{-\frac{1}{2}x^2}}
\end{formula}
\begin{bigformula}{multivariate_normal}
\absLabel[multivariate_normal_distribution]
\desc{Multivariate normal distribution}{Multivariate Gaussian distribution}{$\vec{\mu}$ \absRef{mean}, $\mat{\Sigma}$ \absRef{covariance}}
\desc[german]{Mehrdimensionale Normalverteilung}{Multivariate Normalverteilung}{}
\fsplit[0.3]{
\TODO{k-variate normal plot}
}{
\begin{distribution}
\disteq{parameters}{\vec{\mu} \in \R^k,+\quad \mat{\Sigma} \in \R^{k\times k}}
\disteq{support}{\vec{x} \in \vec{\mu} + \text{span}(\mat{\Sigma})}
\disteq{pdf}{\mathcal{N}(\vec{\mu}, \mat{\Sigma}) = \frac{1}{(2\pi)^{k/2}} \frac{1}{\sqrt{\det{\Sigma}}} \Exp{-\frac{1}{2} \left(\vecx-\vec{\mu}\right)^\T \mat{\Sigma}^{-1} \left(\vecx-\vec{\mu}\right)}}
\disteq{mean}{\vec{\mu}}
\disteq{variance}{\mat{\Sigma}}
\end{distribution}
}
\end{bigformula}
\begin{bigformula}{laplace}
\absLabel[laplace_distribution]
\desc{Laplace-distribution}{Double exponential distribution}{}
\desc[german]{Laplace-Verteilung}{Doppelexponentialverteilung}{}
\fsplit[\distleftwidth]{
\centering
\includegraphics{img/distribution_laplace.pdf}
}{
\begin{distribution}
\disteq{parameters}{\mu \in \R,\quad b > 0 \in \R}
\disteq{support}{x \in \R}
\disteq{pdf}{\frac{1}{\sqrt{2b}}\Exp{-\frac{\abs{x-\mu}}{b}}}
% \disteq{cdf}{\frac{1}{2}\left[1 + \erf \left(\frac{x-\mu}{\sqrt{2}\sigma}\right)\right]}
\disteq{mean}{\mu}
\disteq{median}{\mu}
\disteq{variance}{2b^2}
\end{distribution}
}
\end{bigformula}
\begin{bigformula}{cauchy}
\absLabel[lorentz_distribution]
\desc{Cauchys / Lorentz distribution}{Also known as Cauchy-Lorentz distribution, Lorentz(ian) function, Breit-Wigner distribution.}{}
\desc[german]{Cauchy / Lorentz-Verteilung}{Auch bekannt als Cauchy-Lorentz Verteilung, Lorentz Funktion, Breit-Wigner Verteilung.}{}
\fsplit[\distleftwidth]{
\centering
\includegraphics{img/distribution_cauchy.pdf}
}{
\begin{distribution}
\disteq{parameters}{x_0 \in \R,\quad \gamma \in \R}
\disteq{support}{x \in \R}
\disteq{pdf}{\frac{1}{\pi\gamma\left[1+\left(\frac{x-x_0}{\gamma}\right)^2\right]}}
\disteq{cdf}{\frac{1}{\pi}\arctan\left(\frac{x-x_0}{\gamma}\right) + \frac{1}{2}}
\disteq{mean}{\text{\GT{undefined}}}
\disteq{median}{x_0}
\disteq{variance}{\text{\GT{undefined}}}
\end{distribution}
}
\end{bigformula}
\begin{bigformula}{maxwell-boltzmann}
\absLabel[maxwell-boltzmann_distribution]
\desc{Maxwell-Boltzmann distribution}{}{}
\desc[german]{Maxwell-Boltzmann Verteilung}{}{}
\fsplit[\distleftwidth]{
\centering
\includegraphics{img/distribution_maxwell-boltzmann.pdf}
}{
\begin{distribution}
\disteq{parameters}{a > 0}
\disteq{support}{x \in (0, \infty)}
\disteq{pdf}{\sqrt{\frac{2}{\pi}} \frac{x^2}{a^3} \exp\left(-\frac{x^2}{2a^2}\right)}
\disteq{cdf}{\erf \left(\frac{x}{\sqrt{2} a}\right) - \sqrt{\frac{2}{\pi}} \frac{x}{a} \exp\left({\frac{-x^2}{2a^2}}\right)}
\disteq{mean}{2a \frac{2}{\pi}}
% \disteq{median}{}
\disteq{variance}{\frac{a^2(3\pi-8)}{\pi}}
\end{distribution}
}
\end{bigformula}
\begin{bigformula}{gamma}
\absLabel[gamma_distribution]
\desc{Gamma Distribution}{with $\lambda$ parameter}{$\Gamma$ \fRef{math:cal:integral:list:gamma_function}, $\gamma$ \fRef{math:cal:integral:list:lower_incomplete_gamma_function}}
\desc[german]{Gamma Verteilung}{mit $\lambda$ Parameter}{}
\fsplit[\distleftwidth]{
\centering
\includegraphics{img/distribution_gamma.pdf}
}{
\begin{distribution}
\disteq{parameters}{\alpha > 0, \lambda > 0}
\disteq{support}{x\in(0,1)}
\disteq{pdf}{\frac{\lambda^\alpha}{\Gamma(\alpha) x^{\alpha-1} \e^{-\lambda x}}}
\disteq{cdf}{\frac{1}{\Gamma(\alpha) \gamma(\alpha, \lambda x)}}
\disteq{mean}{\frac{\alpha}{\lambda}}
\disteq{variance}{\frac{\alpha}{\lambda^2}}
\end{distribution}
}
\end{bigformula}
\begin{bigformula}{beta}
\absLabel[beta_distribution]
\desc{Beta Distribution}{}{$\txB$ \fRef{math:cal:integral:list:beta_function} / \fRef{math:cal:integral:list:incomplete_beta_function}}
\desc[german]{Beta Verteilung}{}{}
\fsplit[\distleftwidth]{
\centering
\includegraphics{img/distribution_beta.pdf}
}{
\begin{distribution}
\disteq{parameters}{\alpha \in \R, \beta \in \R}
\disteq{support}{x\in[0,1]}
\disteq{pdf}{\frac{x^{\alpha-1} (1-x)^{\beta-1}}{\txB(\alpha,\beta)}}
\disteq{cdf}{\frac{\txB(x;\alpha,\beta)}{\txB(\alpha,\beta)}}
\disteq{mean}{\frac{\alpha}{\alpha+\beta}}
% \disteq{median}{\frac{}{}} % pretty complicated, probably not needed
\disteq{variance}{\frac{\alpha\beta}{(\alpha+\beta)^2(\alpha+\beta+1)}}
\end{distribution}
}
\end{bigformula}
\Subsubsection{discrete}
\desc{Discrete probability distributions}{}{}
\desc[german]{Diskrete Wahrscheinlichkeitsverteilungen}{}{}
\begin{bigformula}{binomial}
\absLabel[binomial_distribution]
\desc{Binomial distribution}{}{}
\desc[german]{Binomialverteilung}{}{}
\begin{ttext}
\eng{For the number of trials going to infinity ($n\to\infty$), the binomial distribution converges to the \absRef[poisson distribution]{poisson_distribution}}
\ger{Geht die Zahl der Versuche gegen unendlich ($n\to\infty$), konvergiert die Binomualverteilung gegen die \absRef[Poissonverteilung]{poisson_distribution}}
\end{ttext}\\
\fsplit[\distleftwidth]{
\centering
\includegraphics{img/distribution_binomial.pdf}
}{
\begin{distribution}
\disteq{parameters}{n \in \Z, \quad p \in [0,1],\quad q = 1 - p}
\disteq{support}{k \in \{0,\,1,\,\dots,\,n\}}
\disteq{pmf}{\binom{n}{k} p^k q^{n-k}}
% \disteq{cdf}{\text{regularized incomplete beta function}}
\disteq{mean}{np}
\disteq{median}{\floor{np} \text{ or } \ceil{np}}
\disteq{variance}{npq = np(1-p)}
\end{distribution}
}
\end{bigformula}
\begin{bigformula}{poisson}
\absLabel[poisson_distribution]
\desc{Poisson distribution}{}{}
\desc[german]{Poissonverteilung}{}{}
\fsplit[\distleftwidth]{
\centering
\includegraphics{img/distribution_poisson.pdf}
}{
\begin{distribution}
\disteq{parameters}{\lambda \in (0,\infty)}
\disteq{support}{k \in \N}
\disteq{pmf}{\frac{\lambda^k \e^{-\lambda}}{k!}}
\disteq{cdf}{\e^{-\lambda} \sum_{j=0}^{\floor{k}} \frac{\lambda^j}{j!}}
\disteq{mean}{\lambda}
\disteq{median}{\approx\floor*{\lambda + \frac{1}{3} - \frac{1}{50\lambda}}}
\disteq{variance}{\lambda}
\end{distribution}
}
\end{bigformula}
% TEMPLATE
% \begin{distribution}{maxwell-boltzmann}
% \distdesc{Maxwell-Boltzmann distribution}{}
% \distdesc[german]{Maxwell-Boltzmann Verteilung}{}
% \disteq{parameters}{}
% \disteq{pdf}{}
% \disteq{cdf}{}
% \disteq{mean}{}
% \disteq{median}{}
% \disteq{variance}{}
% \end{distribution}
\Subsection{cls}
\desc{Central limit theorem}{}{}
\desc[german]{Zentraler Grenzwertsatz}{}{}
\begin{ttext}
\eng{
Suppose $X_1, X_2, \dots$ is a sequence of independent and identically distributed random variables with $\braket{X_i} = \mu$ and $(\Delta X_i)^2 = \sigma^2 < \infty$.
As $N$ approaches infinity, the random variables $\sqrt{N}(\bar{X}_N - \mu)$ converge to a normal distribution $\mathcal{N}(0, \sigma^2)$.
\\ That means that the variance scales with $\frac{1}{\sqrt{N}}$ and statements become accurate for large $N$.
}
\ger{
Sei $X_1, X_2, \dots$ eine Reihe unabhängiger und gleichverteilter Zufallsvariablen mit $\braket{X_i} = \mu$ und $(\Delta X_i)^2 = \sigma^2 < \infty$.
Für $N$ gegen unendlich konvergieren die Zufallsvariablen $\sqrt{N}(\bar{X}_N - \mu)$ zu einer Normalverteilung $\mathcal{N}(0, \sigma^2)$.
\\ Das bedeutet, dass die Schwankung mit $\frac{1}{\sqrt{N}}$ wächst und Aussagen für große $N$ scharf werden.
}
\end{ttext}
\Subsection{error}
\desc{Propagation of uncertainty / error}{}{}
\desc[german]{Fehlerfortpflanzung}{}{}
\begin{formula}{generalised}
\desc{Generalized error propagation}{}{$V$ \fRef{math:pt:covariance} matrix, $J$ \fRef{math:cal:jacobi-matrix}}
\desc[german]{Generalisiertes Fehlerfortpflanzungsgesetz}{$V$ \fRef{math:pt:covariance} Matrix, $J$ \fRef{cal:jacobi-matrix}}{}
\eq{V_y = J(x) \cdot V_x \cdot J^{\T} (x)}
\end{formula}
\begin{formula}{uncorrelated}
\desc{Propagation of uncorrelated errors}{Linear approximation}{}
\desc[german]{Fortpflanzung unabhängiger fehlerbehaftete Größen}{Lineare Näherung}{}
\eq{u_y = \sqrt{ \sum_{i} \left(\pdv{y}{x_i}\cdot u_i\right)^2}}
\end{formula}
\begin{formula}{weight}
\desc{Weight}{Variance is a possible choice for a weight}{$\sigma$ \fRef{math:pt:variance}}
\desc[german]{Gewicht}{Varianz ist eine mögliche Wahl für ein Gewicht}{}
\eq{w_i = \frac{1}{\sigma_i^2}}
\end{formula}
\begin{formula}{weighted-mean}
\desc{Weighted mean}{}{$w_i$ \fRef{math:pt:error:weight}}
\desc[german]{Gewichteter Mittelwert}{}{}
\eq{\overline{x} = \frac{\sum_{i} (x_i w_i)}{\sum_i w_i}}
\end{formula}
\begin{formula}{weighted-mean-error}
\desc{Variance of weighted mean}{}{$w_i$ \fRef{math:pt:error:weight}}
\desc[german]{Varianz des gewichteten Mittelwertes}{}{}
\eq{\sigma^2_{\overline{x}} = \frac{1}{\sum_i w_i}}
\end{formula}
\Subsection{mle}
\desc{Maximum likelihood estimation}{}{}
\desc[german]{Maximum likelihood Methode}{}{}
\begin{formula}{likelihood}
\desc{Likelihood function}{Likelihood of observing $x$ when parameter is $\theta$\\in general not normalized!}{$\rho$ \fRef{math:pt:pdf} $x\mapsto \rho(x|\theta)$ depending on parameter $\theta$, $\Theta$ parameter space}
\desc[german]{Likelihood Funktion}{"Plausibilität" $x$ zu messen, wenn der Parameter $\theta$ ist\\nicht normalisiert!}{$\rho$ \fRef{math:pt:pdf} $x\mapsto \rho(x|\theta)$ hängt ab von Parameter $\theta$, $\Theta$ Parameterraum}
\eq{L:\Theta \rightarrow [0,1], \quad \theta \mapsto \rho(x|\theta)}
\end{formula}
\begin{formula}{likelihood_independant}
\desc{Likelihood function}{for independent and identically distributed random variables}{$x_i$ $n$ random variables, $\rho$ \fRef{math:pt:pdf} $x\mapsto f(x|\theta)$ depending on parameter $\theta$}
\desc[german]{Likelihood function}{für unabhängig und identisch verteilte Zufallsvariablen}{$x_i$ $n$ Zufallsvariablen$\rho$ \fRef{math:pt:pdf} $x\mapsto f(x|\theta)$ hängt ab von Parameter $\theta$}
\eq{L(\theta) = \prod_{i=1}^n f(x_i;\theta)}
\end{formula}
\begin{formula}{maximum_likelihood_estimate}
\desc{Maximum likelihood estimate (MLE)}{Paramater for which outcome is most likely}{$L$ \fRef{math:pt:mle:likelihood}, $\theta$ parameter of a \fRef{math:pt:pdf}}
\desc[german]{Maximum likelihood-Schätzung (MLE)}{Paramater, für den das Ergebnis am Wahrscheinlichsten ist}{$L$ \fRef{math:pt:mle:likelihood}, $\theta$ Parameter einer \fRef{math:pt:pdf}}
\eq{\theta_\text{ML} &= \argmax_\theta L(\theta)\\ &= \argmax_\theta \log \big(L(\theta)\big)}
\end{formula}
\Subsection{bayesian}
\desc{Bayesian probability theory}{}{}
\desc[german]{Bayessche Wahrscheinlichkeitstheorie}{}{}
\begin{formula}{prior}
\desc{Prior distribution}{Expected distribution before conducting the experiment}{$\theta$ parameter}
\desc[german]{Prior Verteilung}{}{}
\eq{p(\theta)}
\end{formula}
\begin{formula}{evidence}
\desc{Evidence}{}{$p(\mathcal{D}|\theta)$ \fRef{math:pt:mle:likelihood}, $p(\theta)$ \fRef{math:pt:bayesian:prior}, $\mathcal{D}$ data set}
% \desc[german]{}{}{}
\eq{p(\mathcal{D}) = \int\d\theta \,p(\mathcal{D}|\theta)\,p(\theta)}
\end{formula}
\begin{formula}{theorem}
\desc{Bayes' theorem}{}{$p(\theta|\mathcal{D})$ posterior distribution, $p(\mathcal{D}|\theta)$ \fRef{math:pt:mle:likelihood}, $p(\theta)$ \fRef{math:pt:bayesian:prior}, $p(\mathcal{D})$ \fRef{math:pt:bayesian:evidence}, $\mathcal{D}$ data set}
\desc[german]{Satz von Bayes}{}{}
\eq{p(\theta|\mathcal{D}) = \frac{p(\mathcal{D}|\theta)\,p(\theta)}{p(\mathcal{D})}}
\end{formula}
\begin{formula}{map}
\desc{Maximum a posterior estimation (MAP)}{}{}
% \desc[german]{}{}{}
\eq{\theta_\text{MAP} = \argmax_\theta p(\theta|\mathcal{D}) = \argmax_\theta p(\mathcal{D}|\theta)\,p(\theta)}
\end{formula}