user2 — Sep 17, 2013, 7:30 AM
rel <- function(m,p1) m*p1/((m-1)*p1+1)
indices <- c(1,3,6,12,20)
one <- rel(indices, 0.8833)
two <- rel(indices, 0.30)
one
[1] 0.8833 0.9578 0.9785 0.9891 0.9934
two
[1] 0.3000 0.5625 0.7200 0.8372 0.8955
indices <- 1:20
one <- rel(indices, 0.8833)
two <- rel(indices, 0.30)
plot(indices, one, type="l", col="red", ylim=c(0,1))
lines(indices, two, type="l", col="green")