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 of the conversion rates for each team around the expected values (these are the Theta parameters)
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)