2
$\begingroup$

I want to know the probability of winning a best of 7 series (i.e., win 4 games out of 7) where the first game is already lost. There are some people who advocate taking all possible theoretical combinations, but that doesn't give us the true probability since some combinations are just not possible in real life (redundancies).

Here is a simple example using coin toss.

Example 1: Best two out of three Heads wins the series (no games have been played yet).

Option A1: Include only realistic combinations and remove redundancies:

Wins = {HH-, HTH, THH} ; Losses = {TT-, THT, HTT}

Here, the probability of winning the series is 3/6=1/2.

Option B1: Include all theoretical combinations:

Wins = {HHH, HHT, HTH, THH} ; Losses = {TTT, TTH, THT, HTT}

Here, the probability of winning the series is 4/8=1/2.

As you can see in the above example (when no games have been played yet) the probability of winning the series is the same for both options. So it doesn't really matter if we include the redundancies or not.

However, when the first game is already lost, the two options provide different probabilities of winning the series.

Example 2: Best two out of three Heads wins the series, but the first is already a Tail.

Option A2: Include only realistic combinations and remove redundancies:

Wins = {THH} ; Losses = {TT-, THT}

Here, the probability of winning the series is 1/3.

Option B2: Include all theoretical combinations:

Wins = {THH} ; Losses = {TTT, TTH, THT}

Here, the probability of winning the series is 1/4, not the same as the one before.

Doing this exercise by hand for a 7 game series is going to be a very lengthy process. I want to know how I can do this in R using simple functions or Monte Carlo simulations (no negative binomial).

Here is how I found the probability of winning the series given the first game is lost, but this includes all theoretical combinations/redundancies:

B <- 10000

set.seed(1)

results<-replicate(B,{x<-sample(0:1,6,replace=T)
sum(x)>=4})

mean(results)

Question: How do I find the realistic probability of winning a best of 7 series (i.e., excluding all unreal and redundant combinations) where the first game is already lost?

$\endgroup$
8
  • $\begingroup$ This Q&A has listings of possibilities. Google world series for other related pages. // Maybe use negative binomial dist'n. $\endgroup$
    – BruceET
    Jul 17 at 17:22
  • 1
    $\begingroup$ @BruceET Hi thanks, yes I have seen that question, and many others like that but they never seem to be giving me the answer that I am looking for since in my case, the first game is already played. $\endgroup$
    – Mango
    Jul 17 at 17:37
  • $\begingroup$ In your previous question I already referred you to the solution to the Problem of Points, as developed in the 1650's. It's still worth researching. $\endgroup$
    – whuber
    Jul 17 at 18:48
  • $\begingroup$ @BruceET Yeah I know, where did you see a 50-50 chance? Example one did not start with a loss. Example 2 did ... $\endgroup$
    – Mango
    Jul 17 at 18:51
  • $\begingroup$ There's an issue with your reasoning. In your coin toss example, you have a 50% chance to lose the second toss. That's also a 50% chance to not lose. In the 50% of cases where you don't lose the second toss, you will win the third toss 50% of the time. 50% of 50% is 25%, or 1 in 4. 1 in 3 isn't realistic. That TTH and TTT can be written as TT- doesn't change the fact there's a 50% chance of TT- occurring, which is implicit when adding TTH (25%) and TTT (also 25%). So, yeah, you'll never see the last flip's result, but you still have to add up the probabilities. $\endgroup$
    – MichaelS
    Jul 18 at 5:28
6
$\begingroup$

If you assume that each game is independent, with an equal probability of each outcome, then the problem is quite simple (and as whuber points out in the comments, this is the classical "problem of points"). The solution is computed using the binomial distribution, which does consider all possible cases.

Under these assumptions, you can proceed easily for the general case where we have two players playing a tournament which is best-out-of-$n$ games (where $n$ is a positive odd number), where $0<\theta<1$ is the fixed probability that the first player will win a game. Suppose that the current score is $p_1$ points to the first player and $p_2$ points to the second player (so we must have $p_1+p_2 \leqslant n$ with both values non-negative). Let $X \sim \text{Bin}(n-p_1-p_2, \theta)$ denote the number of remaining games that will be won by the first player. The total points for the first player will be $p_1+X$ and the total points for the second player will be $n-X-p_1$. To facilitate our analysis, we define the bound:

$$B \equiv B(n,p_1) \equiv \Big\lfloor \frac{n}{2} - p_1 \Big\rfloor.$$

The probability that the first player wins is:

$$\begin{align} \mathbb{P}(\text{Player 1 wins} | p_1,p_2) &= \mathbb{P}(X+p_1 > n-X-p_1) \\[16pt] &= \mathbb{P}(2X > n-2p_1) \\[16pt] &= 1-\mathbb{P}(2X \leqslant n-2p_1) \\[16pt] &= 1-\mathbb{P} ( X \leqslant B(n,p_1) ) \\[12pt] &= 1-\sum_{x=0}^{B(n,p_1)} \text{Bin}(x|n-p_1-p_2, \theta). \\[6pt] &= 1-\sum_{x=0}^{B(n,p_1)} {n-p_1-p_2 \choose x} \theta^{x} (1-\theta)^{n-p_1-p_2-x}. \\[6pt] \end{align}$$

