Home Archives Search Feed Football Squares How To Use



WTA Rogers Cup (S. Kenin v. #6 E. Svitolina): Will EITHER PLAYER WIN 3 CONSECUTIVE GAMES at ANY POINT?


12:40PM
Yes: Either wins 3 straight games during match
No: Osaka never broken in 1st Set


Inputs Needed To Solve

Service Games Won %
Kenin and Svitolina

Odds of Match going 2 or 3 Sets

##### User Estimates #####

Kenin_SRV_Wperct = .71
Svit_SRV_Wperct = .67

Ken_2Sets = 100/300
Svit_2Sets = 100/275

odds_2Sets = Ken_2Sets + Svit_2Sets

print("The probability the match goes 2 Sets is %s." % round(odds_2Sets,3))
print("Therefore the probability the match goes 3 Sets (1 - the probability the match goes 2 Sets) is %s." % round(1-odds_2Sets,3))

The probability the match goes 2 Sets is 0.697.
Therefore the probability the match goes 3 Sets (1 - the probability the match goes 2 Sets) is 0.303.    


Method To Solve

## [1]

import numpy as np
def sim_game(server):
    if server:
        serve = np.random.choice([1,0],1,p=[Svit_SRV_Wperct,1-Svit_SRV_Wperct])
        if serve == 1:
            ans = '1'
        else:
            ans = '0'
        
    else:
        serve = np.random.choice([1,0],1,p=[Kenin_SRV_Wperct,1-Kenin_SRV_Wperct])
        if serve == 1:
            ans = '0'
        else:
            ans = '1'
        
    return ans
def set_over(winner):
    set_over = False
    
    if winner.count('1') >= 7:
        set_over = True
    if winner.count('0') >= 7:
        set_over = True
    if winner.count('1') >=6 and winner.count('0') < 5:
        set_over = True
    if winner.count('0') >=6 and winner.count('1') < 5:
        set_over = True
    if winner.count('0') == 6 and winner.count('1') == 6:
        set_over = True
    
    return set_over
def sim_set():
    winner = ''
    server = True
    set_over_ = False
    ans = 0

    while not set_over_:
        game = sim_game(server)
        winner += str(game)
        server = not server
        set_over_ = set_over(winner)
        
    _3_inarow_1 = '111'
    _3_inarow_0 = '000'
    
    _3 = 0
    if _3_inarow_0 in winner or _3_inarow_1 in winner:
        _3 = 1
    
    return _3
iterations = 9999
_3count = 0

for i in range(iterations):
    _3count += sim_set()
        
p_3 = _3count/iterations

## [2]
print("An estimate for the probability that a Set contains 3 consecutive wins for either player is %s" % round(p_3,3))

An estimate for the probability that a Set contains 3 consecutive wins for either player is 0.819    

## [3]
p_ans = 1 - (((1-p_3)**2)*odds_2Sets) + (((1-p_3)**3)*(1-odds_2Sets))

Solution

print("The probability EITHER PLAYER WIN 3 CONSECUTIVE GAMES at ANY POINT is ~%s" % round(p_ans,3))

The probability EITHER PLAYER WIN 3 CONSECUTIVE GAMES at ANY POINT is ~0.979

Posted on 8/9/2019






← Next post    ·    Previous post →