# Dice probability

boneill3
Not sure if I should ask this here but

I'm trying to find the probabilty of consecutive numbers on tossing three dice. eg 1 2 3 , 4 5 6 etc

My workings so is

nPr = 3P3 (how many permutaions of 3 numbers in order)

= n!/(n-r)! = 3!/0! = 6

What
I did next is calulate all possible outcomes of three dice = 6 x 6 x 6 = 216

Therfore the probabilty of consecutive numbers on three dice = 6/216 = 1/36

Does this look right ?
I'm not quite sure if the permutaion calculation is right or if i have to multiply it by six...
regards
Brendan

## Answers and Replies

Science Advisor
Homework Helper
What
I did next is calulate all possible outcomes of three dice = 6 x 6 x 6 = 216

Therfore the probabilty of consecutive numbers on three dice = 6/216 = 1/36

Does this look right ?

Yep.

Going up: 3 ways of choosing the first die, other two are fixed: 3/216
Going down: 3 ways of choosing the first die, other two are fixed: 3/216

boneill3
Thanks for your reply.
I've created an function using R to simulate rolling the dice 1000 times and I needed to compare it with the calculated probability.

Here' my code

RollDie=function(n) sample(1:6,n,replace=T) #function to roll 1 dice

result=0 #results hold the number of successive throws

for (x in c(1:1000) ) #loop 1000 times
{
die1 = RollDie(1) #roll first die

die2 = RollDie(1) #roll second die

die3 = RollDie(1) #roll third die

if (((die1 == die2-1) & (die2 == die3-1)) || ((die1 == die2+1) & (die2 == die3+1))) #if dice in consecutive order add to result
{
result = result+1

}
else
{}
}

print(result) #print number of successive values

P3succesivenumbers=(result/1000) #calculate probability

print(P3consecutivenumbers) #print probability

And the Probabilty came out as:

print(P3consecutivesivenumbers) #print probability
[1] 0.029

Which is pretty close to 1/36 = .0277

thanks
Brendan