Вычисление кумулятивной плотности Пуассона в программировании на R - функция ppois ()
Опубликовано: 17 Февраля, 2022
ppois() function in R Language is used to compute the cumulative density function for Poisson distribution.
Syntax: ppois(vec, lambda)
Parameters:
vec: Sequence of integer values
lambda: Average number of events per interval
Example 1:
# R program to compute # Cumulative Poisson Density # Sequence of x-valuesx <- seq(-10, 10, by = 1) # Calling ppois() Functiony <- ppois(x, lambda = 5)y |
Выход:
[1] 0,000000000 0,000000000 0,000000000 0,000000000 0,000000000 0,000000000 [7] 0,000000000 0,000000000 0,000000000 0,000000000 0,006737947 0,040427682 [13] 0,124652019 0,265025915 0,440493285 0,615960655 0,762183463 0,866628326 [19] 0,931906365 0,968171943 0,986304731
Example 2:
# R program to compute # Cumulative Poisson Density # Sequence of x-valuesx <- seq(1, 20, by = 1) # Calling ppois() Functiony <- ppois(x, lambda = 10) # Plot a graphplot(y) |
Выход: