#[1] comparison between Poisson and binorminal distributions p=0.1
xmin=0; n=40; p=0.05
title <- paste0("p=",p)
#
lambda=n*p
curve(dbinom(x, n, p),xmin,n,n-xmin+1,col=2,type ="p",main=title)
curve(dpois(x, lambda),xmin, n,n-xmin+1,type ="h",col=1,add=T) 
#[2] comparison between Poisson and binorminal distributions p=0.5
xmin=0; n=40; p=0.5
title <- paste0("p=",p)
#
lambda=n*p
curve(dbinom(x, n, p),xmin,n,n-xmin+1,col=2,type ="p",main=title)
curve(dpois(x, lambda),xmin, n,n-xmin+1,type ="h",col=1,add=T) 



  