Let $X$ be a random variable with PMF $P(X=j)=p_j$. Set $$P(X>j)=q_j= p_{j+1} + p_{j+2}+ \cdots $$ Then the series for $Q(s)$ converges in $|s| < 1$. Show that $$Q(s) = \frac{1-P(s)}{1-s}$$ for $|s|<1$, where $P(s)$ is the probability generating function. Find the mean and variance of $X$.
My attempt: i have been able to show that $Q(s) = \sum_{k=0}^{\infty} \sum_{j=k}^{\infty} p_js^j - P(s)$
I don't know how to proceed after this
We have $$ Q(s) = \sum_{j=0}q_js^j=\sum_{j=1}^\infty p_j\sum_{k=j}^\infty s^k = \frac1{1-s} \sum_{j=1}^\infty p_js^j, $$ and as $s^0=1$ it follows that $Q(s)=\frac{1-P(s)}{1-s}$.
It is well-known that $\mathbb E[X] = \lim_{s\uparrow1}Q(s)$. I'm not sure how you would derive $\mathsf{Var}(X)$ from $Q(s)$ directly but if you were able to express $\mathbb E[X(X-1)]$ in terms of $Q(s)$ then one could simply subtract $E[X]$ and add $\mathbb E[X]^2$.