You repeatedly toss a fair coin for 5 times. What is the probability that heads comes up at least 3 times before tails comes up twice?

In 5 tosses that would be exactly 3 times, since you require two tails at the end.

So, 1/2^5

To find the probability of getting at least 3 heads before 2 tails when tossing a fair coin 5 times, we need to count the favorable outcomes and divide it by the total outcomes.

Let's consider the possible outcomes of tossing a fair coin:
- H (heads)
- T (tails)

We need to find the number of favorable outcomes where heads comes up at least 3 times before tails comes up twice.

We should break down the favorable outcomes into two cases:
1. Heads comes up 3 times followed by tails appearing twice.
2. Heads comes up 4 times followed by tails appearing once.

Case 1: Heads comes up 3 times followed by tails appearing twice.
The sequence of outcomes would be HHH TT.

Case 2: Heads comes up 4 times followed by tails appearing once.
The sequence of outcomes would be HHHH T.

Now, let's count the number of favorable outcomes for each case:

Case 1: There are 3 heads and 2 tails, so we need to arrange them. The number of ways to arrange 3 heads and 2 tails is given by:
C(5,3) * C(2,2) = 10 * 1 = 10

Case 2: There are 4 heads and 1 tail, so we need to arrange them. The number of ways to arrange 4 heads and 1 tail is given by:
C(5,4) * C(1,1) = 5 * 1 = 5

Now, we need to find the total number of possible outcomes when tossing a fair coin 5 times. Since each toss can have 2 outcomes (heads or tails), the total number of possible outcomes is 2^5 = 32.

Finally, we can calculate the probability by summing up the favorable outcomes and dividing it by the total outcomes:
P(heads comes up at least 3 times before tails comes up twice) = (favorable outcomes) / (total outcomes) = (10 + 5) / 32 = 15 / 32 ≈ 0.46875

Therefore, the probability that heads comes up at least 3 times before tails comes up twice when tossing a fair coin 5 times is approximately 0.46875 or 46.875%.