Prove that probability generating function is continous on $[0,1]$ Problem: Let $X$ random variables. Let $g$ be the generating probability function of $X$
$$g(s) = E[s^X] = \sum_{n\ge0}s^n\mathbb{P}[X=n].$$
Show that $g(s)$ is continuous on $[0,1]$.
My attempt: Let $(s_k)$ be a sequence in $[0,1]$ such that $\lim_{k\to \infty} s_k = s$. We prove that
$$\lim_{k\to \infty} g(s_k) = g(s).$$
Indeed, we have
$$g(s_k) = \sum_{n\ge0}s_k^n\mathbb{P}[X=n].$$
Hence we have
$$\lim_{k \to \infty} g(s_k) = \lim_{k \to \infty}\sum_{n\ge0}s^n\mathbb{P}[X=n].$$
Now, if I can bring the limit into the infinite sum then the problem will be solved, but I wonder whether I can do that and if there is any condition to bring the limit into the infinite sum.
 A: Since $\sum_{n=0}^\infty \mathbb P(X=n)=1<\infty$, for $|s|<1$ we have
$$
g(s) \leqslant \sum_{n=0}^\infty s^n \leqslant 1.
$$
It follows from Abel's theorem that $g(s)$ is a power series with radius of convergence at least $1$ (and hence continuous on $[0,1)$), and moreover $\lim_{s\uparrow1}g(s)=\sum_{n=0}^\infty \mathbb P(X=n)=1$, so that $g$ is continuous on $[0,1]$.
A: Since $|s^nP(X=n)| \leq P(X=n)$ and $\sum P(X=n) = 1$, by the M-Weierstrass test the series $$\sum s^nP(X=n)$$ converges uniformly in $s\in [0, 1]$. Since uniform limit of continuous functions is continuous (here limit of polynomials), the probability generating function is continuous (in fact on the whole disk $|s|\leq 1$ in the complex plane, and analytic inside of it).
A: As pointed out in the other answer, it is possible to show continuity using knowledge on power series or using uniform convergence. Here is another argument.
Fix $s_0\in [0,1]$. For $s\in [0,1]$ and a fixed $N$,
$$
\left\lvert g\left(s_0\right)-g(s)\right\rvert\leqslant \sum_{n\geqslant 0}\left\lvert s_0^n-s^n\right\rvert\mathbb P[X=n]\leqslant 
\sum_{n=0}^N\left\lvert s_0^n-s^n\right\rvert+2\sum_{n\geqslant N+1}\mathbb P[X=n]=\sum_{n=0}^N\left\lvert s_0^n-s^n\right\rvert+2\mathbb P[X\geqslant N+1]\leqslant \lvert s_0-s\rvert\sum_{n=0}^Nn+2\mathbb P[X\geqslant N+1],
$$
where in the second inequality, we used $\mathbb P[X=n]\leqslant 1$ for the terms of index $n\leqslant N$ and $\left\lvert s_0^n-s^n\right\rvert\leqslant s_0^n+s^n\leqslant 2$ for the terms of index bigger than $N$ and in the last inequality,
$$
\left\lvert s_0^n-s^n\right\rvert=\left\lvert (s_0-s)\sum_{k=0}^{n-1}s_0^ks^{n-1-k}\right\rvert\leqslant \left\lvert s_0-s\right\rvert n
$$
Now continuity at $s_0$ follows from the following reasoning: fix a positive $\varepsilon$ and take $N$ such that $2\mathbb P[X\geqslant N+1]\lt\varepsilon/2$. Then take $\delta=\varepsilon/(N(N+1)$ in order to get $ \left\lvert g\left(s_0\right)-g(s)\right\rvert\leqslant\varepsilon$ whenever $\lvert s-s_0\rvert\leqslant \delta$.
