Statistical simulation of FIFA World Cup


The source: worldcup.R.

You need R to try it.

Example:
        > s <- simulations(100)
        [1] "simulating  1 / 100"
             :
             :
        [1] "simulating  100 / 100"

        > length(s[s == 1])
        [1] 65
    
Here, team 1 (which is set to win each match with probability 0.9), became champion in 65 out of 100 simulations.


Main page