# A Bayesian In-Play Prediction Model for Association Football Outcomes
## 2 Model for Goal Times  
Before introducing how to update the teams' strength by the in-match information, we firstly summarize the model of [PERSON] and [PERSON] (1998). It is the basic model for the calibration of the teams' ability parameters, which is also named as the pure birth process model. The basic assumption of the model is that home-away scoring process is thought of as a two-dimensional inhomogeneous Poisson process. Considering the goal scoring process for a particular match \(k\) between home team \(H(k)\) and away team \(A(k)\), there are two scoring processes, for goals of home team and away team with intensities \(\Lambda_{k}(t)\) and \(\Omega_{k}(t)\) that are allowed to vary with time \(t\) and with status of the process. The intensity functions are  
\[\Lambda_{k}(t)=a\alpha_{H(k)}\beta_{A(k)}\tau_{xy}(t)\rho(t)+\zeta_{1}t \tag{1}\]  
and  
\[\Omega_{k}(t)=\alpha_{A(k)}\beta_{H(k)}\kappa_{xy}(t)\rho(t)+\zeta_{2}t, \tag{2}\]  
where \(\alpha_{H(k)}\) measures the attack strength (the higher the value of \(\alpha\), the stronger the attack) of home team \(H(k)\); \(\beta_{A(k)}\) is the defence strength (the smaller the value of the \(\beta\), the stronger the defence) of away team \(A(k)\); \(a\) is the home advantage parameter; \(\tau_{xy}\) and \(\kappa_{xy}\) are parameters that determine the scoring rates during which the score is \((x,y)\); \(t\in[0,1]\) is the (rescaled) time elapsed during the match, and \(\zeta_{1}\) and \(\zeta_{2}\) reflect continuous variation within the rates over time (thereafter, the time \(t\) in intensity functions is rescaled time). For league matches, the recoded match information is 90 min. Matches are played over two periods, each of 45 min. The time of treatment of the injury shall be made up in each half. \(\rho(t)\) is used to model the injury time effect. As no data are available showing how much injury time is added, goal times of 45 and 90 min are considered as (possibly) censored observations. The parameters, that represent a multiplicative adjustment to the scoring intensity over the periods (44, 45) and (89, 90) min. are  
\[\rho(t)= \begin{cases}\rho_{1},&\text{if}\quad t\in(44/90,45/90];\\ \rho_{2},&\text{if}\quad t\in(89/90,90/90];\\ 1,&\text{otherwise}.\end{cases}  \tag{3}\]  
[PERSON] and [PERSON] (1998) found in the best fitting-model the parameter \(\tau_{xy}\) could be appropriately defined as  
\[\tau_{xy}(t)=\begin{cases}\tau_{10},&\text{if}\quad x=1,y=0;\\ \tau_{01},&\text{if}\quad x=0,y=1;\\ \tau_{21},&\text{if}\quad x+y>1,x-y\geq 1;\\ \tau_{12},&\text{if}\quad x+y>1,x-y\leq-1;\\ 1,&\text{otherwise},\end{cases  
if there is no goals, the likelihood takes the subsequent form:  
\[L(t_{k},J_{k})=e^{-\int_{0}^{1}\Lambda_{k}(t)dt-\int_{0}^{1}\Omega_{k}(t)dt}, \tag{6}\]  
The observed data are \(\{(t_{k},J_{k,l})\), \(1\leq l\leq m_{k}\}\), \(t_{k,l}\) is the rescaled time of the \(l\)th goal and \(J_{k,l}\) is an indicator which is 0 for a home goal and 1 for an away goal. In addition, [PERSON] and [PERSON] assumed scores in one match are independent of the scores in another match, so that the overall likelihood can be obtained by taking the product over matches. In the model, we need to estimate \(2d+13\) parameters with \(d\) teams, which is a high-dimensional nonlinear optimization problem. Then we use the coordinate descent algorithm to solve this problem. In addition, the model parameters \(\alpha_{i}\), \(\beta_{j}\), \(\tau_{xy}\), \(\kappa_{xy}\), \(\rho_{1}\), \(\rho_{2}\), \(\tilde{\xi}_{1}\), \(\tilde{\xi}_{2}\), \(a\), \((i,j=1,2...d)\) are continually updated during each round--this is because in a round all teams appear and only appear once, with \(d\) being the number of teams. To be more specific, we fit the model on the training dataset and forecast outcomes of the following round' matches. Having made predictions, we then enlarge the training dataset by taking into account the predicted matches and refit the model. We repeat this procedure until the last round of games have been forecasted.