Finding solutions to an inequality(releating to statistics)

79 Views Asked by At

I am trying to solve the following problem. A person rolls 3 die, what is the probability that the sum of these die is less than or equal to 9? I have built the following inequality model

x1+x2+x3<=9 where the domain of x's are 1<=x1,x2,x3<=6.

Letting x1 = x1+1 , x2=x2+1 and x3 = x3+1 we have the new inequality 0<=x1,x2,x3<=5. Also creating a "slack variable let x4 = 9-(x1+x2+x3) and we have the new equation: x1+x2+x3+x4=6.

Now using the popular stars and bars technique we have * *** * * and have 9 positions where we can place a bar and we have 3 bars thus (9 3) = 84 possible outcomes. Now of these I would presume that the possible outcomes to subtract (as dies cannot have 0's) would be (6,0,0,0) , (0,6,0,0),(0,0,6,0) and (0,0,0,6) = a probability of 80/6^3 = 80/216. However the apparent answer in my textbook is 84 - (6,0,0,0) (0,6,0,0) and (0,0,6,0) which is 81/216. Why is it that we do not subtract the outcome of (0,0,0,6). Also is there another model I could use for this problem as this stars and bars model my teacher taught me is quite confusing.

1

There are 1 best solutions below

0
On

I agree that the stars/bars approach is tricky for this problem, but it does give you a quick way to get the right answer--if your are careful!

Your mistake is that while none of the dice can be 6, the slavck variable an acceptably be 6. So you don't need to subtract off $(0,0,0,6)$.

The easiest approach is to cleverly split the three dice into a pair (because you know probabilities for a pair of dice) and one other. To roll a $9$ or less:

  • The pair can be 2 and the other die anything -- this is $\frac{1}{36}=\frac{6}{216}$
  • The pair can be 3 and the other die anything -- this is $\frac{2}{36}=\frac{12}{216}$
  • The pair can be 4 and the other die anything except a 6 -- this is $\frac{3}{36}\times \frac{5}{6} = \frac{15}{216}$
  • The pair can be 5 and the other die anything except a 6 or 5 -- this is $\frac{4}{36}\times \frac{4}{6} = \frac{16}{216}$
  • The pair can be 6 and the other die a 1, 2 or 3 -- this is $\frac{5}{36}\times \frac{3}{6} = \frac{15}{216}$
  • The pair can be 7 and the other die a 1 or 2 -- this is $\frac{6}{36}\times \frac{2}{6} = \frac{12}{216}$
  • The pair can be 8 (careful here, an 8 is $\frac{5}{36}$ not $\frac{5}{36}$) and the other die a 1 -- this is $\frac{5}{36}\times \frac{1}{6} = \frac{5}{216}$

And the total probability is $\frac{6+12+15+16+15+12+5}{216}=\frac{81}{216}=\frac{3}{8}$.

Another easy approach (assuming you don't know about multinomial coefficients) is to enumerate how you can roll 9 or less. Out of 216 possible rolls:

  • There is $1$ way to roll a $3 : 1+1+1$
  • There are $3$ ways to roll a $4 : 1+1+2$. Note that we count a possibility with two dice matching and one different as 3 ways, since there are three choices for which is the different die. Similarly, a possibility with all three dice different will be counted as 6 ways (three choices for the first number, then two for the second).
  • There are $6$ ways to roll a $5: 1+1+3, 1+2+2$
  • There are $3+6+1=10$ ways to roll a $6: 1+4+1,1+3+2,2+2+2$
  • There are $3+6+3+3=15$ ways to roll a $7:1+1+5, 1+2+4,1+3+3,2+2+3$
  • There are $3+6+6+3+3=21$ ways to roll an $8: 1+1+6, 1+2+5, 1+3+4,2+2+4,2+3+3$
  • There are $6+6+3+3+6+1=25$ ways to roll a $9: 1+2+6,1+3+5,1+4+4,2+2+5,2+3+4,3+3+3$ Add them up and you get $81$ and a probability of $\frac{81}{216}=\frac{3}{8}$

BTW, the number of ways to roll 3,4, up to 18 are $$(1,3,6,10,15,21,25,27,27,25,21,15,10,6,3,1)$$

And with 4 dice, the number of ways to roll 4 through 24 are $$(1,4,10,20,35,56,80,104,125,140,146,140,125,104,80,56,35,20,10,4,1)$$