- I'm pretty sure that
$X^n$ is the vector$(X_1,...,X_n)$ . - For the small
$p$ of a RV, the reasoning is the following. Take a RV$X$ with range$\mathcal{X}:={x_1,...,x_n}$ . Recall that X is a function from$\Omega$ to$\mathcal X$ . For any$x_i$ , define$p_X(x_i) := P[X=x_i]$ . So, you basically have a function$p_X \colon \mathcal{X} \to \mathbb{R}$ ,$x \mapsto P[X=x]$ . Now, of course you can apply functions to random variables and get another RV. For example$\sqrt{X}$ . In this case, we are applying the function$p_X$ to$X$ itself (in the text the small index "$_X$" is omitted). So basically$p_X(X)$ is the random variable$\Omega \to \mathbb{R}$ ,$\omega \mapsto p_X(X(\omega)) = P[X=X(\omega)]$ .
Anyway, you don't need all this theoretical stuff to solve the exercise, because you actually use only the expected value. You can find a solution of the problem here: www.maths.tcd.ie/~houghton/MA3466/PS-09-10/soln6.q1-3.ps