A while back I helped a student with a probability problem, and I took the problem, generalized it a bit, and wish to post it here. Here is the problem:
A coin has the probability $p$ of turning up heads when tossed. Suppose we toss the coin $2n$ times, where $n$ is a natural number. Compute the probability that the total number of heads is even.