# Thread:

1. ## Conditional probability

Suppose you have an urn with 2 yellow balls, 3 red balls, 6 white balls, and 12 blue balls. You randomly draw 4 balls from the urn without replacement. Given that at least one of the balls is yellow, what is the probability that all 4 balls will be different colors?

I know that you have to use Bayes' rule, with P(B|A) = 1 because if you have 4 colors, one of them must be yellow. But I'm not sure about the different probabilities.

I think P(A) might be 2 choose 1 + 3 choose 1 + 6 choose 1 + 12 choose 1 all divided by 23 choose 4, but I"m not sure. And I don't know how to get P(>= 1 yellow).Any one have any idea?

Thanks!

2. Hello, horan!

Suppose you have an urn with 2 yellow balls, 3 red balls, 6 white balls, and 12 blue balls.
You randomly draw 4 balls from the urn without replacement.
Given that at least one of the balls is yellow,
what is the probability that all 4 balls will be different colors?
Let $4DC$ = "4 different colors" . . .and $AL1Y$ = "at least one yellow"

According to Bayes' Theorm, we want . $P(4DC\,|\,AL1Y) \;=\;\frac{P(4DC \wedge AL1Y)}{P(AL1Y)}$ .[1]

There are: . ${21\choose4} \:=\:8855$ possible drawings.

Numerator

As you pointed out: $(4DC \wedge AL1Y) \:=\:4DC$

The number of ways to get 4 colors is: . ${2\choose1}{3\choose1}{6\choose1}{12\choose1} \:=\:432$ ways.
Hence: . $P(4DC \wedge AL1Y) \:=\:\frac{432}{8855}$

Denominator

The opposite of "at least 1 yellow" is "no yellow."
There are: . ${21\choose4} \:=\:5985$ ways to get no yellows.
So there are: . $8855-5985 \:=\:2870$ ways to get at least one yellow.

Hence: . $P(AL1Y) \:=\:\frac{2870}{8855}$

Substitute into [1]: . $P(4DC\,|\,AL1Y) \;=\;\frac{\:\frac{432}{8855}\:}{\:\frac{2870}{885 5}\:} \;=\;\frac{432}{2870} \;=\;\frac{216}{1435}$
{"extraction_info": {"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": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 11, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9317854046821594, "perplexity_flag": "head"}