# Oc curve
rm(list=ls(all=TRUE))
setwd("C:/Rtemp")
cat("\014")
options(digits=10)
options(scipen=10)


P=function(t,n,c) pbinom(c,n,t)
t=seq(0,1,by=0.001)
plot(t,P(t,10,1),type="l",col = "red",ylab="Probability")
lines(t,P(t,10,2),type="l")
t=seq(0,1,by=0.05)
lines(t,P(t,10,1),type="p",col = "red")
lines(t,P(t,10,2),type="p")
