Saturday, February 25, 2012

What is the probability that 2 M&Ms have the same color when 3 are drawn?

I've got a large bag of M%26amp;Ms, large enough that the supply can be considered infinite. Furthermore, I'll assume that all six colors I observe are in the same quantity. If I take 3 M%26amp;Ms from the bag, what is the probability that two, and only two, M%26amp;Ms are the same color? What is your reasoning?What is the probability that 2 M%26amp;Ms have the same color when 3 are drawn?
the probability that the second one does not match the first is 5/6, the probability that the third does not match either one (assuming they all don't match) is 4/6, so the probability that all three don't match is 5/6*4/6=5/9, so the probability of a match is 1-5/9 or 4/9

Now, we have to take into account the possibility that the second and third match the first, which is 1/36, so the probability of exactly one match is 4/9-1/36=11/36

Thinking about this more...scratch the paragraph directly above. There are only three types of outcomes: there are no matches (prob of that is 5/9 or 20/36), prob of two and only two matching, and prob of all three matching. The prob of the second two choices matching the first is 1/36, leaving the prob of exactly one match as 1-20/36-1/36=15/36=5/12 as others have found.

Report Abuse

What is the probability that 2 M%26amp;Ms have the same color when 3 are drawn?
Probability of your picking up one M%26amp;M of a particular color is (1/6).

Probability that you may pick up the second M%26amp;M of the same color = (1/6)

Probability that you may pick up the third M%26amp;M of a different color = (5/6)

Hence, probability that you may pick up first 2 M%26amp;Ms of a particular color and the third of a different color

= (1/6)^2 * (5/6) = 5/216

This can happen in 3 different ways

=%26gt; probability = 15/216 = 5/72

Hence, for 6 colors, probability that any 2 M%26amp;Ms are of the same color and the third of the different color

= 6 * (5/72)

= 5/12
I just got done taking statistics (statistics for engineers and scientists) at the university I go to, so I am pretty confident of that William's answer is right. His explanation is correct too, but I will explain in more mathematical terms.

We will call success P and a failure Q. P represents a that a particular color is chosen and probability is 1/6. Q is the probability that any other color is chosen and the prob is 5/6.

We will call the number of trials n and the number of successes x. You want to take three trials and achieve two successes.

According the binomial distribution, the probability of choosing x successes in n trials with probability of success P and failure Q is given by the following:

P(X=x)=(n choose x)(p^x)(q^x)

The choose term is a probability term that give the number of combinations of the answers. 3 choose 2 is three so the resulting probability is:

3(1/6)^2(5/6)=3(1/6)(1/6)(5/6)=6.9444%

By the way, no answer above 16.66% (1/6) makes any sense because that is probability that you would choose any one color.What is the probability that 2 M%26amp;Ms have the same color when 3 are drawn?
What we are attempting to get is:

2 with the same color, 1 of a different color.

First there are 216 combinations (6^3)

Of these we can form 2 the same and 1 different as follows:

AAB

ABA

BAA

We have 6 choices for the A color, 5 choices for the B color and 3 ways to have drawn them.

6 x 5 x 3 = 90

90 good outcomes

216 possible outcomes

90 / 216

= 10 / 24

= 5 / 12

To prove that this is the right answer, here's a full enumeration of the 90 ways to have picked 3 M%26amp;Ms where exactly 2 match color.

Red Red Orange

Red Red Yellow

Red Red Green

Red Red Blue

Red Red Brown

Red Orange Red

Red Orange Orange

Red Yellow Red

Red Yellow Yellow

Red Green Red

Red Green Green

Red Blue Red

Red Blue Blue

Red Brown Red

Red Brown Brown

Orange Red Red

Orange Red Orange

Orange Orange Red

Orange Orange Yellow

Orange Orange Green

Orange Orange Blue

Orange Orange Brown

Orange Yellow Orange

Orange Yellow Yellow

Orange Green Orange

Orange Green Green

Orange Blue Orange

Orange Blue Blue

Orange Brown Orange

Orange Brown Brown

Yellow Red Red

Yellow Red Yellow

Yellow Orange Orange

Yellow Orange Yellow

Yellow Yellow Red

Yellow Yellow Orange

Yellow Yellow Green

Yellow Yellow Blue

Yellow Yellow Brown

Yellow Green Yellow

Yellow Green Green

Yellow Blue Yellow

Yellow Blue Blue

Yellow Brown Yellow

Yellow Brown Brown

Green Red Red

Green Red Green

Green Orange Orange

Green Orange Green

Green Yellow Yellow

Green Yellow Green

Green Green Red

Green Green Orange

Green Green Yellow

Green Green Blue

Green Green Brown

Green Blue Green

Green Blue Blue

Green Brown Green

Green Brown Brown

Blue Red Red

Blue Red Blue

Blue Orange Orange

Blue Orange Blue

Blue Yellow Yellow

Blue Yellow Blue

Blue Green Green

Blue Green Blue

Blue Blue Red

Blue Blue Orange

Blue Blue Yellow

Blue Blue Green

Blue Blue Brown

Blue Brown Blue

Blue Brown Brown

Brown Red Red

Brown Red Brown

Brown Orange Orange

Brown Orange Brown

Brown Yellow Yellow

Brown Yellow Brown

Brown Green Green

Brown Green Brown

Brown Blue Blue

Brown Blue Brown

Brown Brown Red

Brown Brown Orange

Brown Brown Yellow

Brown Brown Green

Brown Brown Blue

P.S. To those that are getting 5/72 as an answer, you are forgetting that there is no designated color. It didn't say that you have to get 2 *red* and 1 non-red, for example. It said that exactly two have to be the same color. Multiply your answer by 6 (any of 6 colors as the double) and you get the correct answer of 30/72 = 5/12
the probablity is

3(1/6)(1/6)(5/6)

=15/216

to get a colour,you have 1/6 probablity.

to get the same colour for the second M%26amp;M,you have 1/6 probablity.

to get a different colour for the third M%26amp;M,you have 1-1/6=5/6 probablity.

the events are consecuitve,hence the values are multiplied.This can occur 3 times,that is either first,second and third is not the same with others.Hence,the value is multiplied by 3.
OK assuming that the bag has the same number of each color your chance of pulling 2 of the same color and one of a different color would be 5 out of 12
ok. your first M%26amp;M can be any color, so the probability of picking it is just 1.

Now, there are two cases for your second one.

You pick the color, or you don't.

Ok, so if you do- there is 1/6 chance that you pick it, and then a 5/6 chance that you don't pick it the second time, which is 5/36.

If you don't, there is a 5/6 chance of that happening, and then a 1/3 chance of getting the right one, which is 5/18=10/36.

5/36+10/36=15/36=5/12
The first M%26amp;M can be any color.

There are two cases for the second M%26amp;M drawn.

p(different color than first) = 5/6

p(same color as first) = 1/6

____________

If the first two M%26amp;Ms are different colors the chance of matching one of them with the third M%26amp;M is

p(match) = 2/6 = 1/3

If the two M%26amp;Ms are the same color the chance of drawing a different colof with the third M%26amp;M is

p(no match) = 5/6

__________

Put this together and you get the probability of two and only two colors between three M%26amp;Ms

P(2 colors) = (5/6)(1/3) + (1/6)(5/6) = 5/18 + 5/36 = 5/12
Assuming there are only six colors and there is equal probability for each color then

Let X be the number of M%26amp;M of a given color. X has the binomial distribution

with n = 3 trials and success probability p = 0.1666667 .

In general, if X has the binomial distribution with n trials and a success probability of p then

P[X = x] = n!/(x!(n-x)!) * p^x * (1-p)^(n-x)

for values of x = 0, 1, 2, ..., n

P[X = x] = 0 for any other value of x.

this is found by looking at the number of combination of x objects chosen from n objects and then a total of x success and n - x failures.

Or, to be more accurate, the binomial is the sum of n independent and identically distributed Bernoulli trials.

X ~ Binomial( n , p )

the mean of the binomial distribution is n * p = 0.5

the variance of the binomial distribution is n * p * (1 - p) = 0.4166667

the standard deviation is the square root of the variance = 0.6454972

The Probability Mass Function, PDF,

f(X) = P(X = x) is:

P(X = 0 ) = 0.578703703703704

P(X = 1 ) = 0.3472222222222222

P(X = 2 ) = 0.06944444444444445

P(X = 3 ) = 0.00462962962962963

Now that is just for one color, we have to consider the possibility of any color appearing twice.

There are six possible colors and so we multiply:

6 * P(X = 2) = 0.4166667

to confirm this calculation I wrote a simulation in R to draw three MM's from an infinite bag with equal probability of getting any one color. The code counts the number of times that the there are two MM's of the same color selected

MM %26lt;- seq(1,6,1)

count %26lt;- 0

trials %26lt;- 5500

for(i in 1:trials)

{

data %26lt;- sample(MM,3,TRUE)

mode %26lt;- sort(-table(data))

if(mode[[1]] == -2) {count %26lt;- count + 1}

}

cat("counts:",count,"\nProb:",count/tréˆ¥?br>

OUTPUT:

counts: 2287

Prob: 0.4158182