# Stochastic Extensions of the Elo Rating System
## 4 Computational Study
### Basketball Results
#### 4.2.2 Stochastic Elo  
Our algorithm left us with 12,500 rated games out of the 12,933 games in the training set, and 17,437 out of the 17,820 originally in the testing set. These 17,437 matches were the ones used for the analysis of our stochastic model.  
We started by estimating the only parameter of the stochastic model, \(C\). As we showed in Lemma 1, if the model is correct, the optimal value \(C^{*}\) should minimize the error \(MSE(t)\) at every time \(t\), so we minimized the average of that function at different times for a more robust estimation of \(C^{*}\). In the training set, we obtained \(C^{*}\approx 10.91\), and we could compare the function \(MSE(t)\) for higher and lower values, as shown in Figure 4. Since every curve lay above the curve for \(C=10.91\), Lemma 1 suggested that our formula for the expected result was optimal among the family \(E[p_{A}]=F_{X}(\Delta r\sqrt{u_{t}}+g(t)S_{t})\). We also noted that the error did not reach zero at the final time \(t=T\) of 2880 s, since a tied score at that time results in an extra time being played. Our model assumed a fixed duration, so in order to predict the result beyond minute 48, we would need to model another (shorter) match.  
Figure 4: Mean squared error as a function of time for \(C>C^{*}\) (**a**) and \(C<C^{*}\) (**b**).  
Figure 3: Observed expectation of \(p_{A}\) vs. \(r_{A}-r_{B}\) versus predicted value \(F_{X}(D(r_{A}-r_{B})+L)\).  
Next, Figure 5 shows the result of checking the normality of the score process by computing the normal residues \(C\cdot S_{T}-L-D(r_{A}-r_{B})\) and comparing them with the quantiles of a normal distribution. Here, again, \(S_{T}\) is the score after the first 48 min, not the final score of the game. As expected from Equation (27), the residuals more or less followed a normal distribution, but the mean was not zero, meaning the home team scored better (in terms of \(S_{T}\)) than the Elo model predicted. The standard deviation was also smaller than the expected value of the model, namely, \(\sigma_{X}=200\). From the first plot, we can also tell that the residuals were somewhat correlated to the Elo difference but not to an extent that would invalidate the model.  
In this type of figures, the black line is just a linear regression fit to the actual data, which correspond to the blue dots. Finally, Figure 6 checks the linear relationship between the score variance and time, as described in Equation (29), by computing the quantities  
\[MSE_{S}(t):=\frac{1}{|M|}\sum_{i=1}^{|M|}(S_{T}-\mathbb{E}[S_{T}|S_{t}])^{2} \xrightarrow[|M|]{}\mathbb{E}[(S_{T}-\mathbb{E}[S_{T}|S_{t}])^{2}]=\text{Var} _{t}(S_{T})=\frac{\sigma_{X}^{2}}{C^{2}}u_{t} \tag{38}\]  
The resulting function was close to a line, but the variance still dropped more quickly at the end of the match than at the beginning, suggesting \(S_{T}\) was not completely homogeneous in time. Figure 7 plots the average number of points scored at each 10-s interval of the game by either team, in order to approximate the variance of that interval (they are in fact equal if we assume the score is the difference of two independent Poisson processes as in the discrete model). However, Figure 7 shows that the process was very homogeneous in time, except for brief periods before the end of each quarter.  
Figure 5: Tests for the model residues \(C\cdot S_{T}-L-D(r_{A}-r_{B})\), plotted against the Elo difference (**a**) and the standard normal quantiles (**b**).  
Figure 6: Score prediction variance \(MSE_{S}(t)\) vs. match time.