I have a bag filled with $10$ balls each of different colours. Now I have picked one ball randomly and after looking at the colour, I will drop the ball again in the bag. I have repeated this for $10$ times. For all $10$ drawings, I will note the colour of the ball that is drawn. What is the probability that I will draw balls of only three different colours in the $10$ drawings (the colour of balls don't matter).

My attempt is that we can have a probability of $$\frac{10 \cdot 9 \cdot 8 \cdot 3^7}{10^{10}}$$ Is this the correct answer? Else please explain the correct one.

  • 1
    $\begingroup$ Pick the three colors you want to draw from, then compute the probability of drawing them. Then, do inclusion-exclusion w/ 2 colors and 1 color, and you'll be done. $\endgroup$ – Don Thousand Jun 18 '19 at 1:31
  • 1
    $\begingroup$ Please edit your question to show what you have attempted and explain where you are stuck so that you receive responses that address the specific difficulties you are encountering. This tutorial explains how to typeset mathematics on this site. $\endgroup$ – N. F. Taussig Jun 18 '19 at 1:41
  • $\begingroup$ would like to know your feedback on the answer provided $\endgroup$ – G Cab Jun 20 '19 at 13:00

Since upon recording the color, you put back the extracted ball, then a sequence of extractions is a sequence of $10$ i.i.d. uniform random variables, which can take up one of the colors.

Let's go more general, and fix that there are $m$ colors, a sequence of $n$ extractions, and that we are asking for the probability that the extraction contains exactly $q$ different colors.

The various different extractions, the universe of events, are given by the $n$-tuples representing the ordered sequence of extracted colors (coded $1, \cdots,m$).
So each sequence can be encoded as one of the products in the expansion of $$ \begin{array}{l} \left( {x_{\,1} + x_{\,2} + \cdots + x_{\,m} } \right)^{\,n} = \\ = \cdots + \underbrace {x_{\,q_{\,1} } \cdot x_{\,q_{\,2} } \cdot \cdots \cdot x_{\,q_{\,n} } }_{n\,{\rm terms}} + \cdots \quad \left| {\;\left( {\,q_{\,1} ,\,q_{\,2} ,\; \cdots ,\,q_{\,n} } \right) \in \left[ {1,m} \right]^{\,n} } \right.\quad = \\ = \sum\limits_{\left\{ {\begin{array}{*{20}c} {0\, \le \,j_{\,k} } \\ {j_{\,1} + \,j_{\,2} + \, \cdots + \,j_{\,n} \, = \,n} \\\end{array}} \right.\;} {\left( \begin{array}{c} n \\ j_{\,1} ,\,j_{\,2} ,\, \cdots ,\,j_{\,n} \\ \end{array} \right)\;x_{\,1} ^{j_{\,1} } \;x_{\,2} ^{j_{\,2} } \; \cdots \;x_{\,m} ^{j_{\,m} } } \\ \end{array} $$ where the multinomial is counting the sequences with the same "frequency histogram".

Now we have $\binom{m}{q}$ ways to choose the $q$ colors that shall appears, and $$ \sum\limits_{\left\{ {\begin{array}{*{20}c} {1\, \le \,j_{\,k} } \\ {j_{\,1} + \,j_{\,2} + \, \cdots + \,j_{\,q} \, = \,n} \\ \end{array}} \right.\;} {\left( \begin{array}{c} n \\ j_{\,1} ,\,j_{\,2} ,\, \cdots ,\,j_{\,q} \\ \end{array} \right)\;} = \sum\limits_{\left\{ {\begin{array}{*{20}c} {0\, \le \,j_{\,k} } \\ {j_{\,1} + \,j_{\,2} + \, \cdots + \,j_{\,q} \, = \,n - q} \\ \end{array}} \right.\;} {\left( \begin{array}{c} n \\ j_{\,1} + 1,\,j_{\,2} + 1,\, \cdots ,\,j_{\,n} + 1 \\ \end{array} \right)\;} $$ willl give the number of sequences where they will appears, at least once, and no other color.


I think this problem is more complicated than I first thought. First, let's figure out the probability of having exactly 3 distinct colors among the draws. We can break this down into 36 disjoint events. The events are the position of when the second and third colors first appear. You can have any of the following: $(2,3),\ldots, (2,10), (3,4),\ldots, (3,10), \ldots, (9,10)$. When you calculate this out, you get: $$\dfrac{\displaystyle \sum_{1<a<b\le 10} \prod_{i=1}^{10}\begin{cases}1, & 1<i<a \\ 2, & a<i<b \\ 3, & b<i \\ 8, & b=i \\ 9, & a=i \\ 10, & i=1\end{cases}}{10^{10}} = \dfrac{6,717,600}{10^{10}} = \dfrac{8,397}{12,500,000} \neq \dfrac{10\cdot 9\cdot 8\cdot 3^7}{10^{10}}$$

So, your answer is not correct. Since I have broken the problem down into disjoint cases, and any example of a draw where there are exactly 3 distinct colors must fall into one of these cases.

This can also be done with Inclusion/Exclusion.

Choose 3 colors: $\dbinom{10}{3}$

Of those three colors, choose 0, 1 or 2 that will not be used:

$$\dbinom{3}{0}, \dbinom{3}{1}\text{ or }\dbinom{3}{2}$$

So, the number of ways to select exactly 3 colors:

$$\dbinom{10}{3}\left(\dbinom{3}{0}\dfrac{3^{10}}{10^{10}} - \dbinom{3}{1}\dfrac{2^{10}}{10^{10}}+\dbinom{3}{2}\dfrac{1^{10}}{10^{10}}\right) = \dfrac{8,397}{12,500,000}$$

  • $\begingroup$ Yes, that is it. $\endgroup$ – Graham Kemp Jun 18 '19 at 15:43
  • $\begingroup$ @interstellar your first two terms seem ok.What about third why did you add that.Because upon deleting second from first you get the probability of pricking balls of only three diffrent colours right then why is third term used. $\endgroup$ – mechanics Jun 19 '19 at 1:02
  • $\begingroup$ @mechanics because that is how Inclusion/Exclusion works. Let's use an example. We have the colors Red, Green, and Blue. I look at all ways of drawing only Reds, Greens, and Blues. This includes when I only draw Reds and Greens, Reds and Blues, and Greens and Blues. So, I subtract off three times the number of ways to draw only two colors. However, when I draw only two colors, I can also draw only one color. I can draw only Reds, only Greens, or only Blues. I am subtracting only reds when I subtract Reds and Greens and when I subtract Reds and Blues. So.. $\endgroup$ – InterstellarProbe Jun 19 '19 at 12:22
  • $\begingroup$ Only Reds are subtracted twice. Only Greens are subtracted twice. Only Blues are subtracted twice. So, I have to add them back in. $\endgroup$ – InterstellarProbe Jun 19 '19 at 12:22
  • $\begingroup$ Ok very nice explanation thankyou very much $\endgroup$ – mechanics Jun 19 '19 at 14:14

There are $\tfrac{10\cdot 9\cdot 8}{3\cdot 2\cdot 1}$ ways to select three distinct colours.   That is also written as $\binom {10}3$ or $^{10}\mathrm C_3$.

There is a probability of $\tfrac{3^{10}}{10^{10}}$ for obtaining a drawing no more than those three distinct colours when selecting from $10$ distinct items with replacement.

However, that includes drawings of only one or two of those three colours - it does not ensure the selection contains all three.

So use the Principle of Inclusion and Exclusion.

  • $\begingroup$ @kemp what if i write 3^8 *2*1 $\endgroup$ – mechanics Jun 18 '19 at 3:03
  • $\begingroup$ @mechanics Sure, you can do some cancelation. $\tfrac {10\cdot 9\cdot 8}{3\cdot 2\cdot 1}\tfrac{3^{10}}{10^{10}}~=~\tfrac{9\cdot 8\cdot 3^9}{2\cdot 10^9}~=~\tfrac{3^{11}}{5^2\cdot 10^7}$ . That is not the issue. $\endgroup$ – Graham Kemp Jun 18 '19 at 3:09
  • $\begingroup$ @GrahamKemp This is not at all clear how one would use Inclusion/Exclusion. $\endgroup$ – InterstellarProbe Jun 18 '19 at 15:30
  • $\begingroup$ Why is 10*9*8*3^8*2*1/(10^10*3*3)not the answer. $\endgroup$ – mechanics Jun 20 '19 at 13:09
  • $\begingroup$ What are you even trying to count there? @mechanics $\endgroup$ – Graham Kemp Jun 20 '19 at 13:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.