support <- 1:40 sample <- rbinom(length(support), 1, 0.1) support[sample==1][3]