# How should we convert sports results data to perform a valid logistical regression?

Say we want to perform a logistical regression analysis (although my question pertains to regressions in general) on sports results to determine the effects of various factors on who wins and who loses. We have the background information we want on the teams and players and now just need a random sample.

So we decide to take the published results over the past couple of years as our sample. The sample we collect is in the following form:

Result, Team 1, Team 2, ...

The result is always 0-1 or 1-0 (no draws). We can start preparing the data by converting Result into a binary variable:

Result = 1 if Team 1 wins, = 0 if Team 2 wins.

The problem is that this doesn't give us a valid regression. The reason will take a bit of explaining. Say one of our observations is:

Result = 1; Team 1 = Man.U.; Team 2 = Chelsea

This observation can be rewritten:

Result = 0; Team 1 = Chelsea; Team 2 = Man.U.

And it is the exact same observation and all the information is still the same and perfectly correct.

And this actually changes the results of our regression! One quick way to prove this is to consider what happens if we rewrite all of the observations so that Team 1 always wins. Then our dependent variable will always be Result = 1. Thus Var(Result) = 0 and the estimates for our parameters will all be 0 (except for the constant, of course). If we flip half of the observations so that half the time Result = 1 and half the time Result = 0 and we run the regression on that, we will get non-zero estimates for our parameters.

This bothers me because we are regressing the same data but getting wildly different results based on the order the teams are written in. If our results can change based on the order we decided to put the teams down when recording our observations, then they can't be valid.

So what is the best way to prepare this data for analysis so that we can get valid results?

• Are you familiar with the Bradley-Terry model? It's probably the "canonical" approach to this problem, but it uses only an inherent "team strength" parameter. Generalizing ever so slightly the basic idea, if you don't have an indication of home field, then you can always use the difference of the predictors to enforce the symmetry you desire. For example, $\mathrm{logit}(p_{ij}) = \beta^T (\mathbf{x}_i - \mathbf{x}_j)$, where $p_{ij}$ is the probability team $i$ beats team $j$. Of course, you can't have an intercept in such a model. (see continuation) – cardinal Jun 10 '11 at 14:12
• (cont.) Normally, I've found in fitting such models that home-field advantage is a very large effect in most team sports. So, you risk lack of fit by not including it. – cardinal Jun 10 '11 at 14:12
• Yes, the home team will definitely be a variable. – sportsfan Jun 11 '11 at 10:33
• If you have home and away team, then keep your predictors in that order. However, realize that getting an interpretable measure of home-field advantage will be difficult unless you use a particular model formulation. The formulation of your model depends on your goals, e.g., interpretation/explanation or prediction. – cardinal Jun 11 '11 at 15:23

A simple solution is to incorporate the hometown advantage (that is if your data holds this info). This makes it possible to give a definite meaning to your outcome. So if you have that data, it'll likely be a better model and solves your problem: go there!

Right now, your outcome's definition depend on the order, but your data doesn't.

A possible solution (though I haven't checked this completely) would be to duplicate every record in your data, but change the order and the outcome (so for every observation, both representations are in your dataset), and then do a weighted logistic regression, giving every observation a weight of 1/2 (I think this correctly adjusts your variances, but I'd have to check)

Another option is to change your outcome so it is not dependent on the order anymore (i.e.: the alphabetically former team wins or not), or to always code your two teams in a steady order (i.e. make that the alphabetically former team is always in column 1).

These things are bound to be a bit harder to interpret, though...

• The home-field advantage approach is probably the way to go. I don't think I'd use the alphabetical ordering as this imposes an arbitrary ordering on the predictors that could result in capturing spurious effects. – cardinal Jun 10 '11 at 14:02
• +1 putting the home team first looks like a sensible approach to me. – Dikran Marsupial Jun 10 '11 at 14:11
• I considered ordering the teams by another criteria, such as the hometown advantage. The reason it still bothered me was because the outcomes of our model change depending on which criteria we use to order the teams. For example, consider a variable denoting the amount of red is present on a team's shirts. We would like to know if this factor is significant. We may do the regression by ordering the teams based on hometown advantage and find one significance level for redness of the shirts. – sportsfan Jun 11 '11 at 9:35
• But if we order the teams based on a different criteria (say, based on a proxy variable denoting how "in form" they are: their final ladder standings for that season) then we will find a different significance level for redness of the shirts. This is not necessarily due to any inherent bias in the model but simply due to the fact that Var(Results) changes based on team ordering. While ordering the teams on a pre-chosen criteria makes it easy to interpret our results, I am concerned about the fact that our results for unrelated variables still change when we use this approach. – sportsfan Jun 11 '11 at 9:43
• It makes it easy to interpret the results, because given an ordering, the definition of your outcome is clear beyond doubt. Changing the order means changing the meaning of your outcome (the reddest team wins or the alphabetically former one wins), so it makes sense that the results should vary (unless there is a strong correlation between redness and alphabetically naming your team :-) ) The home team still makes most sense. If not present, maybe something like last year's ranking or similar works for you. Pick what you wish to predict... – Nick Sabbe Jun 11 '11 at 11:43

Rather using trying logistic regression, I would consider trying the techniques in

Dixon, M.J. and S.G. Coles, 1997. Modelling Association Football Scores and Inefficiencies in the Football Betting Market. Applied Statistics.

In this paper, they use Poisson regression to model football scores. Basically, the number of goals a team can score is modelled using a Poisson distribution, adjusted for: