Research breakthrough possible @S-Logix pro@slogix.in

Office Address

Social List

How to implement Poisson Distribution in R?

Description

To implement the poisson distribution using R programming.

Process

Four main functions in binomial distribution:

  dpois(x, lambda= )

  Gives height of the probability distribution at each point pnbinom(x, lambda= )

   Gives the cumulative probability of an event qnbinom(p, lambda= )

   It takes the probability value and gives a number whose cumulative value matches the probability value.

  rnbinom(x, lambda= ) Used to generate random numbers whose distribution is binomial.

x -- vector

Lambda -- vector of (non-negative) means.

Sapmle Code

#Poisson Distribution
#dpois
x<-seq(0,100,by=1)
y<-dpois(x,lambda = 10)
plot(x,y,col=”blue”)

#ppois
y<-ppois(x,lambda = 50)
plot(x,y,col=”red”)

#qpois
y<-qpois(p=0.6,lambda = 20)
print(y)

#rpois
x<-rpois(200,lambda = 30)
hist(x,col=285)

Screenshots
implement Poisson Distribution in R
Poisson Distribution
Four main functions in binomial  distribution
Used to generate random numbers whose distribution is binomial