# Dice probability of a winning more than $X\%$ of the time over $Y$ Throws

I have a die with three possible outcomes. The three outcomes are win (+1), draw (0) and lose (-1). $P(w) + P(d) + P(l) = 1$.

(1) If I throw the die Y times, what is the probability I will win $X$ or more of those throws (assuming the dice is fair)?

(2) If I want to stand a $Z\%$ chance of winning $X$ or more throws out of $Y$, what bias must in introduce to the die (i.e. what must $P(w)$ be)?

(1) Coming at this form a tree perspective, my thoughts were;

Even if the dice is fair the outcome winning is not equally likely as losing. If I were to say that there are for this purpose two possible outcomes, I win ($p(w)$) or I do not win ($p(nw)$) where not winning is $p(l)+p(d)$.

In the case of $p(w) = p(nw)$ one can simply count the number of combinations that lead to a win out of all possible outcomes; i.e.

$$P(\text{win \geq x throws}) = \frac{\sum_{n=x}^y \frac{(y!)}{n!(y-n)!}} {2^y}$$

If the probabilities are not equally likely then one needs to adjust for them to get the probability of that string of outcomes.

$$P(\text{win \geq x throws}) = \sum_{n=x}^y \frac{(y!)}{n!(y-n)!} \times p(w)^n \times (1-p(w))^{(y-n)}$$

This as far as I can see does not simplify to a swiftly computable answer, especially for large $y$. I would have thought there is a more sophisticated way of doing it?

Side note: The complications for the combinations part involving factorials is that one has to use the sterling approximation in order to be able to compute it for large $y$.

Sterling Approximation

$$\ln(n!) \approx n \ln(n) -n +\ln(\sqrt{2 \pi n})$$

So we get;

$$P(\text{win \geq x throws}) = \sum_{n=x}^y exp( y\ln(y)+\ln(\sqrt{2\pi y})-n\ln(n)-\ln(\sqrt{2\pi n}) -(y-n)\ln(y-n)-\ln(\sqrt{2\pi (y-n)})) \times p(w)^n \times (1-p(w))^{(y-n)}$$

Simplifying

$$P(\text{win \geq x throws}) = \sum_{n=x}^y exp( y \ln(y)- \frac{1}{2} \ln(2) + \frac{1}{2} \ln(\pi y) - n \ln(n) - \frac{1}{2} \ln(\pi n) (n- y) \ln(y-n) - \frac{1}{2} \ln(\pi (y-n))) \times p(w)^n \times (1-p(w))^{(y-n)}$$

$$P(\text{win \geq x throws}) = \sum_{n=x}^y exp( y \ln(y)- \frac{1}{2} \ln(2) + \frac{1}{2} \ln(\pi y) - n \ln(n) - \frac{1}{2} \ln(\pi n) (n- y) \ln(y-n) - \frac{1}{2} \ln(\pi (y-n)) + n\ln(p(w)) + (y-n)\ln(1-p(w)))$$

(2) With the current form of (1) as far as I can see you are forced into numerical methods to solve what $p(w)$ must be for a given probability of winning $x$ or more throws out of $Y$, when I was looking for an analytical method.

-
Welcome to Math.SE! Please consider updating your question with some information about what you have tried or where you are getting stuck. You will find people are much more willing to help if you do! – Nick Peterson Nov 12 '13 at 18:35
At the risk of sounding patronizing - this is an excellent response to the original closure of the question, and an example that I wish more users would follow. – Matthew Pressland Nov 13 '13 at 13:36
Easy enough to do. – user2676706 Nov 13 '13 at 19:59

For large values of $Y(>30)$ you can approximate binomial distribution by the Gaussian distribution. See this. Consider each outcome of the dice roll be from Bernoulli distribution such that $P_{Win}=p(w)$ and $P_{NotWin}=p(d)+p(l)=1-p(w)$.