TITLE: Binomial distribution parity
QUESTION [5 upvotes]: Let $X \text{~} \text{Binomial}(n, p)$.
What is $\text{P}[X \mod 2 = 0]$? Is it of the form $1/2 + O(1/2^n)$?

REPLY [5 votes]: The effect of adding a Bernoulli$(p)$ on the parity applies this matrix 
$$M=\left(\begin{array}{cc} 1-p & p \\\ 
p & 1-p \end{array}\right)$$
to $(prob(even), prob(odd))$.
We can decompose the initial vector of $(1,0)$ for Binomial$(0,p)$  as the sum of the eigenvectors $(1/2,1/2)$ and $(1/2,-1/2)$ with eigenvalues $1$ and $1-2p$, respectively. So, the parity vector of Binomial$(n,p)$ is 
$(1,0)M^n = 1^n (1/2,1/2) + (1-2p)^n (1/2,-1/2)$.
$1/2 + (1-2p)^n /2$ even, $1/2 - (1-2p)^n / 2$ odd.