# drawing different colored balls from one urn without replacement and at least

I have this problem (numbers in the example are much smaller than reality, so it would help to get a general equation):

One urn contains $10$ red, $10$ yellow, $10$ black, $10$ green, and $10$ orange balls (total of $50$).

Question 1: if I draw an $x$ number of balls (w/o replacement), what is the probability to get at least one ball of each color?

Question 2: if I draw an $x$ number of balls (w/o replacement), what is the probability to get at least one red, one yellow and one black ball?

Question 3: How many balls should I draw to expect to get at least four different colors (I am not sure whether this last question will require confidence intervals to be answered??)

• One question per post, please. – Ataraxia Jul 17 '13 at 22:05
• It makes a difference whether the mumbers are much smaller than reality. Often we are satisfied with a good approximation, and if the numbers are large then sampling with, without replacement may be effectively equivalent. – André Nicolas Jul 17 '13 at 22:16

We answer the first question. The same idea deals with the second, but with less work.

We stick with $5$ colours, Say there are $a$, $b$, $c$, $d$, $e$ of the various colours, which for convenience we call $a,b,\dots$. Let $n=a+b+c+d+e$. There are $\binom{n}{x}$ ways to draw $x$ items, all equally likely.

We count the bad draws, the ones that are missing one or more of the colours. To get the desired probability, we subtract the number of bads from total, then divide by total.

The idea we will use is called the Principle of Inclusion/Exclusion. Some North American texts call it PIE.

There are $\binom{n-a}{x}$, $\binom{n-b}{x}$, and so on ways to choose $x$ items while leaving out items coloured $a$, $b$, and so on.

Add up these numbers. That does not give us a correct count of the bads, since we have counted twice the choices that miss, for example, colours $a$ and $b$.

So subtract the sum $\binom{n-a-b}{x}+\binom{n-a-c}{x}+\cdots$, $10$ terms in all.

We have subtracted too much, for we have subtracted twice the choices that, for example, miss colours $a$ and $b$ and $c$.

So add back $\binom{n-a-b-c}{x}$, plus $9$ other terms of that shape.

We have added back too much, for we have added back too many times choices like missing all of colours $a$, $b$, $c$, $d$. So subtract $\binom{n-a-b-c-d}{x}$, together with the other $4$ terms of that shape.

If $a=b=\cdots=e$, as in your example, the expression is quite a bit less messy.

We count the bads in that case. Then $n$ is, say $5k$. The first sum was $\binom{5}{1}\binom{4k}{x}$, we subtract $\binom{5}{2}\binom{3k}{x}$, add back $\binom{5}{3}\binom{2k}{x}$, and finally subtract $\binom{5}{4}\binom{k}{x}$.

Note that we define $\binom{p}{q}$ to be $0$ if $p\lt q$. That makes the expressions formally correct in all cases.

There is straightforward generalization beyond $5$ colours. Typically, the terms in the Inclusion/Exclusion become after a while negligible compared to the lead terms, so by truncating suitably we may be able to get a not too hard to compute adequate estimate.
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "url": "https://math.stackexchange.com/questions/446131/drawing-different-colored-balls-from-one-urn-without-replacement-and-at-least/446154", "fetch_time": 1585577252000000000, "content_mime_type": "text/html", "warc_filename": "crawl-data/CC-MAIN-2020-16/segments/1585370497042.33/warc/CC-MAIN-20200330120036-20200330150036-00290.warc.gz", "warc_record_offset": 571946786, "warc_record_length": 32540, "token_count": 863, "char_count": 3157, "score": 4.125, "int_score": 4, "crawl": "CC-MAIN-2020-16", "snapshot_type": "latest", "language": "en", "language_score": 0.9203295111656189, "file_path": "/sailhome/yjruan/project/latent-lm/data/processed/finemath-4plus/finemath-4plus/train-00003-of-00064.parquet"}