Why is P(non-A) 3 / 4?

I have a question about contents of this mission(https://app.dataquest.io/m/379/solving-complex-probability-problems/3/example-walk-through)
In the contents, it says that P(non-A) is 3 / 4 because P(non-A) means that a coin flipped twice lands heads up at least once; P(A) is probability that it takes three flips or more for a coin to land heads up.
So, the sample space is {[HH], [HT],[TH],[TT]}. (H is Head and T is tail). So, the P(non-A) is 3/4.

However,I thought that P(non-A) was that it takes less than 3 flips to get first Head. This is because, I think that the random experiment is filliping a coin until you get a first Head.
So, the sample space is {[TH] ,[TT],[H]}. So, the P(non-A) is 2/3

Could somebody explain where I make mistakes ?

I appreciate your time for this.

Hi @tokeihananda

When you say first Head do you mean in sequence, it should be first Head? If that’s the case then that is different from the example given.

The non-A is not the event of getting Heads on the first flip. It’s getting at least one Head in one of the flips before the 3rd one.

So when we have two flips, the total possible outcomes are [HH, HT, TH, TT]. The total no. of times we get at least one Heads is 3 (regardless of it’s sequence because then the question arises for HH!).

then P(getting at least one Heads in two flips) = 3/4
And P(getting heads at 3rd Flip) = 1 - 3/4

The only scenario when we have to flip the coin a 3rd time to get heads is when we get [TT] combination ie. first flip ends in Tails, the second flip also ends in Tails.

Similarly, if say the probability of getting a Heads after min. 4 flips, the non-A event becomes that we get Heads at least once in the previous 3 flips.

Now the sample space is something like - [HHH, HHT, HTH, HTT, THH, THT, TTH, TTT]. (total = 8). Possible favorable outcomes = 7.
So P(non-A) = 7/8 Then P(A) = ?

I hope it helps you. In case you are more confused than before, please do reply. The community will jump in to help you!


Thank you so much for your kind reply!!!
I have one thing that I would like to make sure. So, Flipping a coin do not stop if you get a Head, don’t it? ; an outcome like [TTTHHTT…] can happen, can’t it ?

I guess that I completely misunderstood the problem…

hi @tokeihananda

Well, we can stop when we get Heads. For this scenario, we are assuming that we will continue flipping until we get Heads based on the assumption that we are somehow continuously getting Tails.

That’s how we reach the question - probability of getting Heads after a minimum of these many numbers of flips.

We are breaking this as [TTTH] We got the Heads at the fourth flip and the first three were tails.

For Heads at 9th flip, outcomes would be like [ TTTTTTTTH ]. So P(A) would be getting Heads after 9 or more flips and the P(non-A) would be getting heads in any of the prior 8 flips.

Thank you so much for your reply, Rucha.
okay…If we stop when we get a head, why do we have an outcome of [HH] in outcomes of P(non-A)?
I thought that since we don’t stop flipping when we get a head, we can differentiate [HT] from [HH]. For instance, [HTTTT] and [HHTTT] are different even though the number of flips to take a head is same.
I apologize for my lack of understanding…

Hi @tokeihananda

It appears even I have misunderstood and mixed up here. Sincere apologies to confuse you more. :frowning: Stats and Probs are seriously the cruces of Data Science. My first mix up was the first heads part.

Yup, the first Heads implies the first time we get heads. Then the question that is asked is - Probability of getting Heads after 3 or more flips (and not before!). The answer to this question comprises two steps in sequence. So let’s try this again.

IF event A is getting Heads after 3 or more flips: Then, sample space for Event A = {3, 4, 5, …} where each number represents the flip count. 3 = 3rd flip, 4 = 4th flip and so on.
Basically, if I don’t get Heads on 3rd flip I flip a 4th time if still no Heads I flip a 5th time and so on. As per the mission example, let’s say we get Heads on the 3rd flip.
This is the first time I am getting Heads (and since I have got heads I can say I stop flipping the coin now.)

Then what can be the complement of event A? The sample space for Event A' = {1, 2}.

According to the example here, the opposite of getting Heads only at the third flip (Event A) means, I get at least one heads in the previous two flips to achieve Event A'.

To achieve Event A’ we would need to know all favorable outcomes of gettings Heads when we flip the coin twice. I guess this is where it’s more confusing because then {HH} represents a scenario that we continue to flip even after getting Heads on the first flip.

But that’s the point of including it in our complement Event. Since it includes every possible outcome that is not the desired Event.
Now the favourable outcomes are {HH, HT, TH} out of sample space {HH, HT, TH, TT} when we flip a coin twice.

Thank you so much for your detailed explanation!!! This helps me a lot!!!
and I really appreciate your support for many learners in this community !!

1 Like

hi @tokeihananda

Really! I am still confused :stuck_out_tongue:

Thank you so much for your compliments. :heavy_heart_exclamation: I am glad it has helped you, it has surely helped me learn better.