generate synthetic scores

This R Shiny app allows you to generate scores for the repeated play of a men’s AFL game where you can input:

  • The expected scoring shots for each team

  • The expected standard deviation of scoring shots for each team around the expected values

  • The expected conversion rate for each team

  • Parameters that influence the standard deviation (or the dispersion) of the conversion rates for each team around the expected values. These are the Rho parameters, are values near zero imply that the outcome of each conversion attempt is close to independent and so the distribution is close to a pure Binomial.

  • A parameter that influences the correlation between the scoring shots of the two teams (the Covariance parameter)

The underlying scoring model is as follows:

  • Scoring shots follow a bivariate Poisson distribution. Since R has no in-built function for this, we proceed by first generating a bivariate Normal and then map that to two univariate Poison variables as per the top section of the code at right

  • Conversion rates follow univariate Beta binomials (noting that there is little to no evidence that, in general, on the day conversion rates are correlated)

Note that the parameter values are originally set at values reasonable to use for a modern-day men’s game. To generate scores more like a modern-day women’s game use:

  • Expected Home and Away Conversion rates of around 47%

  • Rho Home and Away values of around 0.03

  • Home Scoring Shot SD of around 4.1

  • Away Scoring Shot SD of around 3.8

  • Covariance of around -0.17