#### 3.1. The model

We model the match results with the following dynamic Bradley–Terry model:

- (3)

where describes the ability of the home team *h*_{i} in match *i* played against the visiting team *v*_{i} at time *t*_{i}. We specify an evolution of team ability in home matches which depends only on past matches played at home, whereas the ability when playing away depends only on past matches played as visitors. First, consider the ability in home matches and let be the time of the match previous to match *i* in which *h*_{i} was the home team. The ability of the home team is assumed to evolve in time following the exponentially weighted moving average (EWMA) process

- (4)

for some home-specific smoothing parameter *λ*_{1} ∈ [0,1]. The term denotes the mean home ability of team *h*_{i} based only on the result of the nearest previous match played at home by *h*_{i}

- (5)

with *β*_{1} being a home-specific parameter and a variable measuring the result of team *h*_{i} in the match played at time In the NBA application, we specify as the binary variable equal to 1 if team *h*_{i} won its previous home match and 0 if it was defeated. Thus, if *j* denotes the nearest match previous to match *i*, which was played by *h*_{i} at home, i.e. , then . Instead, in the *Serie A* application, we specify as the number of points earned by team *h*_{i} at time of its previous home match: 3 points for a victory, 1 for a draw and 0 for a loss.

Suppose that the home team *h*_{i} has played *K* matches at home before the match played at time *t*_{i}. Then, by iterated back-substitution, the model based on the pair of equations (4)–(5) can be reformulated as

- (6)

with denoting the time of the *r*th previous match played at home by team *h*_{i}. Thus, the ability is a function of the entire past history of home matches, , . The derived covariate is a weighted mean of these past results with weights *λ*_{1}, , …, geometrically decreasing to 0. The smoothing parameter *λ*_{1} specifies the persistence of the dependence on previous home matches. In the limiting case *λ*_{1}=1, the home team's ability depends only on the previous home match, In contrast, if *λ*_{1}=0 the home ability is constant in time and equal for all teams, . Values of *λ*_{1} ∈ (0,1) specify different levels of smoothing. In particular, home abilities smoothed in time are obtained when *λ*_{1} approaches 0.

Similarly, the ability of the visiting team is modelled by a second EWMA process

where *λ*_{2} ∈ [0,1] is the visitor-specific smoothing parameter and for a visitor-specific coefficient *β*_{2.} The starting values for *r* are computed similarly to those for the home abilities. In the NBA 2009–2010 data is set equal to 0.392, which is the frequency of visitors’ victories during season 2008–2009, whereas in the *Serie A* 2008–2009 data points, which is the average number of points gained by visitors in the *Serie A* 2007–2008 tournament.

Thus, in the proposed dynamic Bradley–Terry model, the EWMA specification is used to account for the serial association between match results of the same team, with suitable differences between home and away matches.

#### 3.2. Likelihood inference

EWMA processes are routinely used in time series forecasting (Holt, 2004) and in statistical quality control charts (Montgomery, 2005). In these contexts, the smoothing parameter is often chosen by trials or by using *ad hoc* methods based on previous experience. However, many have argued that automatic, data-driven choices of the smoothing parameter would be preferable. For example, in classical time series, the smoothing parameter ‘is often estimated by minimizing the sum of squared one-step-ahead forecast errors’ (Chatfield (2000), page 98).

Here, we follow the recommendation to identify the smoothing parameters by using available observations and consider maximum profile likelihood estimation of the two smoothing parameters *λ*_{1} and *λ*_{2}.

#### 3.3. Model validation

Model validation can be based on comparison of the fitted probabilites from the proposed model with fitted probabilites from the unstructured model (2). The model proposed aims to capture the evolution in time of all teams’ abilities with only four parameters (five in the case of draws), whereas the unstructured model has *n* free parameters (*n*+1 when draws are allowed), with *n* being the number of teams. Clearly, the unstructured model is expected to fit the data better, and thus it may be viewed as a benchmark. The closer the fitted probabilities of the model proposed are to those of the unstructured model, the better is the fit. To summarize the fitted probabilities we consider the Brier score (Brier, 1950) which is defined for match *i* as

where **1**(*y*_{i}=*q*) is the indicator function of the event {*y*_{i}=*q*}, *Q*=2 for sports without draws and *Q*=3 when draws are allowed, and is the maximum likelihood estimate of *θ* based on the results of all the matches played, i.e. . When the fit is perfect, giving probability 1 to the observed outcome, the Brier score is equal to 0, whereas a completely erroneous fit produces a Brier score equal to 2.

Some researchers have suggested that in the case of more than two categories it is better to employ an index which accounts for the whole distribution of probabilities, such as the rank probability score (Czado *et al.*, 2009)

In the analysis of sport tournaments the real interest usually lies in forecasting future results. Hence, it may be more relevant to evaluate the fitted model from a predictive point of view. In this case, we quantify the BS_{i} and RPS_{i} using the maximum likelihood estimate computed only with matches played before the forecasted match *i*, i.e. only with results .