#poisson distribution
#dpois(x,lambda,log.p=false)
#prob of x=5  lambda=2.6
dpois(5,2.6)

#for x>=2;
1-ppois(1 ,2.6)

#find p(3<=x<=6)
dpois(3,2.6)+dpois(4,2.6)+dpois(5,2.6)+dpois(6,2.6)
#or we can do using ppois by subtracting 6-2
ppois(6,2.6)-ppois(2,2.6)


#zeo job
ppois(0,2)
dpois(2,2)
ppois(3,2)

#for generating 100 no we use
#rpois
#for printing it as a frequency table
 x= rpois(100,2.5)
 table(x)
 
 #plotting it on thw graph
 plot(table(x) ,type="bar",main=" graph ",xlab="x axis",ylab="y-axis",col="red")
 

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: