From 25e25a366f87017a40e41adfc996b1d863153071 Mon Sep 17 00:00:00 2001 From: Andreas Tsouchlos Date: Fri, 16 Jan 2026 02:32:40 +0100 Subject: [PATCH] Finish explanation slides --- src/2026-01-16/presentation.tex | 363 ++++++++++++++++++++++++++------ 1 file changed, 304 insertions(+), 59 deletions(-) diff --git a/src/2026-01-16/presentation.tex b/src/2026-01-16/presentation.tex index bc6b3ec..af7ff08 100644 --- a/src/2026-01-16/presentation.tex +++ b/src/2026-01-16/presentation.tex @@ -46,6 +46,7 @@ \usepackage{amsmath} \usepackage{graphicx} \usepackage{calc} +\usepackage{amssymb} \title{WT Tutorium 5} \author[Tsouchlos]{Andreas Tsouchlos} @@ -98,18 +99,17 @@ \subsection{Theorie Wiederholung} \begin{frame} - \frametitle{Unabhängige Zufallsvariablen} + \frametitle{Summen Unabhängiger Zufallsvariablen} - \begin{itemize} - \item Korrelation $\ne$ Unabhängigkeit (außer bei Normalverteilung) - \item Faltungssatz - \item Charakteristische Funktion für Summen - \end{itemize} - - \begin{itemize} - \item Unabhängigkeit hat nichts mit den Einzelverteilungen zu - tun, sie ist ``eine Ebene höher'' - \end{itemize} + \begin{gather*} + Z = X + Y, \hspace{10mm}X,Y \text{ unabhängig} \\[4mm] + \begin{array}{rl} + \text{Faltungssatz (diskret): } & P_Z(n) = + \nsum_{k=0}^{n} P_X(k)P_Y(n-k) \\[2mm] + \text{Charakteristische Funktion: } & \phi_Z(s) = \phi_X(s) + \cdot \phi_Y(s) + \end{array} + \end{gather*} \end{frame} \begin{frame} @@ -133,6 +133,7 @@ \end{itemize} \end{itemize} + \pause \begin{gather*} X \sim \text{Poisson}(\lambda) \end{gather*} @@ -151,6 +152,8 @@ \begin{frame} \frametitle{Zusammenfassung} + \vspace*{-20mm} + \begin{columns}[t] \column{\kitthreecolumns} \begin{greenblock}{Poisson-Verteilung} @@ -289,12 +292,60 @@ \subsection{Theorie Wiederholung} \begin{frame} - \frametitle{Korrelationskoeffizient} + \frametitle{Unabhängigkeit \& Korrelation} + + \vspace*{-10mm} \begin{itemize} - \item Korrelation + \item Unabhängige ZV (stetig) + \begin{columns} + \column{\kitthreecolumns} + \begin{align*} + X,Y \text{ unabhängig} + \hspace{5mm} \Leftrightarrow \hspace{5mm} + f_{X,Y}(x,y) = f_X(x)f_Y(y) + \end{align*} + \column{\kitthreecolumns} + \begin{lightgrayhighlightbox} + Erinnerung: Unabhängige Ereignisse + \begin{align*} + X,Y \text{ \normalfont unabhängig} + \hspace{5mm} \Leftrightarrow \hspace{5mm} + P(AB) = P(A)P(B) + \end{align*} + \vspace*{-13mm} + \end{lightgrayhighlightbox} + \end{columns} + \pause \item Kovarianz + \begin{columns} + \column{\kitthreecolumns} + \begin{align*} + \text{cov}(X,Y) &= E\bigg( \big(X - E(X)\big) \big(Y + - E(Y)\big) \bigg) \\ + &= E(XY) - E(X)E(Y) + \end{align*} + \column{\kitthreecolumns} + \begin{lightgrayhighlightbox} + Erinnerung: Varianz + \begin{align*} + V(X) = E\big( \left(X - E(X)\right)^2 \big) = E(X^2) - E^2(X) + \end{align*} + \vspace*{-13mm} + \end{lightgrayhighlightbox} + \end{columns} + \item Korrelation + \begin{align*} + E(XY) + \end{align*} + \pause \item Korrelationskoeffizient + \begin{align*} + \rho_{XY} = \frac{\text{cov}(X,Y)}{\sqrt{V(X)V(Y)}} + \hspace{25mm} \rho_{XY} = 0 + \hspace{2mm}\Leftrightarrow\hspace{2mm} + E(XY) = E(X)E(Y) + \end{align*} \end{itemize} \end{frame} @@ -405,10 +456,204 @@ \end{columns} \end{frame} +\begin{frame} + \frametitle{Unabhängigkeit vs. Korrelation} + + \vspace*{-15mm} + + \begin{itemize} + \item Korrelation misst einen linearen Zusammenhang zwischen zwei ZV.\\ + Unabhängigkeit gibt an ob zwei ZV ``überhaupt zusammenhängen'' + \begin{align*} + \hspace{5mm} X,Y \text{ unabhängig} + \hspace{5mm}\Rightarrow\hspace{5mm} + X,Y \text{ unkorreliert} + \end{align*} + \item Bei gemeinsam normalverteilten ZV gilt zusätzlich + \begin{align*} + \hspace{5mm} X,Y \text{ unkorreliert} + \hspace{5mm}\Rightarrow\hspace{5mm} + X,Y \text{ unabhängig} + \end{align*} + \vspace*{5mm} + \pause + \item Korrelation und Unabhängigkeit haben nichts mit den + Einzelverteilungen zu tun. Sie sind ``eine Ebene höher'' + \begin{figure}[H] + \centering + + \begin{subfigure}{0.32\textwidth} + \begin{tikzpicture}[ + /pgfplots/scale only axis, + /pgfplots/width=3.5cm, + /pgfplots/height=3.5cm + ] + + \begin{axis}[ + name=main axis, + view={0}{90}, + ticks=none, + xlabel={$x$},ylabel={$y$}, + ] + \addplot3[ + surf, shader=interp, + samples=40, + domain=-3:3, y domain=-3:3 + ] + {1/(2*pi*sqrt(0.5)) * exp(-1/(2*(1 - + sqrt(0.5))) * (x^2 -2*sqrt(0.5)*x*y + y^2) )}; + \end{axis} + + \node[below] at + ($(main axis.south west) + (-.5, -.5)$) + {$f_{X,Y}(x,y)$}; + + \begin{axis}[ + anchor=south west, + at=(main axis.north west), + height=2cm, + ticks=none, + ylabel={$f_X(x)$}, + samples=50, + domain=-3:3, + xmin=-3,xmax=3, + ] + \addplot[line width=1pt] {1/sqrt(2*pi) * + exp(-x^2/2)}; + \end{axis} + + \begin{axis}[ + anchor=north west, + at=(main axis.north east), + width=2cm, + ticks=none, + xlabel={$f_Y(y)$}, + samples=50, + domain=-3:3, + ymin=-3,ymax=3, + ] + \addplot[line width=1pt] ( {1/sqrt(2*pi) + * exp(-x^2/2)}, {x} ); + \end{axis} + \end{tikzpicture} + \end{subfigure}% + \begin{subfigure}{0.32\textwidth} + \begin{tikzpicture}[ + /pgfplots/scale only axis, + /pgfplots/width=3.5cm, + /pgfplots/height=3.5cm + ] + + \begin{axis}[ + name=main axis, + view={0}{90}, + ticks=none, + xlabel={$x$},ylabel={$y$}, + ] + \addplot3[ + surf, shader=interp, + samples=40, + domain=-3:3, y domain=-3:3 + ] + {1/(2*pi) * exp(-1/2 * (x^2 + y^2) )}; + \end{axis} + + \node[below] at + ($(main axis.south west) + (-.5, -.5)$) + {$f_{X,Y}(x,y)$}; + + \begin{axis}[ + anchor=south west, + at=(main axis.north west), + height=2cm, + ticks=none, + ylabel={$f_X(x)$}, + samples=50, + domain=-3:3, + xmin=-3,xmax=3, + ] + \addplot[line width=1pt] {1/sqrt(2*pi) * + exp(-x^2/2)}; + \end{axis} + + \begin{axis}[ + anchor=north west, + at=(main axis.north east), + width=2cm, + ticks=none, + xlabel={$f_Y(y)$}, + samples=50, + domain=-3:3, + ymin=-3,ymax=3, + ] + \addplot[line width=1pt] ( {1/sqrt(2*pi) + * exp(-x^2/2)}, {x} ); + \end{axis} + \end{tikzpicture} + \end{subfigure}% + \begin{subfigure}{0.32\textwidth} + \begin{tikzpicture}[ + /pgfplots/scale only axis, + /pgfplots/width=3.5cm, + /pgfplots/height=3.5cm + ] + + \begin{axis}[ + name=main axis, + view={0}{90}, + ticks=none, + xlabel={$x$},ylabel={$y$}, + ] + \addplot3[ + surf, shader=interp, + samples=40, + domain=-3:3, y domain=-3:3 + ] + {1/(2*pi*sqrt(0.5)) * exp(-1/(2*(1 - + sqrt(0.5))) * (x^2 +2*sqrt(0.5)*x*y + y^2) )}; + \end{axis} + + \node[below] at + ($(main axis.south west) + (-.5, -.5)$) + {$f_{X,Y}(x,y)$}; + + \begin{axis}[ + anchor=south west, + at=(main axis.north west), + height=2cm, + ticks=none, + ylabel={$f_X(x)$}, + samples=50, + domain=-3:3, + xmin=-3,xmax=3, + ] + \addplot[line width=1pt] {1/sqrt(2*pi) * + exp(-x^2/2)}; + \end{axis} + + \begin{axis}[ + anchor=north west, + at=(main axis.north east), + width=2cm, + ticks=none, + xlabel={$f_Y(y)$}, + samples=50, + domain=-3:3, + ymin=-3,ymax=3, + ] + \addplot[line width=1pt] ( {1/sqrt(2*pi) + * exp(-x^2/2)}, {x} ); + \end{axis} + \end{tikzpicture} + \end{subfigure} + \end{figure} + \end{itemize} +\end{frame} + \begin{frame} \frametitle{Zusammenfassung} - \vspace*{-10mm} + \vspace*{-20mm} \begin{columns}[t] \column{\kittwocolumns} @@ -421,7 +666,7 @@ \begin{greenblock}{Kovarianz} \vspace*{-6mm} \begin{gather*} - \text{cov}(X,Y) = E(X\cdot Y) - E(X)E(Y) + \text{cov}(X,Y) = E(X Y) - E(X)E(Y) \end{gather*} \end{greenblock} \begin{greenblock}{Randdichte} @@ -595,50 +840,50 @@ \begin{figure}[H] \centering - % \begin{tikzpicture} - % \begin{axis}[ - % view={20}{30}, - % xlabel=$x$, ylabel=$y$, zlabel={$f_{X,Y}(x,y)$}, - % xmin=0, xmax=1, ymin=0, ymax=1, zmin=0, zmax=2, - % xtick={0,0.5,1},ytick={0,0.5,1},ztick={0,1,2}, - % point meta min=0, point meta max=2, - % declare function={cutoff(\x) = 0.3/\x;}, - % legend, - % ] - % \addplot3[ - % surf, shader=interp, - % samples=40, - % domain=0:1, y domain=0:1 - % ] ( - % x, - % {y * min(1, cutoff(x))}, - % {x + (y * min(1, cutoff(x)))} - % ); - % \addlegendentry{$x\cdot y \le z$} - % - % \addplot3[ - % surf, shader=interp, - % samples=40, - % domain=0.3:1, y domain=0:1, - % fill=gray, - % draw=none, - % point meta=1.1, - % colormap name=cividis, - % ] ( - % x, - % {cutoff(x) + y*(1 - cutoff(x))}, - % {x + (cutoff(x) + y*(1 - cutoff(x)))} - % ); - % - % \addplot3[ - % mesh, - % samples=15, - % domain=0:1, y domain=0:1, - % draw=black, - % opacity=0.3 - % ] {x + y}; - % \end{axis} - % \end{tikzpicture} + \begin{tikzpicture} + \begin{axis}[ + view={20}{30}, + xlabel=$x$, ylabel=$y$, zlabel={$f_{X,Y}(x,y)$}, + xmin=0, xmax=1, ymin=0, ymax=1, zmin=0, zmax=2, + xtick={0,0.5,1},ytick={0,0.5,1},ztick={0,1,2}, + point meta min=0, point meta max=2, + declare function={cutoff(\x) = 0.3/\x;}, + legend, + ] + \addplot3[ + surf, shader=interp, + samples=40, + domain=0:1, y domain=0:1 + ] ( + x, + {y * min(1, cutoff(x))}, + {x + (y * min(1, cutoff(x)))} + ); + \addlegendentry{$x\cdot y \le z$} + + \addplot3[ + surf, shader=interp, + samples=40, + domain=0.3:1, y domain=0:1, + fill=gray, + draw=none, + point meta=1.1, + colormap name=cividis, + ] ( + x, + {cutoff(x) + y*(1 - cutoff(x))}, + {x + (cutoff(x) + y*(1 - cutoff(x)))} + ); + + \addplot3[ + mesh, + samples=15, + domain=0:1, y domain=0:1, + draw=black, + opacity=0.3 + ] {x + y}; + \end{axis} + \end{tikzpicture} \end{figure} \end{minipage}% \begin{minipage}{0.58\textwidth}