# Producing Win Probabilities for Professional Tennis Matches from any Score

#### Jossy_79

##### New Member
Hi all. Using a (very) rudimentary knowledge of maths I'm trying to replicate the method in section 4.3.2 of this paper:

https://dash.harvard.edu/bitstream/handle/1/41024787/my_thesis_11_6_final.pdf?sequence=5

My understanding is that building the algorithm and inputting a "pre-match win forecast" (πij) I can calculate Fij and Fji. As such I have built an Excel based model to calculate pre-match win forecasts using Elo ratings from section 3.2. However, I'm really struggling with the algorithm.

My first challenge is that I'm not familiar with the code this algorithm is written in, e.g. I don't understand what the arrows mean or things like "+=". I think it's written in C# and for this I'll be able to get some help on code forums to do the conversion. However, before I post anything there I'd like to make sure I understand the logic of it with some help from you guys.

Now I may have a few follow on questions but my big one is: does this algorithm require the input of a figure for SUM? It looks like it does and that really confuses me because in the text underneath the algorithm it says SUM = Fij + Fji. However, Fij and Fji as I understand it are the outputs so I wouldn't know them before running the algorithm! Can anyone help me make sense of this? Thanks in advance.

#### Dason

I think we need more context for your specific questions. Pulling a single line out of an algorithm isn't entirely useful to us.

#### Jossy_79

##### New Member
Hi. What context do you need? I've put a link in for the whole research paper but I figured that was asking a bit much for someone to read the whole thing.