# A Bayesian In-Play Prediction Model for Association Football Outcomes
## 3 Bayesian Inference
### The Choice of \(r_{1}\) and \(r_{2}\)  
To add to our understanding further, taking home team for example, we can see that  
\[\hat{\theta}_{1}=\hat{\theta}_{01}+\frac{X(T)-E_{H}(T)}{r_{1}+E_{H}(T)}\hat{ \theta}_{01}. \tag{22}\]  
Then the change rate of the posterior estimation relative to the prior estimation is \(\frac{|\hat{\theta}_{1}-\hat{\theta}_{01}|}{\hat{\theta}_{01}}=\frac{|X(T)-E_ {H}(T)|}{E_{H}(T)+r_{1}}\), and \(\frac{|X(T)-E_{H}(T)|}{E_{H}(T)}\) is the change rate of actual goals relative to the expected number of goals. If \(0<r_{1}\leq E_{H}(T)\), the change rate will fall in [\(\frac{1}{2}\frac{|X(T)-E_{H}(T)|}{E_{H}(T)}\), \(\frac{|X(T)-E_{H}(T)|}{E_{H}(T)}\)]. If \(E_{H}(T)<r_{1}<\infty\), the estimate change rate will fall in (0, \(\frac{1}{2}\frac{|X(T)-E_{H}(T)|}{E_{H}(T)}\)). The lower the \(r_{1}\), the greater the requirement to calibrate strengths with the in-match information. This makes it possible to identify that the shape parameter \(r_{1}\) of prior distribution determines the balance between the influences of historical matches information ('the prior') and the in-match goal information. There are several choices for the shape parameters of prior distributions. One common choice is specifying the variance, namely, adding the following conditions, \(r_{1}/\omega_{1}^{2}=\sigma_{\hat{\theta}_{01}}^{2}\) for home team and \(r_{2}/\omega_{2}^{2}=\sigma_{\hat{\theta}_{02}}^{2}\) for away team in a match, where \(\sigma_{\hat{\theta}_{01}}^{2}\) and \(\sigma_{\hat{\theta}_{02}}^{2}\) are variances of \(\hat{\theta}_{01}\) and \(\hat{\theta}_{02}\). Combining with \(r_{1}/\omega_{1}=\hat{\theta}_{01}\) and \(r_{2}/\omega_{2}=\hat{\theta}_{02}\), we obtain \(r_{1}=\hat{\theta}_{01}^{2}/\sigma_{\hat{\theta}_{01}}^{2}\) and \(r_{2}=\hat{\theta}_{02}^{2}/\sigma_{\hat{\theta}_{02}}^{2}\). However, because variances are quite small, the values of \(r_{1}\) and \(r_{2}\) are almost in (30, 150)--this suggests estimate change rates are quite close to zero and lead to no improvement. Another common option is to search \(r_{1}\) and \(r_{2}\) to maximize the marginal distribution of the observed data -this is known as the empirical Bayes approach. In empirical studies, estimation results show that \(r_{h}\) for home team is about 3 while \(r_{a}\) for away team is about 5. However, in a match the average expectation goals for home team and away team are respectively only about 1.6 and 1.2. The preceding analysis suggests that, throughout the match, the estimate change rate will be lower than half of the change rate of actual goals relative to expected goals, especially for away teams. By applying the preceding two options, it becomes possible to identify that the model will put too much emphasis on the prior information to ignore the observed data. The focus will now shift to search the shape parameters of prior distributions with the intention of balancing the effects of prior information and the newly observed match information. As the game proceeds, the level of in-match information will increase. It is therefore preferable to slightly calibrate strengths in the first half and to intensify the calibration of these strengths in the second half. The preceding discussion suggests that an appropriate value of \(r_{1}\) may be \(E_{H}(45)\), which is specific for each match so that it can capture the presence of different quality in the teams and avoid producing over-shrinkage [27]. Because the expected number of goals \(E_{H}(T)\) increases as match time progresses, the strength estimation change rate will fall in (0, \(\frac{1}{2}\frac{|X(T)-E_{H}(T)|}{E_{H}(T)}\)) during the first half, and the strength estimation change rate will fall in (\(\{\frac{1}{2}\frac{|X(T)-E_{H}(T)|}{E_{H}(T)},\frac{|X(T)-E_{H}(T)|}{E_{H}(T)}\}\)) during the second half. The away parameter \(r_{2}\) can be similarly analysed, and a proper value of \(r_{2}\) can be set as \(E_{A}(45)\).