# Probability that a coin lands on tails an odd number of times when it is tossed $100$ times

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.

3. tail occurs odd times

4. 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!

-
This isn't a correct solution as can be verified for a smaller number of flips, say 4. P(odd number of heads) is 1/2. Part of the problem is that these are not 'mutually exclusive' events. – James Auld Apr 22 '12 at 15:05
To see why your analysis is wrong, consider this analysis: you and I play a game where we flip a coin, and if it is heads I win. There are four possibilities: 1) it comes up heads and I win, 2) it comes up tails and you win, 3) it comes up tails and I lose, and 4) it comes up heads and you lose. Each is equally likely, therefore the probability that the coin comes up heads and I win is... 25%? Your analysis is correct right up to the conclusion; you should say that the probability of all these things is equal; they are all equal to 50%. – Eric Lippert Apr 22 '12 at 15:40
isn't 2 and 4 the same, because there are only two options, either Head or Tails, thus if one is even, then the other is even. – yiyi Apr 22 '12 at 16:21

There are only two possible outcomes: Either both heads and tails come out an even number of times, or they both come out an odd number of times. This is so because if heads came up $x$ times and tails came up $y$ times then $x+y=100$, and the even number 100 can't be the sum of an even and an odd number.

A good way to solve this problem is to notice that if we have a sequence of 100 coin tosses in which tails came up an odd number of times, than by flipping the result of the first toss you get a sequence where tails came up an even number of times (and no matter what came up in the first toss!). Hence you have a bijection between the set of sequences where tails occurs an odd number of times, and the set of sequences where tails occurs an even number of times.

-

Suppose you flipped heads an even number of times on the first 99 flips. Then there is a $\frac{1}{2}$ probability that you will get another heads, and thus and odd number of heads total. So in this case it's 50-50.

Suppose you flipped heads an odd number of times on the first 99 flips. Then there is a $\frac{1}{2}$ probability that you will get another heads, and thus and even number of heads total. So in this situation it's also 50-50.

So regardless of what happens for the first 99 flips, there's a $\frac{1}{2}$ change you end up with an odd number of heads and a $\frac{1}{2}$ chance you end up with an even number of heads.

-
Analysis very clear, intuitive but very close to fully formal. – André Nicolas Apr 22 '12 at 15:30

Assuming the coin is fair, we know that all strings of coin flips are equally likely. Exactly half of them have an even number of tails, and half of them have an odd number of tails. It follows that the probability that tails occurs is one half.

-
+1 best answer. Please relocate green checkmark here. No deeper analysis is required here than this. No binomial probabilities, divisions into cases, induction, etc. – Kaz Apr 22 '12 at 18:41
@Kaz I'm inclined to agree with you. If it were my decision, I'd mark this the best answer, and if not this, then the next most straightforward and accurate math.stackexchange.com/a/135337/9260 There isn't any reason for a complicated answer, nor is the questioner asking for such. – Ellie Kesselman Apr 22 '12 at 23:08
How do you know that exactly half of all strings of coin flips have an even number of tails? – Bennett McElwee Apr 23 '12 at 10:37
@Kaz: How do we know that (1) all strings of coin flips are equally likely, (2) exactly half of them have an even number of tails ? Neither of those assertions seem self-evident to me. How would you prove those assertions? – Eric Lippert Apr 23 '12 at 20:21
There is no limit to what may be required, but each step brings us farther away from the original question. (Do we need to go as far back as to work out the natural numbers from basic axioms?) The nature of the problem requires this kind of knowledge as a basic background, such as all strings of k random bits are equally likely. – Kaz Apr 23 '12 at 21:09

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.

-