# Probability to get 5 successes in at most 7 trials

The night before the party, you plan to rehearse the song you are to sing and would like to sing it perfectly 5 times before sleeping. Since you are a great singer, the probability of you singing it perfectly on each attempt is 5/6. Suppose your attempts are mutually independent, what is the probability that you'll rehearse the song at most 7 times?

Here's my approach: \begin{align*} \text{Probability to get 5 successes in 5 tries} = 4C4\left(\dfrac{5}{6}\right)^4\left(\dfrac{1}{6}\right)^0\dfrac{5}{6} &\approx 0.402\\ \text{6 tries} = 5C4\left(\dfrac{5}{6}\right)^4\left(\dfrac{1}{6}\right)^1\dfrac{5}{6} &\approx 0.334\\ \text{7 tries} = 6C4\left(\dfrac{5}{6}\right)^4\left(\dfrac{1}{6}\right)^2\dfrac{5}{6} &\approx 0.167\\\\ \text{Probability to get 5 successes in at most 7 tries} &= 0.903 \end{align*}

Was my approach correct? May I also know what type of Probability Distribution is suitable to model this problem?

• Looks right to me, though I haven't checked the arithmetic. It's a binomial distribution. Commented Dec 19, 2020 at 17:26
• @saulspatz but here the number of trials themselves can vary, so shouldn't we break it into 3 cases ie. 5 tries, 6 tries, 7 tries? Commented Dec 19, 2020 at 17:27
• No, the question is, "What is the probability of at least $5$ successes in $7$ trials?" Look at your calculations: that's what you computed. Commented Dec 19, 2020 at 17:29
• Wait, the question in the title and the question in the body are different. You answered the question in the body. Commented Dec 19, 2020 at 17:30
• @muw Agree with saulspatz: to get your 5th head right on the 7th trial is a different thing from getting 5 heads in 7 trials. So what exactly is it that you are asking? Commented Dec 19, 2020 at 17:35

If the problem is asking for the $$5^{th}$$ success in the $$7^{th}$$ trial then your approach is incorrect, continue reading for the correct solution. If the question is like the body "$$5^{th}$$ success in $$7$$ trials then what you did is correct in terms of choosing the binomial distribution, not the arithmetic, I think the arithmetic mistakes you did show some misunderstanding of the binomial distribution. You did the following:

\begin{align*} 7C5\left(\dfrac{5}{6}\right)^5\left(\dfrac{1}{6}\right)^2 &\approx 0.2344\\ +\ 7C6\left(\dfrac{5}{6}\right)^6\left(\dfrac{1}{6}\right)^1 &\approx 0.3907\\ +\ 7C7\left(\dfrac{5}{6}\right)^7\left(\dfrac{1}{6}\right)^0 &\approx 0.2791\\ &= 0.9042 \end{align*}

However, you have two things wrong: your combinations and powers.

Your first equation seems correct to me (in case you meant $$5$$ successes in $$7$$ trials), for the second equation what you did gives the probability of $$6$$ heads in $$7$$ trials, but in your question you should calculate the probability of $$5$$ heads in $$5$$ trials + the probability of $$5$$ heads in $$6$$ trials+ the probability of $$5$$ heads in $$5$$ trials, so the second combination should be:
$$\binom{6}{5}\cdot (\frac{5}{6})^5 \cdot \frac{1}{6}$$

We used this combination as you have $$5$$ successes that can happen anywhere during $$6$$ trials.

Note that you should always have $$(\frac{5}{6})^5$$ since you always have $$5$$ successes, however, you should have $$(\frac{1}{6})^{n-5}$$ where $$n$$ is the total number of trials. Similarly, your third equation should be the one of $$5$$ success in $$5$$ trials which is:

$$\binom{5}{5}\cdot (\frac{5}{6})^{5} \cdot (\frac{1}{6})^0=(\frac{5}{6})^5$$

I will leave the numerical answers to you.

Moving to the second interpretation of the question, when you want to find the probability that the $$k^{th}$$ success happens in the $$n^{th}$$ trial you use the negative binomial distribution.

For example. the probability that the $$5^{th}$$success happens in the $$6^{th}$$ trial is:

$$\binom{5}{4} \cdot (\frac{5}{6})^5 \cdot \frac{1}{6}$$

We use the following combination as the first four successes can happen anywhere in the first five trials but the last success is for sure in the fifth trial so we don't include it in the combination as it has a fixed position at the end, can you continue the rest of the cases?

• I actually posted a question based off of a seatwork problem to check if I actually understood the problem. Since some people are saying that the title and the question is different, I updated the post with the real question. Please check and tell me if I understood the real question properly.
– muw
Commented Dec 20, 2020 at 2:02
• I also updated my post with my current solution for the problem.
– muw
Commented Dec 20, 2020 at 4:10
• Your current solution seems correct to me, that is a good use of the negative binomial distribution, hope my explanation helped you Commented Dec 20, 2020 at 5:43

Interesting!

Inittially I thought the calculations in your original post had to be incorrect, since they included the probability of getting 6 or 7 heads in 7 trials, and that seems to makes no sense, since you stop flipping as soon as you get that 5th head. Indeed, you may not do 7 trials at all.

