convergence in probability example in Casella-Berger In Casella-Berger Statistical Inference page 234 Example 5.5.8, they define a sequence of uniform random variables $X_1, X_2, \cdots, X_n, \cdots$ such that $X_i \sim U(0,1)$ and $s \in [0,1]$ and :
$X_1(s) = s + I_{[0,1]}(s)$,  $X_2(s) = s + I_{[0,\frac{1}{2}]}(s)$,  $X_3(s) = s + I_{[\frac{1}{2},1]}(s)$
$X_4(s) = s + I_{[0,\frac{1}{3}]}(s)$,  $X_5(s) = s + I_{[\frac{1}{3},\frac{2}{3}]}(s)$,  $X_6(s) = s + I_{[\frac{2}{3},1]}(s)$
and so on ...
Then $X(s) = s$
Why does $X_n \to X$ converge in probability ?
 A: They explain why in their example but you can also see that by applying the definition of convergence in probability and the fact that $S$ is uniformly distributed in $[0,1]$. Specifically, we have that
$$ \Pr\left( |X_n (s) - X(s)| <\epsilon \right) \iff  \Pr\left( S \in \left[\alpha_n, \beta_n \right] < \epsilon \right)  = \Pr \left( \beta_n - \alpha_n < \epsilon \right) \to 1$$
by construction since the interval becomes a null set in the limit. Hence we have convergence in probability. We note, however, that since the random variable will be in the intervals infinitely many times, no matter how small the intervals, there is no almost sure convergence. It is precisely this difference that their example aims to demonstrate.
A: I don't think that $X_i$ are uniformly distributed.
What they say is that the probability space is $S = [0,1]$ and is equipped with the uniform distribution, which we shall denote by $\mathbb{P}$. Thus, for any interval $[a,b]\subset [0,1]$, $\mathbb{P}([a,b]) = b-a$.
To show that $X_n$ converges to $X$ in probability, one needs to show that for any $\epsilon>0$, $\lim_{n\to\infty} \mathbb{P}(|X_n-X|\ge \epsilon) = 0$. By definition, $\mathbb{P}(|X_n-X|\ge \epsilon)  = \mathbb{P}(\{s\in [0,1]\,:\, |X_n(s)-X(s)|\ge \epsilon\})$. Now, by the definition of $X_n$, $X_n(s) = s + I_{[a_n,b_n]}(s)$ with some $0\le a_n<b_n\le 1$. In particular, $X_n(s)=X(s)$ for any $s\in [0,1]\setminus [a_n,b_n]$. Hence, for any $s\in [0,1]$, $|X_n(s)-X(s)|\ge \epsilon$ can only hold if $s\in [a_n,b_n]$ (otherwise $|X_n(s)-X(s)|=0<\epsilon$). In other words, $$\{s\in [0,1]\,:\, |X_n(s)-X(s)|\ge \epsilon \}\subset [a_n,b_n]$$ (in fact, equality also holds, but we do not need this for the proof.) It follows by the monotonicity and then the definition of $\mathbb{P}$ that $\mathbb{P}(|X_n-X|\ge \epsilon) \le \mathbb{P}([a_n,b_n]) = b_n-a_n$. From the construction of $X_n$, it is clear that $b_n-a_n\to 0$ as $n\to \infty$, finishing the proof.
