lapsmean <- function(){ round(mean(sample(c(2,3,4,5,7,8,10,15,20), prob = c(0.05, 0.25, 0.19, 0.12, 0.035, 0.07, 0.175, 0.05, 0.05), size = 1000, replace = T))) } #one player driving the hell out of one track co2inkg() * lapsmean() versusmean <- function(){ round(mean(sample(c(12,16,20,24), prob = c(0.37, 0.33, 0.25, 0.05), size = 10, replace = T))) }