It is simple to implement this as a function in R as follows. (I have included checks on the inputs, but these can be removed if you prefer a more parsimonious version of the function.)

problem.of.points <- function(n, p1 = 0, p2 = 0, prob = 0.5, player = 1) {
  
  #Check inputs n, p1 and p2
  if (!is.numeric(n))        stop('Error: Input n must be a non-negative integer')
  if (!is.numeric(p1))       stop('Error: Input p1 must be a non-negative integer')
  if (!is.numeric(p2))       stop('Error: Input p2 must be a non-negative integer')
  if (length(n) != 1)        stop('Error: Input n must be a single value')
  if (length(p1) != 1)       stop('Error: Input p1 must be a single value')
  if (length(p2) != 1)       stop('Error: Input p2 must be a single value')
  nn  <- as.integer(n); pp1 <- as.integer(p1); pp2 <- as.integer(p2)
  if (n != nn)               stop('Error: Input n must be a non-negative integer')
  if (p1 != pp1)             stop('Error: Input p1 must be a non-negative integer')
  if (p2 != pp2)             stop('Error: Input p2 must be a non-negative integer')
  if (n < 0)                 stop('Error: Input n must be a non-negative integer')
  if (p1 < 0)                stop('Error: Input p1 must be a non-negative integer')
  if (p2 < 0)                stop('Error: Input p2 must be a non-negative integer')
  if (p1+p2 > n)             stop('Error: Cannot have p1 + p2 > n')
  if (!is.numeric(prob))     stop('Error: Input prob must be a probability')
  if (length(prob) != 1)     stop('Error: Input prob must be a single probability')
  if (prob < 0)              stop('Error: Input prob must be a probability')
  if (prob > 1)              stop('Error: Input prob must be a probability')
  if (!(player %in% c(1,2))) stop('Error: Input player must be 1 or 2')
  
  #Compute and return probability
  if (p1+p2 == n) {
    PROB <- as.numeric(p1 > p2) }
  if (p1+p2 < n)  {
    SIZE  <- n-p1-p2
    BOUND <- floor(n/2-p1)
    PROB  <- 1-pbinom(BOUND, size = SIZE, prob = prob) }
  if (player == 2) { PROB <- 1-PROB } 
  PROB }

For the case of a best-out-of-seven game with equal win probabilities for each player, and one lost game for the first player, the win-probability for the first player is:

problem.of.points(n = 7, p1 = 0, p2 = 1)
[1] 0.34375

The above gives a full solution to the classical problem of points, where the win probability is assumed to be known. However, in practical cases, it is unrealistic to assume that the win probability of a game is known. A more realistic approach is to treat the win probability as unknown, and use the observed outcomes of the initial games to make an inference about the unknown win probability in each game and the corresponding win probability for the set of games. The simplest way to do this is with a Bayesian model where we use a beta prior for the win probability, leading to a binomial-beta model.

$\endgroup$
4
$\begingroup$

Given that the first is a loss (T), we have one chance to win a 5-game series (THHHH), four chances to win a 6-game series (TTHHHH THTHHH THHTHH THHHTH), and ten chances to win a 7 game series. That's $$(8/32)(1/4) + (20/64)(4/10) + (40/128)(10/20)\\ = 0.34375.$$

Simulation in R. Using a 'for' loop in hopes the steps will be clear. It gives $0.344 \pm 0.001.$

set.seed(2021)
B = 10^6;  x.win = last = first.x = numeric(B)
for(i in 1:B) {
 x = cumsum( sample(0:1,7,rep=T) )
 y = 1:7 - x
 first.x[i] = x[1]
 Last =  min(which(pmax(x,y)==4))
 x.win[i] = (x[Last]==4)
 last[i] = Last
}
mean(last)
[1] 5.812322  # avg nr games played (evenly matched)
4*(2/16)+5*(8/32)+6*(20/64)+7*(40/128)
[1] 5.8125

mean(x.win[first.x==0])
[1] 0.3438682 
2*sd(x.win[first.x==0])/1000
[1] 0.0009499965
$\endgroup$
7
  • $\begingroup$ Bruce, I don't get why you think there is one chance to win a 5 game series. If it is a 5 game series, then one needs to win only 3 to win the series. So possible combinations given the first is lost are: THHH- (no need for the 5th game, series already won), TTHHH, THTHH, and THHTH. $\endgroup$
    – Mango
    Jul 17 at 18:56
  • 1
    $\begingroup$ From link: "Possible 5 game series (8):" LWWWW WLLLL WLWWW LWLLL WWLWW LLWLL WWWLW LLLWL. Among these, there are four where our team loses the first game: LWWWW LWLLL LLWLL LLLWL, And only LWWWW leads to winning the series. // Start by conditioning on series length, then consider possibilities where our team loses first game. $\endgroup$
    – BruceET
    Jul 17 at 19:07
  • 1
    $\begingroup$ Thanks I did get the possible combinations. But I don't understand why you are including certain combinations in the denominator that are not valid. For example, shouldn't 4/20 be 4/10 because we can win 4 ways out of 10 combinations in a 6-game series. Also, how did you get "8/32" or "20/64" ... ? $\endgroup$
    – Mango
    Jul 17 at 19:54
  • $\begingroup$ Sorry for the delay. You're right about the denominators. Also, about to post Appendix with R simulation. $\endgroup$
    – BruceET
    Jul 18 at 0:06
  • 1
    $\begingroup$ @SoronelHaetir read it as "win (the seven game series) in five games". $\endgroup$
    – hobbs
    Jul 18 at 7:04
