Latex-Beamer: overprint-environment wobbles
Not very elegant perhaps, but you could simply add some negative vspace
before the align*
.
\documentclass[xcolor=dvipsnames]{beamer}
\mode<presentation>
\usetheme{Boadilla}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage{amsfonts,amsmath,amssymb,amsthm}
\DeclareMathOperator{\Var}{Var}
\DeclareMathOperator{\E}{\mathbb E}
\title{Dummy-Titel}
\subtitle{Dummy-Untertitel}
\author{Autor}
\date{\today}
\begin{document}
\begin{frame}{Erwartungswert}
\begin{itemize}
\item $\E(X_{t+1} | X_t = i) = \sum_{j=0}^{2N} j \cdot P(X_{t+1}=j | X_t = i)$
\item $X_{t+1}$ binomialverteilt mit Parametern $n=2N$ und $p=\frac{i}{2N}$:
$\Rightarrow \E(X_{t+1} | X_t=i) = n \cdot p = i$
\item Martingal-Eigenschaft: $\E(X_{t+1} | X_t) = X_t$
\end{itemize}
\begin{overprint}
\onslide<1>
\vspace{-.5cm}
\begin{align*}
\E(X_t) &= \E(\E(X_{t+1} | X_t)) = \sum_{i=0}^{2N} E(X_{t+1} | X_t = i) \cdot P(X_t = i) \\
&= \sum_{i=0}^{2N} \left( \sum_{j=0}^{2N} j \cdot P(X_{t+1}=j | X_t = i) \right) \cdot P(X_t = i) \\
&= \sum_{j=0}^{2N} j \cdot \left( \sum_{i=0}^{2N} \cdot P(X_{t+1}=j , X_t = i) \right) \\
&= \sum_{j=0}^{2N} j \cdot P(X_{t+1}=j) = \E(X_{t+1})
\end{align*}
\onslide<2>
\begin{equation*}
\Rightarrow \E(X_0) = \E(X_1) = \E(X_2) = \ldots
\end{equation*}
\end{overprint}
\end{frame}
\end{document}
Here is another alternative that provide no "wobble" in the transition from one slide to the next.
Instead of using the overprint
environment, individual elements are made visible/not by using a combination of \only
and \visible
overlay specifications. For optimal vertical alignment between the two slides, \vphantom
supplied the appropriate vertical spacing in the first line of align*
(due to the summation).
\documentclass[xcolor=dvipsnames]{beamer}
\mode<presentation>
\usetheme{Boadilla}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage{lmodern,amsfonts,amsmath,amssymb,amsthm}
\DeclareMathOperator{\Var}{Var}
\DeclareMathOperator{\E}{\mathbb E}
\title{Dummy-Titel}
\subtitle{Dummy-Untertitel}
\author{Autor}
\date{\today}
\begin{document}
\begin{frame}{Erwartungswert}
\begin{itemize}
\item $\E(X_{t+1} | X_t = i) = \sum_{j=0}^{2N} j \cdot P(X_{t+1}=j | X_t = i)$
\item $X_{t+1}$ binomialverteilt mit Parametern $n=2N$ und $p=\frac{i}{2N}$:
$\Rightarrow \E(X_{t+1} | X_t=i) = n \cdot p = i$
\item Martingal-Eigenschaft: $\E(X_{t+1} | X_t) = X_t$
\end{itemize}%
\begin{align*}
\visible<1>{\E(X_t)}
&\only<1>{= \E(\E(X_{t+1} | X_t)) = \sum_{i=0}^{2N} E(X_{t+1} | X_t = i) \cdot P(X_t = i)}%
\only<2>{\Rightarrow \E(X_0) = \E(X_1) = \E(X_2) = \cdots \vphantom{\sum_{i=0}^{2N}}} \\
&\visible<1>{= \sum_{i=0}^{2N} \left( \sum_{j=0}^{2N} j \cdot P(X_{t+1}=j | X_t = i) \right) \cdot P(X_t = i)} \\
&\visible<1>{= \sum_{j=0}^{2N} j \cdot \left( \sum_{i=0}^{2N} \cdot P(X_{t+1}=j , X_t = i) \right)} \\
&\visible<1>{= \sum_{j=0}^{2N} j \cdot P(X_{t+1}=j) = \E(X_{t+1})}
\end{align*}
\end{frame}
\end{document}
The overprint
environment itself may have left some gap in addition to what the align*
environment would have left above it, causing your items to be shifted down so low. Additionally, the lmodern
fonts supported some fonts that were missing from your original MWE.