<s>[INST] Distribution of a binomial variable squared If I know $X$ is a binomial random variable, how can I find the distribution of $X$ squared (I know that $P(Y=y=x^2) = p(X=x)$ but does this distribution have a standard name)? In particular, how can I find its expected value?
Thanks!
EDIT:
Thank you all! (-:
 [/INST] $\begin{align}
\text{E}(X^2) & = \sum\limits_{k = 0}^n k^2P[X = k]\\
& = \sum\limits_{k = 0}^n k^2\,^nC_kp^kq^{n - k}\\
& = \sum\limits_{k = 1}^n k^2\, \dfrac{n!}{k! (n - k)!} p^kq^{n - k}\\
& = \sum\limits_{k = 1}^n k \dfrac{n!}{(k - 1)! (n - k)!} p^kq^{n - k}\\
& = \sum\limits_{k = 1}^n (k - 1 + 1) \dfrac{n!}{(k - 1)! (n - k)!} p^kq^{n - k}\\
& = \sum\limits_{k = 1}^n (k - 1) \dfrac{n!}{(k - 1)! (n - k)!} p^kq^{n - k} + \sum\limits_{k = 1}^n \dfrac{n!}{(k - 1)! (n - k)!} p^kq^{n - k}\\
& = \sum\limits_{k = 2}^n \dfrac{n!}{(k - 2)! (n - k)!} p^kq^{n - k} + \sum\limits_{k = 1}^n \dfrac{n!}{(k - 1)! (n - k)!} p^kq^{n - k}\\
& = n(n-1)p^2\sum\limits_{k = 2}^n \dfrac{(n-2)!}{(k - 2)! (n - k)!} p^{k-2}q^{(n-2) - (k-2)} +\\&  \qquad np\sum\limits_{k = 1}^n \dfrac{(n-1)!}{(k - 1)! (n - k)!} p^{k-1}q^{(n-1) - (k-1)}\\
& = n(n-1)p^2\sum\limits_{k=2}^n \, ^{n-2}C_{k-2}p^{k-2}q^{(n-2) - (k-2)} + np\sum\limits_{k = 1}^n \, ^{n-1}C_{k-1} p^{k-1}q^{(n-1) - (k-1)}\\
& = n(n - 1)p^2(p + q)^{n - 2} + np(p + q)^{n - 1}\\
& = n^2p^2 - np^2 + np\\
& = \boxed{n^2p^2 + npq}
\end{align}$
</s>