0
$\begingroup$

My apologies if this question has been duplicated. None of the ones I've seen have been exactly the same, and I need help wrapping my mind around this.

I'm throwing x dice. What is the probability of rolling at least n sixes?

Other questions have been answered either by complementarity (what's the chance no sixes get rolled?) or individual shortcuts. What's a more flexible and comprehensive equation that would apply even on high or low values of x and n?

Thank you for your time.

  • 0
    Hi and welcome. We typically give answers that suit a wide range of applications. Can you add some detail about why they specifically don't meet your needs here? I was going to answer by using complements, actually.2017-02-14
  • 0
    Use the binomial distribution.2017-02-14
  • 0
    I'm trying to write this into code (Java). Therefore the fewer variations of equations I must use, the better: complements would be fine if they can be comprehensive in that way.2017-02-14
  • 0
    ncmathsadist, can you say more?2017-02-14

2 Answers 2

0

your probability of throwing exactly $k \; 6$'s is

${x \choose k} (\frac 16)^k(\frac 56)^{x-k}$

To throw at least $k \; 6$'s

$\sum_\limits{i=k}^x{x \choose i} (\frac 16)^i(\frac 56)^{x-i}$

1

In general, there's no shortcut for finding the probability of rolling at least $n$ $6$'s in $x$ rolls. (Usually, we use $k$ and $n$ for this, rather than $n$ and $x$, but that's just a convention.) The probability of rolling exactly $k$ $6$'s in $x$ rolls is

$$ p_k = \binom{x}{k} \left(\frac{1}{6}\right)^k\left(\frac{5}{6}\right)^{x-k} $$

and then the probability of rolling at least $n$ $6$'s is

$$ \sum_{k=n}^x p_k = 1-\sum_{k=0}^{n-1} p_k $$

whichever takes less time to compute.