Help calculating probability of dice rolls in a board game

dicegame theoryprobability

What is the probability of rolling a 6 symbol combination using 8 identical 6-sided dice (each dice having one duplicate symbol ie. d={A,A,B,C,D,E}), where the player is allowed discard one dice in order to reroll up to seven remaining?

Notes:
– The game has eight identical six-sided dice. Each dice has five
symbols, the sixth symbol is a duplicate ie. d={A,A,B,C,D,E}.
– The player is allowed a one-time reroll up to seven of her dice (but it costs a one dice discard)
– The goal is to match a six-symbol combination (I have linked an example below).

To be honest, I don't know where to begin. I have worked out that there are 210 possible combinations of 6-symbols.

I.e. n=5 symbols and r=6

$$\frac{(r+n-1)!}{r!(n-1)!} = \frac{10!}{6!4!} = 210$$

Example of a symbol combination

I really can't figure out how to calculate the probability though.

Best Answer

Although there is surely a closed-form solution as @BGM alluded to, you can also simulate the situation. Following is code to simulate a sampling distribution.

set.seed=126790
sims=100
probs=numeric(sims)
for(k in 1:sims)
{
  reps=1000
  rolls=matrix(NA,nrow=reps,ncol=8)
  for(i in 1:reps)
  {
    dice=c(NULL)
    for(j in 1:8)
    {
      dice=c(dice,sample(c('a','a','b','c','d','e'),1))
    }
    dice[sample(1:8,1)]=sample(c('a','a','b','c','d','e'),1)
    rolls[i,]=dice
  }
  rolls

  counter=0
  for(i in 1:reps)
  {
    if(length(grep('a',rolls[i,]))==6||
       length(grep('b',rolls[i,]))==6||
       length(grep('c',rolls[i,]))==6||
       length(grep('d',rolls[i,]))==6||
       length(grep('e',rolls[i,]))==6){
      counter=counter+1
    }
  }
  probs[k]=counter/reps
  cat(k,'\n')
}
probs
mean(probs)
sd(probs)
hist(probs)

In my run of the simulation, the mean probability of getting a 6 character match was $1.959$% with standard deviation $0.397$%. Because the standard error is the standard deviation of the sampling distribution, in 95% of repetitions of 100 sets of 8 rolls with one being replaced, between 1.18% and 2.74% will have a 6-character match. Of course this assumes a random replacement roll, but most people would try to behave strategically. However, I doubt it would change the results by very much. Additionally, this assumes the rolls are normally distributed. Visual analysis says the rolls are normally distributed.

Related Question