2
$\begingroup$

Summary

Your question is based on an incorrect premise: that impossible paths are somehow statistically invalid. Instead, the probabilities represented by those paths still add up to the probability of getting to the leg that stopped further play.

The simplest way to calculate the answer is to look at binomial distributions of all permutations, including the "impossible" routes you've ignored.

The answer is $\frac{11}{32}$, or $0.34375$, assuming the odds of winning are 50%.

Best 2 of 3 Coin Toss Corrected Examples

Here's the full range of possibilities for a best 2 of 3 coin toss:

Tree diagram of all possible games.

The white nodes are undecided states. The blue node wins for heads before finishing all three rounds, while the yellow wins for tails prematurely. The purple and pink nodes are unreachable. The green and orange nodes represent wins decided by the third coin toss.

To find the odds that heads wins, we need to find the probability of each win condition, then add up those probabilities. One way is to look at the bottom row. There are two purple nodes and two green nodes, each of which represents a win. Each one has a 1/8, or 12.5%, probability. Adding the four of them gives us a total probability of 50%.

Another way is to short circuit at each node where the game is already decided. In this case, there are three nodes where heads wins. But note that the odds of each node are not the same. There's a 25% chance of winning at the blue node, then two chances of winning at the green nodes, with a 12.5% chance each. Although there are fewer nodes, then total is still a 50% chance of winning. Of importance is that the odds of getting to the blue node is exactly the sum of odds of each of the purple nodes.

So let's go to the circumstance where tails has already won the first round.

Tree diagram of all possible games where tails won the first round.

If we look at the bottom row again, we note that heads can only win at the green node with a 25% chance. Tails wins at the other three nodes with a 25% chance each.

If we short-circuit, there are only 3 possible games. But there's a 50% chance tails wins at the yellow node, a 25% chance tails wins at the orange node, and only a 25% chance heads wins at the green node.

While there are only 3 possible games, it's not a 1/3 chance of getting to the green node. This is because the green node requires winning two games in a row, the orange requires winning then losing, and the yellow node only requires losing the first game.

Winning a Best of N Game, Given You've Already Lost A Round

In any best of N game, the win condition is that you've won $\frac{N}{2}+1$ or more rounds. Calculating the odds given existing wins or losses really just boils down to counting how many more rounds there are, and how many you need to win from here.

In a best of 7 game, you need to win at least 4 rounds. If you've already lost 1 of 7, there are 6 more rounds, and you still need to win 4 of them. The math has already been done in Ben's answer, so I'm not going to replicate it here. We can also look at this math.se answer by Graham Kemp to a question nearly identical to yours. It's the same math as Ben's answer uses, but in a different format that might be helpful.

There are $6$ remaining games. The desired criteria is that Heat wins at least $4$, when given that Heat lost the first 1. This is a binomial distribution; so named because of the use of the binomial coefficient to count number of permutations of outcomes that match the desired criteria.

The probability of exactly $k$ successes in $n$ trials with probability $p$ of success in any trial, is: $${n\choose k}p^k(1-p)^{n-k} \;=\; \,^n\mathrm{\large C}_k\;p^k(1-p)^{n-k} \;=\;\frac{n!}{k!(n-k)!}p^k(1-p)^{n-k}$$

So: $\mathbb{\large P}(\text{win at least }4\text{ more of }6) = {6\choose 4}\left(\frac 12\right)^4\left(\frac 12\right)^2+{6\choose 5} \left(\frac 12\right)^5\left(\frac 12\right)^1+{6\choose 6} \left(\frac 12\right)^6\left(\frac 12\right)^0$. $\therefore \mathbb{\large P}(\text{win at least }5\text{ more of }6) = \frac{1}{2^6}\left(\frac{6!}{4!2!}+\frac{6!}{5!1!}+\frac{6!}{6!0!}\right)$

We can plug that last formula into a calculator (such as WolframAlpha) to find that the answer is $\frac{11}{32}$, or $0.34375$.

$\endgroup$
1
  • 1
    $\begingroup$ That colored tree and explanation really cleared it up. Thanks so much. Wonderfully explained. Like this pretty much hit the core of my misconception - I was thinking correctly about the number of possible games, but incorrectly about their probabilities. Really awesome answer! $\endgroup$
    – Mango
    Jul 18 at 15:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.