Markov chain Monte Carlo simulation for 2006 WC

One application that I didn't mention in applied mathematics problems for soccer is the gaming industry.  Betting decisions and devising odds are two examples.  To this end, here is a simulation of match results at the 2006 World Cup using a Markov chain Monte Carlo (MCMC) algorithm.  I'm traveling from Florida to Arizona tomorrow so I can't discuss the code now, but I will when I return home.

It's important to note that the simulation didn't do a very good job of predicting the overall champion, but it did a fair job of predicting bets that would payoff well.  In order for the simulation to work well, it's imperative to have a high-fidelity model of head-to-head match outcomes, which is (to put it mildly) extremely difficult.