The relationship between sample variance and proportion variance? I'm trying to see the relationship between the sample variance equation 
$\sum(X_i- \bar X)^2/(n-1)$ and the variance estimate, $\bar X(1-\bar X),$ in case of binary samples. 
I wonder if the outputs are the same, or if not, what is the relationship between the two??
I'm trying to prove their relationship but it's quite challenging to me.. 
Please help!
Sigma(Xi-Xbar)/(n-1)
Xbar(1-Xbar)

\begin{align}
& \sum_{i=1}^n (x_i - \bar x)^2 \\[10pt]
= {} & \sum_{i=1}^n (x_i - 2\bar x x_i + \bar x^2) \\[10pt]
= {} & \left( \sum_{i=1}^n x_i^2 \right) - 2\bar x \left( \sum_{i=1}^n x_i \right) + \left( \sum_{i=1}^n \bar x^2 \right) \\[10pt]
= {} & \left( \sum_{i=1}^n x_i^2 \right) - 2\bar x\Big( n\bar x\Big) + n \bar x^2 \\[10pt]
= {} & \left( \sum_{i=1}^n x_i^2 \right) - n \bar x^2 \\[10pt]
= {} & \left( \sum_{i=1}^n x_i \right) - n \bar x^2 \qquad \text{since } x_i \in \{0,1\} \\[10pt]
= {} & n\bar x - n \bar x^2 = n\bar x(1-\bar x).
\end{align}
$$
\text{So } \qquad \frac 1 n \sum_{i=1}^n (x_i - \bar x)^2 = \bar x (1 - \bar x).
$$
