The Poisson distribution represents the probability of a provided number of cases happening in a set period of space or time if these cases happen with an identified constant mean rate (free of the period since the ultimate event). Poisson distribution has been named after Siméon Denis Poisson(French Mathematician).

Many probability distributions can be easily implemented in R language with the help of R’s inbuilt functions.

There are four Poisson functions available in R:

- dpois
- ppois
- qpois
- rpois

Consider a Random Variable X with Poisson distribution given as The mean of this distribution is given by The variance of such a distribution is

So if there are ‘n’ which happened out of which the only k were successful when the probability of success is very less then the probability of success becomes

#### dpois()

This function is used for illustration of Poisson density in an R plot. The function `dpois()`

calculates the probability of a random variable that is available within a certain range.

**Syntax:**

**where,**

K:number of successful events happened in an interval

mean per interval

log:If TRUE then the function returns probability in form of log

**Example:**

`dpois(` `2` `, ` `3` `) ` `dpois(` `6` `, ` `6` `) ` |

*chevron_right*

*filter_none*

**Output:**

[1] 0.2240418 [1] 0.1606231

#### ppois()

This function is used for the illustration of cumulative probability function in an R plot. The function `ppois()`

calculates the probability of a random variable that will be equal to or less than a number.

**Syntax:**

**where,**

K:number of successful events happened in an interval

mean per interval

lower.tail:If TRUE then left tail is considered otherwise if the FALSE right tail is considered

log:If TRUE then the function returns probability in form of log

**Example:**

`ppois(` `2` `, ` `3` `) ` ` ` `ppois(` `6` `, ` `6` `) ` |

*chevron_right*

*filter_none*

**Output:**

[1] 0.4231901 [1] 0.6063028

#### rpois()

The function `rpois()`

is used for generating random numbers from a given Poisson’s distribution.

**Syntax:**

**where,**

q:number of randon numbers needed

mean per interval

**Example:**

`rpois(` `2` `, ` `3` `) ` `rpois(` `6` `, ` `6` `) ` |

*chevron_right*

*filter_none*

**Output:**

[1] 2 3 [1] 6 7 6 10 9 4

#### qpois()

The function `qpois()`

is used for generating quantile of a given Poisson’s distribution.

In probability, quantiles are marked points that divide the graph of a probability distribution into intervals (continuous ) which have equal probabilities.

**Syntax:**

**where,**

K:number of successful events happened in an interval

mean per interval

lower.tail:If TRUE then left tail is considered otherwise if the FALSE right tail is considered

log:If TRUE then the function returns probability in form of log

**Example:**

`y <` `-` `c(.` `01` `, .` `05` `, .` `1` `, .` `2` `) ` `qpois(y, ` `2` `) ` `qpois(y, ` `6` `) ` |

*chevron_right*

*filter_none*

**Output:**

[1] 0 0 0 1 [1] 1 2 3 4

## Recommended Posts:

- Poisson Functions in R Programming
- Poisson Regression in R Programming
- Compute the Value of Poisson Density in R Programming - dpois() Function
- Compute the Cumulative Poisson Density in R Programming - ppois() Function
- Compute Randomly Drawn Poisson Density in R Programming - rpois() Function
- Compute the Value of Poisson Quantile Function in R Programming - qpois() Function
- Functions in R Programming
- Types of Functions in R Programming
- Conversion Functions in R Programming
- Recursive Functions in R Programming
- Logarithmic and Power Functions in R Programming
- Gamma Distribution in R Programming - dgamma(), pgamma(), qgamma(), and rgamma() Functions
- Exponential Distribution in R Programming - dexp(), pexp(), qexp(), and rexp() Functions
- Performing Logarithmic Computations in R Programming - log(), log10(), log1p(), and log2() Functions
- Applying User-defined Functions on Factor Levels of Dataset in R Programming - by() Function
- Compute the Parallel Minima and Maxima between Vectors in R Programming - pmin() and pmax() Functions
- Compute Beta Distribution in R Programming - dbeta(), pbeta(), qbeta(), and rbeta() Functions
- Get Summary of Results produced by Functions in R Programming - summary() Function
- Clustering in R Programming
- Classes in R Programming

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.