0

So let's say I want to know the probability of not getting three heads in a row while flipping 5 coins. Would I use combinations or permutations?

I was thinking permutations, since the heads need to be next to each other, but also maybe combination, since the order of the heads next to each other does not matter.

2 Answers2

0

I would just do the math.
There are $2^5$ possible outcomes. a) all heads - one possibility, yes. b) four heads - five possibilities, one no four yes. c) three heads - ten possibilities, seven no three yes. Net result $P(3\ in\ row)=\frac{8}{2^5}=\frac{1}{4}$. You asked for $1-P=\frac{3}{4}$.

I use both permutations and combinations. To get this answer - combinations to get number of heads and permutations to get number of three in a row.

  • 1
    Thanks for the help, but I really need to know the difference for a problem I am working on, as I don't know whether to use permutations or combinations to find the probability of not getting three heads in a row for 21 coin flips. It's a much larger situation so I want to start small and work my way up. – Joe Larkian Apr 18 '21 at 03:34
  • I revised my answer to address your question directly. As I said you need both. Combination to get number of heads and permutation to get count of three in a row. – herb steinberg Apr 18 '21 at 03:43
  • I will look at it, thanks! – Joe Larkian Apr 18 '21 at 03:45
0

I find it easiest to take a counting approach to problems like these. Especially when the numbers are small, sometimes it's best to just count.

The total number of possible outcomes for $5$ coin flips is $2^5=32$, since each of the $5$ flips can have one of $2$ outcomes (heads or tails).

The total number of possible outcomes in which $3$ heads appear, and they are all in a row, is $3$. Since the numbers are small, I found by simply counting fingers: with 5 fingers on one hand, how many groups of 3 adjacent fingers can you count? The answer is $3$. (In general, it will be $n-k+1$; where here $n=5$ and $k=3$).

The total number of possible outcomes in which $4$ heads appear, and $3$ are in a row, is $4$. It may be easier to think of this case as $1$ tails appearing. Out of the $5$ spots that that tail can be in, all of them except $1$ leave $3$ heads in a row. (The one exception is when the tails is in the middle, $HHTHH$).

The total number of possible outcomes in which $5$ heads appear, and $3$ are in a row, is $1$. That's because there's only one outcome in which 5 heads appear.

So all in all, you have $3+4+1=8$ outcomes in which $3$ heads are in a row.

That means there are $32-8=24$ outcomes in which there are not $3$ heads in a row.

So your answer is $\frac{24}{32} = \frac{3}{4}$.

Note: I see that you care about generalizing this for higher numbers. It turns out the answer is pretty ugly. You should check out this post for more on that.

roddur
  • 36