# Chances of getting exactly one heads in two coin flips?

I know the chances of getting exactly one "heads" in two coin flips is 50%, as there are only four possible outcomes: HH, HT, TH, TT; and only two of those four meet the restraint I've placed. To figure this out, I think you can use a binomial distribution: 2C1 times 1/2 times 1/2 gives the probability of 1 in 2 that I'm looking for.

But why doesn't the formula $$P(A \text{ or }B) = P(A) + P(B) - P(A \text{ and } B)$$ (where A and B are heads on the first and second attempts, respectively) work? I get 75% (1/2 + 1/2 -1/4) which would work if I wanted the restraint "at least one 'heads,'" or simply what are the chances of getting one "heads."

Moreover, if you were to find the chances of getting "heads," wouldn't you take 1 minus the probability of getting two "tails" (25%) to get the 75% you wanted? So when would you use P(A or B)?

• I just don't understand how you get that $P(A)+P(B)-P(A and B)$ to be equal 0,75? – kolobokish Sep 11 '16 at 17:21
• See. P(A)= 0,25 ; P(B) = 0,25: There is no chance to get them both, and P(A and B) = 0, so you get P(A or B) = 0,5. – kolobokish Sep 11 '16 at 17:23
• Oh ok -- so I though the probability of heads on first and second attempts would be 1/2 + 1/2 – David Marlowe Sep 11 '16 at 18:05
• Minus the 1/4 when you take 1/2 * 1/2 – David Marlowe Sep 11 '16 at 18:06
• The formula holds for the ordinary $\text{or}$, not for the exclusive $\text{or}$ ($\text{xor}$). $$P(A \text{ xor }B) = P(A) + P(B) - 2\cdot P(A \text{ and } B)$$ – Yves Daoust Sep 11 '16 at 18:36

The symmetric difference, of exclusive or, is the probability of getting exactly one head. What you were calculating was the union, which is the probability of at least one head.

$\newcommand{\P}{\mathbb{P}}$In mathematics, "or" means "either $A$ is true, $B$ is true, or both $A$ and $B$ are true. See this Wikipedia page which has nice diagrams: https://en.wikipedia.org/wiki/Logical_disjunction. In other words $\mathbb{P}(A\text{ or }B)= \mathbb{P}(A\text{ only})+ \P(B\text{ only})+ \P(\text{both }A\text{ and }B)$.

If I am interpreting your question correctly, $A = \{HH, HT \}$ and $B = \{ HH, TH\}$.

This means that $$A\text{ or }B = (A \text{ is true}) \lor (B \text{ is true}) = A \cup B = \{HH, HT, TH \}$$

Therefore $\P(A \text{ or }B) = \frac{3}{4}$ and the formula which you claim does not work does work. $$\P(A)=\frac{1}{2}, \quad \P(B)=\frac{1}{2}, \quad P(A \cap B)=\frac{1}{4}, \quad \frac{1}{2}+\frac{1}{2} - \frac{1}{4} = \frac{3}{4}$$

The word "or" is often used in English to mean "exclusive or" or "XOR", which means "either $A$ only, or $B$ only, but not both". This corresponds to the set operation of symmetric difference, rather than union. However, in probability, it is always union, and not symmetric difference, that is meant when the term "or" is used. This makes most mathematical expressions and statements much easier to state and formulate.

Here is a picture below of symmetric difference; contrast it with that of union you see above: This means that $$A \text{ xor }B = [(A\text{ is true})\lor(B\text{ is true})]\land ((A\text{ and }B)\text{ is not true}) \\= A \bigtriangleup B = \{HT, TH \} = A \cup B \setminus A \cap B = \{HH, HT, TH \} \setminus \{HH \}$$

• Thanks, William. To solve for exactly one instance of heads, though, would I use the distribution I used, or is there another formula? – David Marlowe Sep 11 '16 at 18:16
• @DavidMarlowe Look at the diagram; the probability of exactly one heads is the probability of at least one heads minus the probability of two heads, hence P(A or B) - P(A and B). Again, look at the diagram for exclusive or. You can also calculate this as P(any outcome)-P(two tails). Note that the area outside of the two circles is the event "two tails", so to calculate the probability the other way you proposed would be 1-"two tails"-"two heads". Again, this can be seen from the diagrams if they are interpreted correctly - let me know if you are unclear about how to interpret them. – Chill2Macht Sep 11 '16 at 18:17
• No that's perfect. Thanks. Just for clarification, the use of binomial distribution is a fine enough way of thinking about it, right? – David Marlowe Sep 11 '16 at 18:30
• Thanks again for your help! – David Marlowe Sep 11 '16 at 19:20
• @DavidMarlowe The way to thank someone on this site is to accept an answer (the check mark) and upvote it (the up arrow). You can upvote more than one answer. – Ethan Bolker Apr 6 '17 at 23:37

No. See what. You look seperatly. If you define A as "the probability that only the first toss is head" its outcome probability will be 1/4, rather than 1/2. If you want to look the way you mentioned, than we will have the following $P(A)=P(the first is head)=\frac{1}{2}$ ; $P(B)=P(the second is head)=\frac{1}{2}$ , and $P(A&B) = P(both the first and th second tosses give head) =\frac{1}{4}$ (as it is one case of four). And we will have $P(A or B) = \frac{1}{2}+\frac{1}{2} - \frac{1}{4}$. But $P(A or B) = P( either first or second (or both) toss is head)$. See however that this does not exclude the situation when both are head. More precisely "(A or B) = (A and not B) + (B and not A)".