In your updated calculations in the comments to true blue anil's answer you at least make sure that you flip exactly 5 heads, and that this may occur in 5, 6, or 7 trials, so that seemed to be closer to what you want. However, here you do not specify that that 5th head must be the last one of the sequence of trials, because again you stop as soon as you get that 5th head.

Specifically, when you calculate getting exactly 5 heads out of 7 trials, then that includes something like getting 5 heads followed by 2 tails ... or getting 5 heads in the first 6 trials followed by a tail. These are not sequences you want.

Indeed, the fact that in your updated calculatona you got a calculated probability over $$1$$ (which is of course impossible) is because the event of getting $$5$$ heads in the first $$5$$ trials is incorporated in your calculations three different times!

To get all valid sequences for 7 trials, you only want those where the first 4 heads occur in the first 6 trials, and the 5th one on the 7th.

This would be:

$$6C4 (\frac{5}{6})^4 (\frac{1}{6})^2 \frac{5}{6}$$

Likewise, the probability of getting 5 heads out of 6 trials includes the one where you get 5 heads followed by a tail ... again not what you want.

$$5C4 (\frac{5}{6})^4 (\frac{1}{6})^1 \frac{5}{6}$$

Interestingly, when you do the calculations this way, you do end up with the same probability as your original answer .. which we can understand as follows:

With your original method, you calculated any sequence of 7, with 5, 6, or 7 heads. With my method, we considered the sequence of 5,6, or 7, ending with a head. But note, once you extend the sequences of 5 or 6 ending with a head to get a sequence of 7, you are also getting all sequences of length 7, and with 5,6, or 7 heads! So, they are in fact exactly the same, and your original calculations are in fact correct!

• By my understanding: \begin{align*} \text{Probability to get 5 successes in 5 tries} = 5C4\left(\dfrac{5}{6}\right)^4\left(\dfrac{1}{6}\right)^1\dfrac{5}{6} &\approx 0.335\\ \text{6 tries} = 6C4\left(\dfrac{5}{6}\right)^4\left(\dfrac{1}{6}\right)^2\dfrac{5}{6} &\approx 0.167\\ \text{7 tries} = 7C4\left(\dfrac{5}{6}\right)^4\left(\dfrac{1}{6}\right)^3\dfrac{5}{6} &\approx 0.065\\\\ \text{Probability to get 5 successes in at most 7 tries} &= 0.567 \end{align*} How about this?
– muw
Commented Dec 20, 2020 at 3:20
• Sorry I got distracted and got it wrong myself :P Commented Dec 20, 2020 at 3:31
• Haha. Well, by my latest equation, did I understand your explanation correctly?
– muw
Commented Dec 20, 2020 at 3:32
• OK, 5 out of 5 is 4 heads out of 4 trials, followed by one more: $4C4 (\frac{5}{6})^4 (\frac{1}{6})^0 \frac{5}{6}$ .... which of course is simply $(\frac{5}{6})^5$ Commented Dec 20, 2020 at 3:33
• Wait, what? Are you saying there is a 4th term? Which is the probability of getting 4 successes in 4 trials? Or you're just explaining how you formulated the Probability of 5 successes in 5 tries?
– muw
Commented Dec 20, 2020 at 3:37

You have been revising your question from time to time $$\,!\,$$ I take it that your actual question is "the probability that you will get your fifth head/ fifth perfect take in at most $$7$$ tries.

The simplest solution comes by realizing that in $$7$$ trials, we must have $$\leq2$$ failures, and applying the binomial distribution formula

$$\binom 7 0p^7q^0 + \binom71p^6q^1 + \binom 7 2p^5q^2$$

Putting $$p = \frac56, q = \frac 16,$$ the answer comes to $$\dfrac{3125}{3456}, \approx 0.9042$$

• I posted the real question. Could you confirm if my understanding was correct? Anyway, if that is that case, here's my computation: \begin{align*} 5C5\cdot\left(\dfrac{5}{6}\right)^5\cdot\left(\dfrac{1}{6}\right)^{5-5 = 0} &= 0.4019\\ 6C5\cdot\left(\dfrac{5}{6}\right)^5\cdot\left(\dfrac{1}{6}\right)^{6-5 = 1} &= 0.4019\\ 7C5\cdot\left(\dfrac{5}{6}\right)^5\cdot\left(\dfrac{1}{6}\right)^{7-5 = 2} &= 0.2344\\ \text{Total Probability} &= 1.0382 \end{align*} Did I do it right?
– muw
Commented Dec 20, 2020 at 2:21
• @muw Probability is greater than $1$ ... Commented Dec 20, 2020 at 2:49
• Agree, it makes no sense, but I followed his steps?
– muw
Commented Dec 20, 2020 at 2:50
• @muw Your calculations do not specifify when that 5th head occurs, but remember that you stop as soon as you get that 5th head. So, when you calculate getting exactly 5 heads out of 7 trials, that includes something like getting 5 heads followed by 2 tails ... which is not what you want. You only want those where the first 4 haeds occur in the first 6 trials, and the 5th one on the 7th. Likewise, the probability of getting 5 heads out of 6 trials includes the one where you get 5 heads followe by a tail ... again not what you want. That's why your probability is too high Commented Dec 20, 2020 at 2:56
• @muw Just added my own answer ... and put that calculation in there Commented Dec 20, 2020 at 3:10