Dice throwing probability : at least one success What would be the function for calculating the probability of at least one success of $n$ $10$-sided dice thrown, if success is $9$ or $10$, but $1$ is counted as negative success (or failure).
In other words: what is the probability of getting more $9$'s and $10$'s then $1$'s out of $n$ throws with at least one $9$ or $10$ in the pool.
 A: To solve this question, you can use an approach which is similar to the binomial distribution. When throwing $n$ dice, the probability of throwing $i$ 1s, $j$ 9-10s and $n - i - j$ other values equals:
$$0.1^i 0.2^j0.7^{n-i-j}{n \choose i}{n - i \choose j}$$
The probability of throwing more 9-10s than 1s thus equals:
$$\sum_{i=0}^{\lfloor\frac{n-1}{2}\rfloor} \sum_{j=i+1}^{n-i} 0.1^i 0.2^j0.7^{n-i-j}{n \choose i}{n - i \choose j}$$
For $n \le 10$, we find:
$$P(i<j|n=1) = 0.2$$
$$P(i<j|n=2) = 0.32$$
$$P(i<j|n=3) = 0.398$$
$$P(i<j|n=4) \approx 0.453$$
$$P(i<j|n=5) \approx 0.494$$
$$P(i<j|n=6) \approx 0.527$$
$$P(i<j|n=7) \approx 0.554$$
$$P(i<j|n=8) \approx 0.577$$
$$P(i<j|n=9) \approx 0.598$$
$$P(i<j|n=10) \approx 0.616$$
This can be confirmed using the following Python code:
import math

f = math.factorial
p = math.pow

def c(m, k):
    return f(m) // f(k) // f(m - k)

for n in range(1, 11):
    s = 0
    for i in range(0, (n - 1) // 2 + 1):
        for j in range(i + 1, n - i + 1):
            s += p(0.1, i) * p(0.2, j) * p(0.7, n - i - j) * c(n, i) * c(n - i, j)
    print(n, s)

