Jump to content
  • Advertisement
Sign in to follow this  
Ahmed Egyptian

Probability question

This topic is 2162 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Consider that I have two columns 

1  6

2  9

5  10

 

If each elemtn from the first column I generate a random number from 1 - > 3  and for each element for the 2nd column I generate a number from 4 -->6 

 

What is the probability that I get again the same numbers that was generated before  and for how many times ?

 

Share this post


Link to post
Share on other sites
Advertisement

That makes no sense! Please restate the question. Are you talking about summing up values of N-sided dice (i.e. equal probability to get a result from {1, 2, ..., N}? I have no idea what the columns are about.

Share this post


Link to post
Share on other sites

It looks like you're proposing rolling a six-sided dice twice, and asking what are the chances that the result is the same on both rolls. The answer to that question is for any given result on the first toss, there is a 1/6 chance the second toss will come up that same number.

 

--- 1  2  3  4  5  6

1   x

2      x

3         x

4            x

5              x

6                 x

Edited by AngleWyrm

Share this post


Link to post
Share on other sites

Sorry guys about not asking a clear question. 

 

Lets say I have just one column of  3 dices  x1, x2, x3 

but I only will generate a random number from 1 >3  for each x 

what is the probability that when I do that, I get the same previous generated numbers

 

for example random numbers from 1 > 3 

 

first toss

x1 = 2

x2= 2

x3 = 3

 

second time 

x1 = 2

x2= 3 

x3 = 1

 

what is the probability to get the same first toss results or the same results again ?

Edited by Ahmed Egyptian

Share this post


Link to post
Share on other sites
The probability of getting (2,2,3) again is 1/27, which is the same as the probability of getting (2,3,1).

Share this post


Link to post
Share on other sites

It's 1/(3 cubed).

 

Each die is independent and the chance of getting any given result is (1/3) * (1/3) * (1/3) = 1/(3 * 3 * 3), there are 27 possible results and you want exactly one of them.

 

That's assuming that the order is important (i.e. you can distinguish each die roll i.e. you roll one at a time or the dice are different colours). If order is unimportant it is 6/27 (since there are 6 ways to arrange 3 objects, namely ABC ACB BAC BCA CAB CBA). The number of arrangements of n objects is n! (n factorial i.e. 1 * 2 * ... * (n-1) * n)

 

EDIT: Actually if the order is not important it is more complicated than that, it depends how many distinct values there are in the roll, e.g. there is only 1 way out of 27 to roll 111, but there are 3 ways to roll 112 (i.e. 112 121 211), etc.

Edited by Paradigm Shifter

Share this post


Link to post
Share on other sites

3*3*3=27 ways to end, assuming order is important, each equally likely.

 

If order is not important, there are 10 ways to end ABC,AAB,AAC,BBA,BBC,CCA,CCB,AAA,BBB,CCC which is  (n+k-1) choose (n) where n is the number of spots and k is the number of objects. But they are not all equally likely...

 

Maybe.

Edited by jms bc

Share this post


Link to post
Share on other sites

If the order is important - if the numbers are all the same the probability of getting the roll is 1/27 (3 total out of the 27 possibilities: 111 222 333)

 

If there are 2 distinct numbers there are 3 ways of rolling each possibility (aab, aba, baa), so answer is 3/27. There are 6 = 3! different combinations of 2 distinct numbers (112, 113, 221, 223, 331, 332) so that's 18 of the 27 possibilities covered there

 

3 distinct numbers: there are 6 ways to roll 123, i.e. 123 132 213 231 312 321, so chance of rolling 123 in any order is 6/27

 

Adding all the probabilities for all possible rolls up we get 3/27 + 18/27 + 6/27 = 1 so that is all the possibilities covered.

Edited by Paradigm Shifter

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!