Two Probability Exercises

Exercise 1

A and B are playing a game (e.g. table tennis), which comprises 5 sets; whoever firstly wins 3 sets is the winner. We make two assumptions: (a) The probability that A wins a set is p (0<p<1), and the probability that B wins a set is 1p; (b) the 5 sets are independent. What is the probability that A wins the game?

Solution. Let X be the number of sets that A wins in a game. Then, X has the binomial distribution B(5, p). The probability that A wins the game is

Pr(X3)=i=35(5i)pi(1p)5i=6p515p4+10p3.

I asked myself this question: Is this winning probability Pr(X3) greater or less than p? To find out the answer to this question, I plot the winning probability against p and the 45-degree line:

n_out_of_2n_minus_1 <- function(n, p)
{m <-  2*n - 1
 s <- 0
 for(j in n:m) {
   s <- s + choose(m, j) * p^j * (1-p)^(m-j)
 }
 return(s)
}

x <- seq(0.001, 0.999, length.out = 1000)
y <- n_out_of_2n_minus_1(n = 3, p = x)

plot(x, y, type = 'l', xlab = 'p', ylab = 'Winning probability')
abline(a = 0, b = 1, col = 'red', lty = 2)
abline(v = 0.5, col = 'red', lty = 2)  

The above plot shows that: the winning probability is

  • >p, if p>0.5,
  • =p, if p=0.5,
  • <p, if p<0.5.

This is interesting!

Exercise 2

Two gamblers, A and B, are playing a game of 13 rounds. The rule is: Whoever firstly wins 7 rounds will collect the entire prize. All the rounds are independent; the probability that A wins a round is p (0<p<1), and the probability that B wins a round is 1p. The following situation is of interest: After 9 rounds, A has won 5 rounds and B has won 4 rounds. However, for some reason, they must stop the game here. How do they divide the prize?

So, here I am talking about the famous problem of points (AKA division of the stakes).This wikipedia article provides a solution. The key is to figure out A’s winning probability if they carry on the game until round 13. Now, I want to find A’s winning probability with a Markov chain approach.

The state space is 5,6,7+ — each state is a count of how many rounds that A has won. The initial distribution is:

(567+100).

The transition matrix is

P=[1pp001pp001]

Note that if they carry on the game A’s winning probability is given by

[1, 0, 0]P4e3,

where e3T=[0, 0, 1]. It’s easy to find

P2=[(1p)22p(1p)p20(1p)22pp2001]

Therefore,

[1, 0, 0]P4e3=[(1p)2, 2p(1p), p2][p22pp21],

which is equal to 3p48p3+6p2.

Lingyun Zhang (张凌云)
Lingyun Zhang (张凌云)
Design Analyst

I have research interests in Statistics, applied probability and computation.