WOLFRAM LANGUAGE FEATURED EXAMPLE

Analyze a Tennis Game

In a game of tennis between two players, suppose the probability of the server winning a point is . Visualize the random walk graph for , with 17 states.

    
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
Find the probability of the server winning the game for :
In[3]:=
Click for copyable input
Out[3]=
Find the mean time to absorption, that is, the number of points played:
In[4]:=
Click for copyable input
Out[4]=
Find the mean number of states visited:
In[5]:=
Click for copyable input
Out[5]=
Find the average number of times the score will be tied at deuce:
In[6]:=
Click for copyable input
Out[6]=