# What is the required probability of winning for this problem?

Suppose the casino has a game which allows the player to place only a maximum of 100 bets. Suppose I have devised a strategy that puts the odds in my favor. When I place a bet, I have X % probability of winning where X >50%. Given that I am a conservative person, I want to have at least 75% chance of making a profit. How to calculate X?

The player starts with USD100. Each bet is equal size at USD1. When the player wins, he earns USD1. When he loses, he loses USD1.

The player has to make 100 bets. He cannot stop even if he is deeply in profits until 100 bets have been made.

Answers that solve the problem using computer programming instead of analytically are welcomed as well.

• How much do profit do you make if you win one bet? Dec 10, 2016 at 2:41
• @Franck Dernoncourt , thanks for the question. I have added details to add clarification to the question. Dec 10, 2016 at 2:45
• Just to clarify - you're assuming that the player would stop as soon as he/she has made a profit? I.e., if I win the very first bet, would I just stop? Dec 10, 2016 at 2:55
• So are you going to place all 100 bets? You want to know the probability od ending up with 101 dollars after 100 bets.. I think that how much X is greater than 50% determines your chances of winning. If the bets are independent than you have to win 51 times to win. I don't see where the 75% fits in. Dec 10, 2016 at 2:56
• The player has to make 100 bets. Dec 10, 2016 at 2:57

In the case when you have to make all 100 bets, the real question is the probability of winning 51 or more of the 100 bets. This is a perfect application of the binomial distribution.

Let $w$ represent the number of successes, $n = 100$ is the number of trials, and $p$ is equivalent to your chances of winning each bet.

$$P(w > 50) = \sum_{k = 51}^{100} {100 \choose k} p^k (1 - p)^{100 - k}$$

In order to test out different possible values of $p$, you can try a bunch of values computationally in R, using pbinom to calculate the probability that you get $X$ or more wins. In this case, you want to know the probability that you get strictly more than 50 wins, which you could calculate this way:

prob_of_winning = 0.5 pbinom(50, 100, prob_of_winning, lower.tail = FALSE) 

See this link for more details on the function in R

At that point, you could plug in a range of values for prob_of_winning. It's a bit brute force, but there you go =)

• @user91579631 Look at the documentation I linked to - the code I included gives the probability of getting strictly more than 50 wins, ie 51 or above. Also note that the function returns the probability of "making a profit" in your problem, so you'll need to try different values for the prob_of_winning variable until it returns a value above your threshold of 0.75 that you specified in your question Dec 11, 2016 at 3:43
• Thanks. You're right. The prob_of_winning is 0.5386 after a few trial and error attempts. You may want to update your answer to indicate that the answer X is 53.86%. Thank you! Dec 11, 2016 at 3:47