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


x=seq(from=0,to=15,by=0.001)
plot(x,dgamma(x,shape=1,scale=1),
     xlim=c(0,15),
     ylim=c(0,1),
     lwd=2,
     type="l",axes=TRUE,
     col="blue",
     tck=0.05,
     xaxs="i",yaxs="i",
     col.sub="Black",
     col.main="Green",
     xlab="x",
     ylab="f(x)",
     main="Exponential Distribution",
     sub="B(b=1) R(b=2) G(b=3) black(b=4)")
lines(x,dgamma(x,shape=1,scale=2),type="l",col="red")
lines(x,dgamma(x,shape=1,scale=3),type="l",col="green")
lines(x,dgamma(x,shape=1,scale=4),type="l",col="black")




alpha=1
beta=5
pgamma(8,shape=alpha,scale=beta)
p=1-pgamma(8,shape=alpha,scale=beta);p
pbinom(5,5,p)-pbinom(1,5,p)
p=0.2
pbinom(5,5,p)-pbinom(1,5,p)
