Skip to content

Instantly share code, notes, and snippets.

@johnjosephhorton
Created January 27, 2012 21:48
Show Gist options
  • Save johnjosephhorton/1691106 to your computer and use it in GitHub Desktop.
Save johnjosephhorton/1691106 to your computer and use it in GitHub Desktop.
Optimal number of applications to send
df$s.star <- with(df, log(-c/log(1-q))/log(1-q))
df$s.star[df$s.star < 0] <- 0
g.optimal <- ggplot(df, aes(x = q, y = s.star, colour=factor(c))) + geom_line(aes(group=factor(c))) +
xlab("Probability that an application is successful") +
ylab("Optimal number of applications to send")
png("optimal_apps.png")
print(g.optimal)
dev.off()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment