View Full Version : Easy Probability Question

davmt

07-26-2010, 07:08 PM

Hi ppl,

Im trying to solve to following simple problem but I'm finding it harder than expected. This problem has to be eventually be generalized but for now let's keep it simple.

I choose 4 random numbers from 1-10. The chosen random numbers can be either different or identical, so for example 1, 5, 3, 2 is possible, or 4,2,1,4 or 4, 5, 5, 5 or 1,1,1,1 are all possible.

Another person chooses another 4 random numbers with thesame rules applied above.

So person 1 chooses 4 random numbers

and person 2 chooses another 4 random numbers

What is the probability that person 2 chooses at least 1 number which is person's 1 list ?

I even implemented a program to find the answer and after some thousands of runs i get an answer around 0.8025. I know this is not the correct answer but the correct value should be whereabouts.

For reference, if the number of random numbers i choose is variable from 1-10, i get the following results attached in the pic

http://img375.imageshack.us/img375/4448/rando.jpg

Mean Joe

07-26-2010, 08:30 PM

An idea for one approach:

Calculate the probability that person B chooses no number which is on person A's list.

If person A has one unique number (ie he has picked the same number four times), then the probability that person B chooses no number on person A's list = (9/10)^4.

The probability that person A has one unique number is = 10 * (1/10)^4.

If person A has two unique numbers, then the probability that person B chooses no number on person A's list = (8/10)^4.

The probability that person A has two unique numbers is = ... (a little more involved)

Does this approach seem good?

davmt

07-27-2010, 07:31 AM

let us say we choose 3 numbers instead of 4 to simplify the discussion

the probability of choosing 3 times thesame number is

10*(1/10)^3 (10 possible ways of choosing a number, multiplied by the possibility of choosing thesame number 3 times (1/10)^3)

choosing 2 numbers which are alike

10*(1/10)*(9/10)*(2/10) number-different-same to at least one of them

10*(1/10)*(1/10)*(9/10) number-same-different

(x y (x or y))

(x x y)

so i think there is a 3C2 involved in this calculation, i.e. there are 3 possibilities of getting 2 numbers thesame, that is xyx, xyy, and xxy

but again you can either choose x twice or y twice so its 2 possibilities

this is where im getting puzzled

choosing 3 distinct numbers

10*(1/10)*(9/10)*(8/10)

davmt

07-27-2010, 07:57 AM

your approach is correct

but i cannot seem to find correctly the probability of finding 2 equal numbers in an easy way

but i have confirmed it by saying prob(2 equal numbers) = 1 - prob(3 equal numbers) - prob(3 distinct numbers) giving 0.27

(1 - 0.01 - 0.72)

and eventually i get the correct answer

davmt

08-09-2010, 12:45 PM

finding the probabilities of getting distinct/identical numbers

for 3 numbers,

i manage to get an answer

10 * 1/10 * 9/10 * 8 /10 = 0.72

10* 1/10 * 9/10 * 1/10 * 3C2 = 0.27

10* 1/10 * 1/10 * 1/10 = 0.01

total probability = 1 so its correct

for 4 numbers things get much more difficult

10* 1/10 * 9/10 * 8/10 * 7/10 = 0.504 (4 distinct numbers)

10* 1/10 * 9/10 * 8/10 * 3/10 = 0.216 (3 distinct numbers)

10* 1/10 * 9/10 * 8/10 * 2/10 = 0.144 doubts ?

10* 1/10 * 9/10 * 8/10 * 1/10 = 0.072 doubts ?

10* 1/10 * 9/10 * 2/10 * 1/10 = 0.018 (2 distinct numbers)

10* 1/10 * 9/10 * 1/10 * 1/10 = 0.009 doubts ?

10* 1/10 * 1 /10 *1/10 * 1/10 = 0.001 (1 distinct number)

total 0.964 which is wrong !

at the end i would like to derive an analytical formula for this from choosing 1 to 10 numbers (where 10 is the whole range) but at the moment i seem to be far from achieving this

Dason

08-09-2010, 04:21 PM

Edit: My code I posted before failed on certain input. I need to redo it and then I'll post the results.

Here's what I've done:

let:

scenarios

a=player1 selects 4 different numbers.

b=player1 selects 3 different numbers.

c=player1 selects 2 different numbers.

d=player1 selects 1 number 4 times.

f=number appears for the first time.

o=the number has occurred previously.

P(a)=P(fnfnfnf)=1*(9/10)*(8/10)*(7/10)

P(b)=P(fnfnfno)+P(fnfnonf)+P(fnonfnf) =1*(9/10)*(8/10)*(3/10)+1*(9/10)*(2/10)*(8/10)+1*(1/10)*(9/10)*(8/10)

P(c)=P(fnfnono)+P(fnonfno)+P(fnononf) =1*(9/10)*(2/10)*(2/10)+1*(1/10)*(9/10)*(2/10)+1*(1/10)*(1/10)*(9/10)

P(d)=P(fnonono)=1*1/10^3

Check: P(a)+P(b)+P(c)+P(d)=1

now let

PP(i)=P(all the numbers player 2 chooses are NOT identical to the ones which player 1 chose GIVEN scenario i)

PP(a)=0.6^4

PP(b)=0.7^4

PP(c)=0.8^4

PP(d)=0.9^4

P(player 2 chooses at least 1 number which is in player 1's list)

=1-[P(a)PP(a)+P(b)PP(b)+P(c)PP(c)+P(d)PP(d)]=0.8044975

Powered by vBulletin™ Version 4.1.3 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.