Find the probability that an even number of $A_{i}$ occur If $A_{1}$,...,$A_{m}$ are independent events and P($A_{i}$)=p, where (P=probability measure) for i=1,2,...,m find the probability that an even number of $A_{i}$ occur
I dont know how to start on this one, could you guys give me a hint v help me out? Thanks in advance
 A: Let $N$ be the number of events that occur i.e. $N=\sum_{k=1}^m I(A_k)$ where $I$ is the indicator function. Since the $A_k$ are independent it follows that $N$ is binomially distributed with $m$  trials and probability of success $p$. It follows that
$$
P(N=j)=\binom{m}{j}p^j(1-p)^{m-j}
$$
We want to compute $\sum_{j=0, \text{even}}^m P(N=j)$. To this end make use of the probability generating function
$$
G_N(t)=Et^N=\sum_{j=0}^m t^jP(N=j)=(1-p+pt)^m
$$
and observe that
$$
\sum_{j=0, \text{even}}^m P(N=j)=\frac{G_N(1)+G_{N}(-1)}{2}=\frac{1+(1-2p)^m}{2}
$$
A: Hint: Work inductively. If an even number of events occur, then either $A_m$ occurs and an odd number of the events $A_1,\dots,A_{m-1}$ occur, or $A_m$ does not occur and an even number of the events $A_1,\dots,A_{m-1}$ occur.
Alternatively: let $q = 1-p$. If you're already familiar with the binomial distribution, then in the case where $m$ is odd you can write your probability as
$$
\binom m0 p^0q^{m} + \binom m2 p^2q^{m-2} + \cdots + \binom m{m-1} p^{m-1}q^1 = \\
\binom m0 \frac{1 + (-1)^0}{2} p^0q^{m} + \binom m1 \frac{1 + (-1)^1}{2} p^1 q^{m-1} + \cdots + \binom mm \frac{1 + (-1)^m}{2}p^m q^0 = \\
\frac 12 \sum_{k=0}^m \binom mk p^kq^{m-k} + \frac 12 \sum_{k=0}^m \binom mk (-p)^kq^{m-k}.
$$
From there, apply the binomial theorem. The case where $m$ is even can be handled similarly.
