TITLE: Probability that a coin lands on tails an odd number of times when it is tossed $100$ times
QUESTION [7 upvotes]: A coin is tossed 100 times , Find the probability that tail occurs odd number of times!

I do not know the answer, but I tried this, that there are these $4$ possible outcomes in which tossing of a coin $100$ times can unfold. 

head occurs odd times
head occurs even times
tail occurs odd times
tail occurs even times

Getting a head is equally likely as getting a tail, similarly for odd times and even times.
Thus, all of these events must have same the probability, i.e. $\dfrac{1}{4}$.
Is this the correct answer? Is there an alternate way of solving this problem? Lets hear it!

REPLY [5 votes]: In general, if $X$ is a random variable with $X \sim \operatorname{Bin}(n, p)$, then the probability that $X$ is odd is
$$\frac{1-(1-2p)^n}{2}$$
To see this, calculate first the probability that $X$ is even by using the binomial formula on $(p + (-q))^n + (p + q)^n$, where $q = 1-p$. In your question $n = 100$ and $p = \frac{1}{2}$, and so the probability that we get an odd number of tails is $\frac{1}{2}$.
Notice that when $p = \frac{1}{2}$, the probability is the same no matter what $n$ is. As Brett mentions in his answer, you can also see this from the fact that the parity of the number of tails is determined by the last toss.