dnbinom(0:2,3,0.2)
# graph-display format (three rows, one column)
par(mfrow=c(3,1))
# plots of three different negative binomial pmf's
plot(0:50, dnbinom(0:50,3,0.2), type="h", main="NegBin(3,0.2) pmf", xlab="", ylab="Probability", ylim=c(0,0.06))
plot(0:50, dnbinom(0:50,3,0.1), type="h", main="NegBin(3,0.1) pmf", xlab="", ylab="Probability", ylim=c(0,0.06))
plot(0:50, dnbinom(0:50,4,0.2), type="h", main="NegBin(4,0.2) pmf", xlab="", ylab="Probability", ylim=c(0,0.06))