We have n-fold p-coin toss
Y is the number of ordered pairs of tosses in which both result in 1.
I need the expected value of Y where Y is a sum of indicator variables, and a proof that $ E[X(X-1)], \space X\space Bin-(n,p)-$
$ Y_i=\left\{ \begin{aligned} 1 && X_i = p\\ 0 && X_i = (1-p) \end{aligned} \right. $ Any sum of Bernoulli random variables, $S_n=\sum\limits_{i=1}^nY_i$ is a binomial random variable with parameters $n$ and $p$. In other words, for every integer $k$ such that $0\le k\le n$, $ \mathrm P(S_n=k)={n\choose k}p^k(1-p)^{n-k}. $
But how can I show that the expectation value is $E[X(X-1)]\space?$