n=8
p=0.4
X=0:8
pdf=dbinom(X,n, p)
data.frame("X-values=",X,"probability",pdf)
plot(X,pdf,type="h",main="Graph of pdf",xlab="X-value",ylab="probability",col="green")
cdf=pbinom(X,n,p)
data.frame("X-values",X, "cum probability",cdf)
plot(X,cdf,type="s")
To embed this project on your website, copy the following code and paste it into your website's HTML: