Distribution of the square deviation of binomial Suppose $X \sim \text{Bin}(n,p)$, and look at the distribution of $Y = (X - n p)^2$.


*

*Does $Y$ follow any known classical distribution / how much do we know about it ?

*Can I bound its moment generating function? I am interested in upper bounding the upper tail $\mathbf{P}(\sum Y_i > t)$ with $Y_i = (X_i - n p_i)^2$ and $X_i \sim \text{Bin}(n,p_i)$ where $\sum X_i = n$. Markov's inequality gives me $$\mathbf{P}\Big(\sum Y_i > t\Big) \leq \frac{\sum \mathbf{Var}[X_i]}{t} = \frac{\sum np_i(1-p_i)}{t},$$ but I would like to get something that is exponentially decaying.

 A: You can calculate the mean and variance of the distribution of Y for part (I).  Whether it follows any classical distribution or not I do not know.
Mean of Y 
$ \mathbb{E}[(X-np)^2]
=\mathbb{E}[X^2-2npX+n^2p^2]
\\ =\mathbb{E}[X^2]+(-2np)\mathbb{E}[X]+n^2p^2 \\ = \mathbb{E}[X^2] - 2np(np)+ n^2p^2\\ $
$\mathbb{E}[(X)^2] -(\mathbb{E}[(X)])^2 = Var(X)$
$\mathbb{E}[(X)^2]= Var(X)+(\mathbb{E}[(X)])^2$
$\mathbb{E}[(X)^2] = np(1-p) + n^2p^2$
($Var(X) = np(1-p)$)
$ \mathbb{E}[(X-np)^2]=np(1-p) + n^2p^2 - 2n^2p^2 +n^2p^2 \\= np(1-p) = \sigma_X^2$
The Variance of Y, I would like to allude to the following post and get the result of this.
$Var(Y) = \mathbb{E}[Y^2] - (\mathbb{E}[Y])^2$
$\mathbb{E}[Y^2] = n\left[p(1-p)^4 + p^4(1-p)\right] + 3n(n-1)p^2(1-p)^2$
How to calculate the $4$th central moment of binomial distribution?
Now $Var(Y) =  n\left[p(1-p)^4 + p^4(1-p)\right] + 3n(n-1)p^2(1-p)^2 - n^2p^2(1-p)^2$
If you simplify this you get
$Var(Y) = np(1-p)\left[(1+2(n-3)pq)\right] = \sigma_X^2\left[(1+2(n-3)pq)\right]$
