📌  相关文章
📜  计算 R 编程中的累积泊松密度 – ppois()函数

📅  最后修改于: 2022-05-13 01:55:45.835000             🧑  作者: Mango

计算 R 编程中的累积泊松密度 – ppois()函数

R 语言中的ppois()函数用于计算泊松分布的累积密度函数。

示例 1:

# R program to compute 
# Cumulative Poisson Density
  
# Sequence of x-values
x <- seq(-10, 10, by = 1)
  
# Calling ppois() Function
y <- 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

示例 2:

# R program to compute 
# Cumulative Poisson Density
  
# Sequence of x-values
x <- seq(1, 20, by = 1)
  
# Calling ppois() Function
y <- ppois(x, lambda = 10)
  
# Plot a graph
plot(y)

输出: