Measure Theory: How to compute the conditional expectation of max of dice tosses? 
Consider a dice with $f$ faces and let $(X_n)_{1 \le n \le N}$ be the outcomes of the tosses. For $1 \le n \le N$ we set $\mathcal{F}_n = \sigma(X_1,\ldots,X_n)$ and additionally $\mathcal{F}_0 = \{\emptyset, \Omega \}$. Consider the RVs $Z_0 := 0$ and $Z_n := \max_{1 \le k \le n} X_k \quad (1 \le n \le N)$.
Compute the conditional expectation $\mathbb{E}(Z_n \mid \mathcal{F}_{n-1})$ for $(1 \le n \le N)$.

I understand that intuitively $Z_n$ describes precisely the maximum number yielded by the $n$th dice toss when we know the results of the previous $n-1$ tosses. I furthermore suppose that we can model this setting as a measure space $(\Omega, \mathcal{A}, \mathbb{P})$ via $\Omega := \{1,\ldots,f\}$ and consider $X_1,\ldots,X_N$ as uniformly distributed independent canonical RVs, i.e. $X_i(\omega) := \omega$. For the $\sigma$-Algebra $\mathcal{A}$ I suppose it is best to set $\mathcal{A} = \mathcal{P}(\Omega)$. However, I do not see how to transfer my "continuous" definition (see below) of condtional expectation $\mathbb{E}(X \mid \mathcal{F})$ over to this discrete case.

Let $(\Omega, \mathcal{A}, \mathbb{P})$ be a probability space and let $X$ be a real RV with $E(\lvert X \rvert) < \infty$. $\mathbb{E}(X \mid \mathcal{F})$ is uniquely defined as a RV via the conditions

*

*$\mathbb{E}(X \mid \mathcal{F})$ is $\mathcal{F}$ measurable,


*$\mathbb{E}(X \mid \mathcal{F}) \in L^1(\mathbb{P})$


*$\int_A \mathbb{E}(X \mid \mathcal{F}) d \mathbb{P} = \int_A X d \mathbb{P}$ for all $A \in \mathcal{F}$.

Could you please help me?
 A: $$Z_n = \max(\underbrace{\max_{k \leq n-1} X_{k}}_{Z_{n-1}}, X_n)$$
$Z_{n-1}$ is $\mathcal{F}_{n-1}$-measurable and $X_n$ and $\mathcal{F}_{n-1}$ are independent. So in
$$E[Z_n\vert \mathcal{F}_{n-1}] = E[\max(Z_{n-1}, X_n)\vert \mathcal{F}_{n-1}]$$
we can treat $Z_{n-1}$ as a constant and integrate out $X_n$ using its unconditional distribution.
$$E[\max(Z_{n-1}, X_n)\vert \mathcal{F}_{n-1}] = \frac{1}{f}\sum_{i=1}^f\max(Z_{n-1},i)$$
A: Intuitive explanation
The quantity $E[Z_n\mid \mathcal{F}_{n-1}]$ answers the question, "Given the results of the first $n-1$ die rolls, what is the expected value of the maximum of the first $n$ rolls?" It should be further clear that the only relevant information from the first $n-1$ rolls we need is the previous maximum, $Z_{n-1}$.
There are two things that can occur. If $X_n\le Z_{n-1}$, then the maximum is unchanged, i.e. $Z_n=Z_{n-1}$. Otherwise, $X_n>Z_{n-1}$. Conditional on $X_n>Z_{n-1}$, the variable $X_n$ is uniformly distributed over the interval $\{Z_{n-1}+1,Z_{n-1}+2,\dots,f\}.$ The expectation of such a uniform variable is
$$
\frac{(Z_{n-1}+1)+f}{2}
$$
Therefore,
\begin{align}\newcommand{\F}{\mathcal F}
E[Z_n\mid \F_{n-1}]=
\underbrace{\frac{Z_{n-1}}{f}}_
{\substack{\text{Probability }} \\ \text{that $X_{n}\le Z_{n-1}$}}
\cdot Z_{n-1}+
\underbrace{\left(1-\frac{Z_{n-1}}{f}\right)}_{\substack{\text{Probability }} \\ \text{that $X_{n}> Z_{n-1}$}}
\frac{(Z_{n-1}+1)+f}{2}
\end{align}
