options(scipen=999)
options(digits=10)
cat("\014") # clear screen
rm(list=ls(all=TRUE))

k=4;p=0.7
x=seq(4,10,by=1)
Prob.x=dnbinom(x-k,size=k,prob=p)
table=data.frame(x,Prob.x)
table

k=4;p=0.7
x=seq(4,12,by=1)
plot(x,dnbinom(x-k,size=k,prob=p),type="h")
lines(x,dnbinom(x-k,size=k,prob=p),type="p")
