[PS] Rework parts of tests section, more changes to come

This commit is contained in:
2026-07-15 16:14:29 +02:00
parent 6a43f97126
commit e005c7608b
12 changed files with 59 additions and 26 deletions
+4
View File
@@ -84,6 +84,10 @@ git clone https://github.com/janishutz/eth-summaries
You will need to also clone the helpers to `~/projects/latex`, which you can find [here](https://git.janishutz.com/janishutz/latex).
If you want to use a different folder, simply duplicate the import line, change it and when opening a PR, simply change it back.
For some of the older summaries, you will need to check out the `v1` branch of the helpers, as they were written before the new helpers were created
and have not been updated to the new ones.
This likely includes all summaries and cheat sheets up to and including semester 3.
-------
***NOTE***: It is recommended that you fork the repo to contribute back to it. To do that, click the fork button on the repo and clone it locally using
```bash
@@ -1,18 +1,18 @@
\newpage
\subsection{Stetige Zufallsvariablen}
\shortdefinition[Stetig verteilte Z.V] $\cX$ stetig, falls $\exists f_\cX : \R \rightarrow \R_+$, s.d. V.F. $F_\cX(x) = \int_{-\8}^{x} f_\cX(t) \dx t$.
$f_\cX$ ist Dichte (pdf) von $\cX$
$f_\cX$ ist Dichte (pdf) v. $\cX$
% \shortdefinition[Stückw. st. diff. F.] TODO: Consider adding this, Slides Chapter 3, P56
\shorttheorem Sei $F_\cX$ st. stückw. diff. auf Partition $-\8 = x_0 < x_1 < \ldots < x_n = \8$.
\shorttheorem Sei $F_\cX$ st. stückw. diff. auf Partition $-\8 = x_0 < \ldots < x_n = \8$.
Dann $\cX$ stetig, mit $a_k$ beliebig und
\[
f_\cX = \begin{cases}
F_\cX'(x) & \exists k \in \{0, 1, \ldots, n - 1\} : x \in (x_k, x_{k + 1}) \\
F_\cX'(x) & \exists k \in \{0, \ldots, n - 1\} : x \in (x_k, x_{k + 1}) \\
a_k & x \in \{ x_1, \ldots, x_{n - 1} \}
\end{cases}
\]
\shorttheorem $\int_{-\8}^\8 f_\cX(x) \dx x = 1$ \hl{(nützl. f. berech. v. Param in $f$)}
\shortremark $f_\cX$ fast analog zu Gew.F $p_\cX$. Also:\\
$(\Sigma, p_\cX) \mapsto (\int, f_\cX)$ vom diskreten zu stetigen Fall
@@ -10,4 +10,4 @@
\shortremark $|\cX| = \cX_+ + \cX_-$; $\cX = \cX_+ - \cX_-$. Für $\cX \geq 0$ ist $\E[\cX]$ immer definiert.
Falls $\cX$ kein konst. Vorzeichen, $\E[\cX]$ undef.
\shortremark $\E[\cX] = \int_{0}^{\8} (1 - F_\cX(x)) \dx x - \int_{-\8}^{0} F_\cX(x)$
\shortremark $\E[\cX] = \int_{0}^{\8} (1 - F_\cX(x)) \dx x - \int_{-\8}^{0} F_\cX(x) \dx x$
@@ -5,7 +5,7 @@ $\E[\cX^2] = \sum_{x \in W} x^2 \cdot p_\cX(x)$ ($\cX$ diskret)
\shortdefinition[Standardabweichung] $\sigma(\cX) = \sqrt{\V[\cX]}$
\shortremark $\V[\cX] = \E[\cX^2] - \E[\cX]^2$
\shortremark $\V[\cX] = \E[\cX^2] - \E[\cX]^2$ ($\V[\cX] \geq 0$ ist wahr)
\shortexample $\cX$ determ. Z.V (= konst) mit Wert $a$, also $\cX = a1_\Omega$. Dann: $\E[\cX] = a \E[1_\Omega] = a \P[\Omega] = a$ und\\
$\V[\cX] = \E[\cX^2] - \E[\cX]^2 = a^2\E[1_\Omega] - a^2 = 0$
@@ -16,7 +16,8 @@
\item Wenn $\cov(\cX, \cY) < 0$, dann: $\cX$, $\cY$ \bi{negativ korreliert}
\end{itemize}
\shortexample $\cX, \cY$ unkorreliert $\centernot\implies \cX, \cY$ unabhängig
\shortexample $\cX, \cY$ unkorreliert $\centernot\implies \cX, \cY$ unabhängig\\
aber $\cX, \cY$ unabh. $\implies \cX, \cY$ unkorreliert
\shortremark Eigenschaften der Kovarianz (alle $a, \ldots \in \R$):
\begin{itemize}
@@ -1,4 +1,9 @@
\subsection{Tips \& Tricks}
\coloredbox{red}{REWRITE}{
This section is going to be completely rewritten
}
\shortremark Die \bi{Dichten} können anstelle der Variablen in bspw. der Formel für bedingte W. verwendet werden.
Zur Bestimmung von W. wie (mit $\cX, \cY \sim \cU(0, 1)$)
\[
W(t) = \P[\cX + \cY \leq t] \ \forall t \in \R
@@ -36,13 +36,14 @@ Meistens sind $\cX_k$ i.i.d. unter $\P_\vartheta$, dann $L$ produkt, also besser
When complete, there will be estimators for (pretty much) every covered distribution
}
\shortexample[How To] Finden von ML-Schätzern:
\coloredbox{gray}{How To: Finden von ML-Schätzern}{
\begin{enumerate}
\item log-LH-Funk. bestimmen ($x_i$ statt $\cX_i$ verwenden)
\item Nach $\vartheta$ ableiten (oder wodurch $\vartheta$ ersetzt wurde)
\item Nullstelle davon berechnen (für Max (via e.g. $f'' < 0$))
\item Nullstelle davon (für Max (via e.g. $f'' < 0$))
\item ML-Schätzer ist dann Nullstelle von Ableitung (mit $x_i$ wieder durch $\cX_i$ ersetzt)
\end{enumerate}
}
\shortexample[ML-Schätzer von Verteilungen]
@@ -1,16 +1,31 @@
\subsection{Beispiele}
% TODO: More on Teststatistik
\shortexample[Gauss-Test] $\cX_i$ i.i.d. $\sim \cN(\vartheta, \sigma^2)$ unter $\P_\vartheta$ mit bekanntem $\sigma^2$.
Die zu testende Hypothese ist $H_0 : \vartheta = \vartheta_0$, mögliche alternative Hypothesen $H_A$ sind
$\vartheta > \vartheta_0$, $\vartheta < \vartheta_0$ (einseitig) oder $\vartheta \neq \vartheta_0$ (zweiseitig).
Teststatistik ist immer:
\coloredbox{red}{REWRITE}{
This section is undergoing a rewrite, to be more on-point. The previous section may also see some changes as a result.
}
\coloredbox{gray}{How-To: Tests}{
Was zu tun / erwähnen ist jeweils:
\begin{enumerate}
\item Modell: Verteilung der Stichproben $\cX_k$ unter $\P_\vartheta$, mit $\vartheta =$ gesuchte Werte.
Für $\cX_k \sim \cN(\mu, \sigma^2)$, ist $\vartheta = (\mu, \sigma^2)$, wenn beide unbekannt.
\item Hypothesen: $H_0: \vartheta = \vartheta_0 =$ Vergleichswert, $H_A: \vartheta < \vartheta_0$ (oder grösser, $\neq$, etc). \hl{Umgekehrt, s. links}
\item Teststatistik: Basierend auf Verteilung von $\cX_k$ und Bekanntheit von Parametern
\item Verteilung von $T$: Oft $t_{n - 1}$, siehe \ref{sec:estimators-properties} unten
\item Verwerfungsbereich: Nach Anleitung unten
\item Wert der $T$: $T(\omega)$ berechnen, $\omega$ ist beobachteter Wert (bspw. Durchschnitt $\overline{\cX}_n$)
\item Testentscheid: Basierend auf Resultat von vorherigem und $K$ entscheiden.
\end{enumerate}
}
\bi{Verwerfungsbereich} $K_l = (c_>, \8)$ (links), $K_r = (-\8, c_<)$ (rechts), $K_b = (-\8, c_{\neq}) \cup (c_{\neq}, \8)$ (beidseitig)
\shortexample[Gauss-Test] Voraussetz.:
\bi{(1)} $\cX_i$ i.i.d. $\sim \cN(\vartheta, \sigma^2)$ unter $\P_\vartheta$
\bi{(2)} $\sigma^2$ bekannt.
\textbf{Teststatistik}:
\[
T = \frac{\overline{\cX}_n - \vartheta_0}{\frac{\sigma}{\sqrt{n}}} \sim \cN(0, 1) \qquad \text{unter } \P_{\vartheta_0}
\]
$K$: $(c_>, \8)$, bzw. $(-\8, c_<)$ für einseitig, $(-\8, -c_{\neq}) \cup$\\
$(c_{\neq}, \8)$ für zweiseitig (verwerfen $H_0$ falls $|T| > c_{\neq}$).
\bi{Bestimmung $c$s}: Mit Verteilung von $T$. Bsp: $\alpha = \P_{\vartheta_0}[T > c_>] = 1 - \Phi(c_>)$, folglich $c_> = \Phi^{-1}(1 - \alpha) =: z_{1 - \alpha}$
\bi{Bestimmung $c$s}: $z_{1 - \alpha} = \Phi^{-1}(1 - \alpha)$.\\
$c_> = z_{1 - \alpha}; c_< = -z_{1 - \alpha}; c_{\neq} = z_{1 - 0.5 \alpha}$
\shortexample[t-Test] $\cX_i$ i.i.d. $\sim \cN(\mu, \sigma^2)$ unter $\P_{\overrightarrow{\vartheta}}$
@@ -19,8 +34,9 @@ Testen wieder $H_0 : \mu = \mu_0$. Teststatistik ist hier (see \ref{sec:estimato
\[
T = \frac{\overline{X}_n - \mu_0}{\frac{S}{\sqrt{n}}} \qquad S^2 = \frac{1}{n - 1} \sum_{k = 1}^{n} (\cX_k - \overline{\cX}_n)^2
\]
$K$: $c_> = t_{n - 1, 1 - \alpha}$; $c_< = t_{n - 1, \alpha} = -c_>$; $c_{\neq} = t_{n - 1, 1 - 0.5 \alpha}$,
mit $t_{m, \gamma}$ das $\gamma$-Quantil, mit $\P[\cX \leq t_{m, \gamma}] = \gamma$ für $\cX \sim t_m$
$K$: $c_> = t_{n - 1, 1 - \alpha}$; $c_< = t_{n - 1, \alpha} = -c_>$; $c_{\neq} = t_{n - 1, 1 - 0.5 \alpha}$,\\
mit $t_{m, \gamma}$ das $\gamma$-Quantil von $t_m$-Verteilung, welches Wert ist, so dass $\P[\cX \leq t_{m, \gamma}] = \gamma$ für $\cX \sim t_m$.
Wert ist tabelliert!
\shortremark[Zweistichproben-Tests] $\cX_k$ (i.i.d.) und jeweils unabhängig von allen $\cY_l$
@@ -1,3 +1,4 @@
\newpage
\subsection{p-Wert}
Für Stichprobe $\cX_i$ ($n$ el.) testen $H_0 : \vartheta = \vartheta_0$ gegen eine $H_A : \vartheta \in \Theta_A$.
@@ -0,0 +1,4 @@
\subsection{Binomialsatz}
\[
(x + y)^n = \sum_{i = 0}^{n} {n \choose i} x^i y^{n - i} = \sum_{i = 0}^{n} {n \choose i} x^{n - i} y^i
\]
@@ -125,6 +125,7 @@
\input{parts/09_combinatorics/00_permutations.tex}
\input{parts/09_combinatorics/01_combinations.tex}
\input{parts/09_combinatorics/02_variations.tex}
\input{parts/09_combinatorics/03_binomial-theorem.tex}
% \input{parts/09_combinatorics/}